<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' 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'><id>tag:blogger.com,1999:blog-1766780051966124712</id><updated>2025-10-11T01:17:42.780-04:00</updated><category term="C#"/><category term="SQL Server"/><category term="Projects"/><category term="Microsoft"/><category term="Visual Studio"/><category term="Hyper-V"/><category term="Windows"/><category term="Blog"/><category term=".Net"/><category term="Guitar"/><category term="TSQL"/><category term="VMware"/><category term="XML"/><category term="Hardware"/><category term="Windows 8"/><category term="//build"/><category term="Blackberry"/><category term="Health"/><category term="Metro"/><category term="PowerShell"/><category term="Spring.Net"/><category term="WCF"/><category term="WP7"/><category term="Windows Home Server"/><category term="Workout"/><category term="XAML"/><category term="AVG"/><category term="Algorithms"/><category term="Antivirus"/><category term="Ascendo"/><category term="Common.Logging"/><category term="DNS"/><category term="Data Access"/><category term="Dell Venue 8 Pro"/><category term="Firewall"/><category term="Humor"/><category term="IBatis"/><category term="JSON"/><category term="Kata"/><category term="MSMQ"/><category term="Outlook"/><category term="Personal"/><category term="Practice"/><category term="Registry"/><category term="Resharper"/><category term="TFS"/><category term="Team Foundation Server"/><category term="UNC"/><category term="Windows 10"/><category term="XQuery"/><title type='text'>Mostly Ramblings...</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://blog.malevy.net/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default?start-index=26&amp;max-results=25'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>56</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-6430790424816209042</id><published>2017-11-13T20:51:00.002-05:00</published><updated>2017-11-13T20:51:11.501-05:00</updated><title type='text'>A fix for Lightroom&#39;s scaling on high-density displays</title><content type='html'>&lt;br /&gt;
I brought a Microsoft Surface Book laptop a couple months ago. I love the machine! However, the 3000x2000 display causes most apps to be really small. Way too small for me to use.&lt;br /&gt;
&lt;br /&gt;
Fortunately the Display settings has an option to scale the display and I have it set to 200%. It works wonderfully - except with Lightroom. Lightroom does something crazy and scales itself to be really large. So large that some of the labels in dialogs don&#39;t render correctly.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve spent all this time looking for a resolution and tonight I finally found it on superuser.com:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://superuser.com/questions/904260/how-can-i-scale-adobe-software-uis-on-a-high-density-display&quot;&gt;https://superuser.com/questions/904260/how-can-i-scale-adobe-software-uis-on-a-high-density-display&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://superuser.com/a/1167217/815240&quot;&gt;https://superuser.com/a/1167217/815240&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
On the properties of the shortcut, under the Compatibility tab, I selected &lt;b&gt;Override high DPI scaling&lt;/b&gt; and set the &lt;b&gt;Scaling performed by&lt;/b&gt; option to &lt;b&gt;System&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Fixed!</content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/6430790424816209042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2017/11/a-fix-for-lightrooms-scaling-on-high.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/6430790424816209042'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/6430790424816209042'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2017/11/a-fix-for-lightrooms-scaling-on-high.html' title='A fix for Lightroom&#39;s scaling on high-density displays'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-761514679196309907</id><published>2015-07-23T10:40:00.000-04:00</published><updated>2015-07-23T10:40:25.143-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>SqlException error numbers for deadlock, connection and command timeouts</title><content type='html'>I&#39;m posting this here so that I can find it in the future.&lt;br /&gt;
&lt;br /&gt;
When accessing SQL Server via SqlClient (could be ADO.net or Entity Framework), any error is wrapped in an instance of SqlException and the Number property will be set to provide an indication of the specific error condition. In the event of a connection timeout, the Number property will be set to either 2 or 53. A command timeout will set the Number property to -2. And a deadlock will return 1205 in the Number property.</content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/761514679196309907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2015/07/sqlexception-error-numbers-for-deadlock.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/761514679196309907'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/761514679196309907'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2015/07/sqlexception-error-numbers-for-deadlock.html' title='SqlException error numbers for deadlock, connection and command timeouts'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-628159737065025346</id><published>2015-07-16T10:45:00.000-04:00</published><updated>2015-07-16T10:45:31.911-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="TSQL"/><title type='text'>Splitting and combining strings with TSQL</title><content type='html'>My current work includes a batch process that validates 1000&#39;s (and sometimes more) transactions against a dozen+ validation rules. Recently this process became the source of blocking issues, causing a lot of users to become very unhappy.&lt;br /&gt;
&lt;br /&gt;
Previously the rules were written in a very straight-forward manner. Usually something similar to:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;UPDATE transactions&lt;br /&gt;SET&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;reason = reason + &#39;A&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;, status=6 -- exception&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;WHERE {some rule}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;It&#39;s probably obvious where the blocking became a problem.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Our alternate approach was to collect the a list of invalid transactions and the rule that was violated into a table and mark all of the affected transactions with a single &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;UPDATE&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;CREATE TABLE #badRows (id BIGINT, rule char(1));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;INSERT INTO #badRows (id, rule)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;SELECT id, &#39;A&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;FROM transactions&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;WHERE {some rule}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The next challenge was pivoting and rule-violation codes into a single string so that the reason field of the transaction could be updated, with the additional constraint that any existing rule-violation code had to be maintained. We came up with the following:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;;WITH both AS (&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;-- combine existing violations with any new ones&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT t.id, t.reason&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FROM transactions t&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;INNER JOIN #badRows br ON br.id = t.id&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;UNION ALL&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT id, rule FROM #badRows&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;, ix AS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;(&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;-- split any strings into single characters&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT id, SUBSTRING(reason,Number,1) AS code&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FROM both &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;INNER JOIN master.dbo.spt_values ON Number BETWEEN 1 AND LEN(reason) AND type=&#39;P&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;, crushedReasonCodes AS (&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;-- combine multiple rows into a single string&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT DISTINCT id, (&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;SELECT DISTINCT code AS [text()]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;FROM ix&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;WHERE ix.id = o.id&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;FOR XML PATH (&#39;&#39;)) as reason&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FROM ix AS o&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;UPDATE transactions&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SET reason = crc.reason&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;, status = 6&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;FROM transactions t&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;INNER JOIN crushedReasonCodes crc ON crc.id = t.id&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/628159737065025346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2015/07/splitting-and-combining-strings-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/628159737065025346'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/628159737065025346'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2015/07/splitting-and-combining-strings-with.html' title='Splitting and combining strings with TSQL'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-6280566632916141814</id><published>2015-07-03T19:48:00.000-04:00</published><updated>2015-07-03T19:48:35.339-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dell Venue 8 Pro"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 10"/><title type='text'>Installing Windows 10 Build 10162 on a Dell Venue 8 Pro</title><content type='html'>Today I decided to repave my Dell Venue 8 Pro with the latest Windows 10 Preview build (10162). I&#39;ve been running Windows 10 on the device for a very long time, starting with an upgrade from Windows 8.1. Unfortunately, along the way, updates began to fail. Such is the risk of a preview OS.&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The installation turned out to be pretty easy.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
As most projects go, the prep is the most important step. First, make sure that the device is fully charged. I swear the thing doesn&#39;t change when it&#39;s running. Maybe it&#39;s just my device. Maybe I&#39;m imagining it.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
While the device is charging, download the 32bit version of the ISO from the Windows Insider site and burn it to a USB drive. I used&amp;nbsp;&lt;a href=&quot;http://www.isotousb.com/&quot;&gt;isotousb&lt;/a&gt;. Format the USB drive for FAT32 and make sure that you click the option to create a bootable drive. Oh! Don&#39;t forget to grab the activation keys.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You&#39;re also going to need some drivers. You can get them from the&amp;nbsp;&lt;a href=&quot;http://www.dell.com/support/home/us/en/19/product-support/product/dell-venue-8-pro/drivers/advanced&quot;&gt;Dell Venue 8 Pro Product Support&lt;/a&gt;&amp;nbsp;page. I ended up using:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class=&quot;DndHeading_h5 bold paddingLeftDriversHome driverNamePadding bottom-offset-none hidden-xs hidden-sm&quot; data-bind=&quot;attr: { id: &#39;span&#39; + DriverId },text: DriverName&quot; data-original-title=&quot;This package provides the Dell System BIOS update and is supported on Dell Venue 8 Pro 5830 for Windows Operating Systems.&quot; data-placement=&quot;right&quot; id=&quot;span3VK6M&quot;&gt;Dell Venue 8 Pro 5830 System BIOS (vA10)&lt;/span&gt;&lt;div class=&quot;tooltip fade right in&quot; style=&quot;left: 281px; top: -44px;&quot;&gt;
&lt;div class=&quot;tooltip-arrow&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;DndHeading_h5 bold paddingLeftDriversHome driverNamePadding bottom-offset-none hidden-xs hidden-sm&quot; data-bind=&quot;attr: { id: &#39;span&#39; + DriverId },text: DriverName&quot; data-original-title=&quot;This package provides the Dell System BIOS update and is supported on Dell Venue 8 Pro 5830 for Windows Operating Systems.&quot; data-placement=&quot;right&quot;&gt;&lt;span class=&quot;DndHeading_h5 bold paddingLeftDriversHome driverNamePadding bottom-offset-none hidden-xs hidden-sm&quot; data-bind=&quot;attr: { id: &#39;span&#39; + DriverId },text: DriverName&quot; data-original-title=&quot;This package provides Intel Trusted Execution Engine Interface Driver and is supported on Dell Venue 8 Pro running the following Operating S...&quot; data-placement=&quot;right&quot; id=&quot;span76XFC&quot;&gt;Intel Trusted Execution Engine Interface Driver (v1.0.0.1054)&lt;/span&gt;&lt;div class=&quot;tooltip fade right in&quot; style=&quot;left: 361px; top: -52px;&quot;&gt;
&lt;div class=&quot;tooltip-arrow&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;DndHeading_h5 bold paddingLeftDriversHome driverNamePadding bottom-offset-none hidden-xs hidden-sm&quot; data-bind=&quot;attr: { id: &#39;span&#39; + DriverId },text: DriverName&quot; data-original-title=&quot;This package provides the Dell System BIOS update and is supported on Dell Venue 8 Pro 5830 for Windows Operating Systems.&quot; data-placement=&quot;right&quot;&gt;&lt;span class=&quot;DndHeading_h5 bold paddingLeftDriversHome driverNamePadding bottom-offset-none hidden-xs hidden-sm&quot; data-bind=&quot;attr: { id: &#39;span&#39; + DriverId },text: DriverName&quot; data-original-title=&quot;This package provides Intel Trusted Execution Engine Interface Driver and is supported on Dell Venue 8 Pro running the following Operating S...&quot; data-placement=&quot;right&quot;&gt;&lt;span class=&quot;DndHeading_h5 bold paddingLeftDriversHome driverNamePadding bottom-offset-none hidden-xs hidden-sm&quot; data-bind=&quot;attr: { id: &#39;span&#39; + DriverId },text: DriverName&quot; data-original-title=&quot;This package provides Intel Atom Z3000 Series Driver and is supported on Dell Venue 8 Pro running the following Operating System: Windows 8....&quot; data-placement=&quot;right&quot; id=&quot;spanPKVD4&quot;&gt;Intel Atom Z3000 Series Driver (v603.9600.2067.27988)&lt;/span&gt;&lt;div class=&quot;tooltip fade right in&quot; style=&quot;left: 252px; top: -44px;&quot;&gt;
&lt;div class=&quot;tooltip-arrow&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;DndHeading_h5 bold paddingLeftDriversHome driverNamePadding bottom-offset-none hidden-xs hidden-sm&quot; data-bind=&quot;attr: { id: &#39;span&#39; + DriverId },text: DriverName&quot; data-original-title=&quot;This package provides the Dell System BIOS update and is supported on Dell Venue 8 Pro 5830 for Windows Operating Systems.&quot; data-placement=&quot;right&quot;&gt;&lt;span class=&quot;DndHeading_h5 bold paddingLeftDriversHome driverNamePadding bottom-offset-none hidden-xs hidden-sm&quot; data-bind=&quot;attr: { id: &#39;span&#39; + DriverId },text: DriverName&quot; data-original-title=&quot;This package provides Intel Trusted Execution Engine Interface Driver and is supported on Dell Venue 8 Pro running the following Operating S...&quot; data-placement=&quot;right&quot;&gt;&lt;span class=&quot;DndHeading_h5 bold paddingLeftDriversHome driverNamePadding bottom-offset-none hidden-xs hidden-sm&quot; data-bind=&quot;attr: { id: &#39;span&#39; + DriverId },text: DriverName&quot; data-original-title=&quot;This package provides Intel Atom Z3000 Series Driver and is supported on Dell Venue 8 Pro running the following Operating System: Windows 8....&quot; data-placement=&quot;right&quot;&gt;&lt;span class=&quot;DndHeading_h5 bold paddingLeftDriversHome driverNamePadding bottom-offset-none hidden-xs hidden-sm&quot; data-bind=&quot;attr: { id: &#39;span&#39; + DriverId },text: DriverName&quot; data-original-title=&quot;This package provides the driver for the Dell Wireless 1538 WiFi+Bluetooth and is supported on the Dell Venue 8 Pro that is running the foll...&quot; data-placement=&quot;right&quot; id=&quot;span95DV0&quot;&gt;Dell Wireless 1538 WiFi+Bluetooth Driver (v3,7.2.59)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
There&#39;s also an update for the touch screen (Panel Touch Firmware for Dell Venue 8 Pro 5830) but the installer notified me that the touch driver was already up to date after I had installed the Intel Atom A3000 Series Driver. YMMV.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I created a folder on the USB drive and copied all the installers to it.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Then you&#39;re going to need a USB hub.Windows 10 didn&#39;t come with a driver for the touch screen so you&#39;re going to need a mouse. The hub will allow you to have both the USB drive and mouse connected at the same time. You might also need an adapter (like this &lt;a href=&quot;http://www.amazon.com/niceeshop-Degree-Female-Converter-Adaptor/dp/B00871Q5PI/ref=sr_1_2?ie=UTF8&amp;amp;qid=1435963341&amp;amp;sr=8-2&amp;amp;keywords=usb+to+micro+usb+adapter&quot;&gt;one&lt;/a&gt;) to connect the hub to the micro USB on the Venue 8.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
With the device turned off, connect the USB hub to it. Press the Volume Down button and power on the device. It&#39;ll seem like the boot stalls until you release the Volume Down button. Then the device will boot into the BIOS setup. Navigate to the BOOT tab. You should see both the internal drive and the USB drive showing as bootable drives. Change the first boot target to the USB drive then save the changes and let the device restart. If all went well, the Windows 10 installer should start.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I chose the Custom Install option and removed all the existing partitions.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
After the installer completed, I installed the drivers in the same order that I listed them above.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
One note: the only operating difference that I&#39;ve noticed is that I have to hold down the power button for a couple of seconds to power on the device. Otherwise, everything else seems to be working as expected.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/6280566632916141814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2015/07/installing-windows-10-build-10162-on.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/6280566632916141814'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/6280566632916141814'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2015/07/installing-windows-10-build-10162-on.html' title='Installing Windows 10 Build 10162 on a Dell Venue 8 Pro'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-4024214956838364672</id><published>2015-03-04T20:18:00.000-05:00</published><updated>2015-03-04T20:19:26.239-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Visual Studio 2013 APPCRASH KERNELBASE.DLL</title><content type='html'>&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I&#39;ve spent the last two night trying to figure out why Visual Studio 2013 crashes roughly two minutes after loading.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;Faulting application name: devenv.exe,&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;version: 12.0.31101.0,&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;time stamp: 0x54548724&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;Faulting module name: KERNELBASE.dll,&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;version: 6.3.9600.17415,&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;time stamp: 0x54504ade&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;Exception code: 0xe06d7363&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;Fault offset: 0x00014598&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;Faulting process id: 0x940&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;Faulting application start time: 0x01d056d558e8e214&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;It started right after I had applied a couple of Windows updates so I started trying to resolve the problem by rolling those back. No change.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I tried resetting the Visual Studio users settings. Nope.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Integrity scan of the disk. No problems found.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Turned to the Internet and found this &lt;a href=&quot;http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/programs-crash-error-fault-module-kernelbasedll/9fe5d2e7-79d0-42c1-b8dc-51ed8d70f749?rtAction=1425517912822&quot;&gt;answer&lt;/a&gt; in the Microsoft forums. It seems that my User Profile was corrupted. I created a new account on the machine, killed the previous one. Done.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/4024214956838364672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2015/03/visual-studio-2013-appcrash.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/4024214956838364672'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/4024214956838364672'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2015/03/visual-studio-2013-appcrash.html' title='Visual Studio 2013 APPCRASH KERNELBASE.DLL'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-8564758616632122320</id><published>2014-12-04T13:36:00.001-05:00</published><updated>2014-12-04T13:36:49.807-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PowerShell"/><title type='text'>Reversing a file with Powershell</title><content type='html'>Today I was tracking down the source of a deadlock and needed to reverse the SQL Server log file so that it would be easier to follow the deadlock information. A quick search for reversing a text file lead to a command called Tail which must be a *unix command. I also found a couple of Powershell scripts but nothing really simple.&lt;br /&gt;
&lt;br /&gt;
As it happens, get-content returns it&#39;s results as an array.&lt;br /&gt;
And you can reverse an array using the static Reverse() method&lt;br /&gt;
And you can write an array using out-file.&lt;br /&gt;
&lt;br /&gt;
A quick example:&lt;br /&gt;
$c = (get-content deadlock.log)&lt;br /&gt;
[array]::Reverse($c)&lt;br /&gt;
$c | out-file &quot;rev-deadlock.log&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/8564758616632122320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2014/12/reversing-file-with-powershell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/8564758616632122320'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/8564758616632122320'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2014/12/reversing-file-with-powershell.html' title='Reversing a file with Powershell'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-8827148657817368767</id><published>2011-10-08T18:23:00.001-04:00</published><updated>2011-10-08T18:23:39.723-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Metro"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 8"/><category scheme="http://www.blogger.com/atom/ns#" term="XAML"/><title type='text'>Metro style apps–loading an image from content</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I’m writing a Win8 Metro style app and I wanted to expose an image from one of my view models. The image comes from a file that I have included in the project as content. After wandering through the &lt;a href=&quot;http://code.msdn.microsoft.com/windowsapps&quot; target=&quot;_blank&quot;&gt;samples&lt;/a&gt;, I was finally able to piece together this solution:&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7yVtaIzZwepycWK83uY6DzS-9wtKINc7zD-NP32B_pT-7bJFABrr09uEV8Ib2ylcV6ZrGL7t46PjGdQ73B4IPsPFE_6Zwbf7T1s4mOTw2mjEIecwDvUuFMWW9-uzNCzjxJODALAoR-8bP/s1600-h/image%25255B3%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGBfuIjZ9K0lxZaTJUvU9yXJjCkpSiiayZLfFPXhsbOkhGp7lW8gVG64plArjv2wejObjlh6kZnd-CfMVYGc8fdE5rLxbaUDqw6-ybsLkYZTQ35wF4aJI8_wO7wZ_6l9yztd5o4SnTSDo0/?imgmax=800&quot; width=&quot;479&quot; height=&quot;170&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The XAML binds to the property using the Source attribute:&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsE6agKTxCGiOup3xxqhP0K74vbqVxVnwpnhiToHXP3DpkP5aw1LuaPDdManX3Vh8PtKZ067ymf6KwgDy89qGl87o3wyyD2YnRO0Ek3qx5cu-FofFPyOdSIz8JhRn-Ir-RRwfHbpitWrtD/s1600-h/image%25255B7%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx5OtoRqetDtW6-03TdiWQtNjzsMixrA6n5p4o0HY5h7fyMCKZ_WkuGg0N_2UsIn8tIMDKpnOGzOELOQCqlicW7kPLboXY_zmxe9-qxITaYYg1JjawH8KJatIriUrqLH7ONZ80eH6WiGqa/?imgmax=800&quot; width=&quot;486&quot; height=&quot;64&quot;&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Some things to note. The image’s Build Action is set to Content and the path delimiters in the call to ResourceLoader.GetFile() use forward slashes (“/”). Using a backslash results the exception: NamedResource Not Found (HRESULT 0x80073B17).&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/8827148657817368767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/10/metro-style-appsloading-image-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/8827148657817368767'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/8827148657817368767'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/10/metro-style-appsloading-image-from.html' title='Metro style apps–loading an image from content'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGBfuIjZ9K0lxZaTJUvU9yXJjCkpSiiayZLfFPXhsbOkhGp7lW8gVG64plArjv2wejObjlh6kZnd-CfMVYGc8fdE5rLxbaUDqw6-ybsLkYZTQ35wF4aJI8_wO7wZ_6l9yztd5o4SnTSDo0/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-1201320350499110677</id><published>2011-09-28T20:39:00.001-04:00</published><updated>2011-09-28T20:39:14.139-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="WP7"/><title type='text'>Windows Phone 7 syncing to online Exchange results in Error 85010014</title><content type='html'>&lt;p align=&quot;left&quot;&gt;&lt;img style=&quot;display: inline; float: right&quot; align=&quot;right&quot; src=&quot;http://www.wpclipart.com/food/fruit/mango/mango_4.png&quot;&gt;&lt;/p&gt; &lt;p align=&quot;left&quot;&gt;I upgraded my phone to the Mango update yesterday. Everything went fine except or so I thought. This morning I noticed that my phone hadn’t synced to the company’s Exchange account (Microsoft BPOS) for over 10 hours. When I forced a sync, it resulted in the following error message:&lt;/p&gt; &lt;p&gt;Not Updated&lt;br&gt;There’s a problem with red001.mail.microsoftonline.com. Try again later.&lt;br&gt;Last tried xx seconds ago&lt;br&gt;Error code: 8510014&lt;/p&gt; &lt;p&gt;I screwed around with the configuration for more time than I should have. I tried reentering the server. I tried entering the password again. I even removed the account from the phone and recreated it. &lt;/p&gt; &lt;p&gt;I even went to the Mobile Devices section on OWA and removed the device and then removed the account AGAIN.&lt;/p&gt; &lt;p&gt;Nothing worked.&lt;/p&gt; &lt;p&gt;This evening I stumbled onto something that did work. &lt;/p&gt; &lt;p&gt;I recreated the account on the phone (for the fourth or fifth time) and received the error again. On a whim, I unchecked all the content types under the Content to Sync section (Email, Contacts, Calendar and Tasks). I then issued a sync and it worked! I then added Email and re-synced. That worked! I continued to add the other three items, one at a time and followed by a re-sync. &lt;/p&gt; &lt;p&gt;Now everything is good again.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/1201320350499110677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/09/windows-phone-7-syncing-to-online.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/1201320350499110677'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/1201320350499110677'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/09/windows-phone-7-syncing-to-online.html' title='Windows Phone 7 syncing to online Exchange results in Error 85010014'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-6930456787678611946</id><published>2011-09-22T19:37:00.001-04:00</published><updated>2011-09-22T19:37:42.056-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="//build"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="VMware"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 8"/><title type='text'>Installing SQL Server “Denali” CTP3 on Windows 8 Preview</title><content type='html'>&lt;p&gt;I, and I’m sure many other developers, have been eager to begin experimenting with developing on Windows 8 and building Metro style apps. I was fortunate to attend //build and receive one of the Samsung 700T tablets with Windows 8 and Visual Studio 11 already loaded. Unfortunately my wife and daughter also enjoy the tablet so it’s not available to me for long programming sessions.&lt;/p&gt; &lt;p&gt;So in order to make everyone happy, I have installed the Win8 Preview in a VM under VMware Workstation 8. Here’s the configuration:&lt;/p&gt; &lt;p&gt;Host: &lt;a href=&quot;http://blog.malevy.net/2011/05/new-laptop.html&quot;&gt;Windows 7&lt;/a&gt; running VMware Workstation 8&lt;br&gt;Guest: Windows 8 Preview (build 8102), 2GB RAM, 2 processors and 40 GB SCSI hard drive&lt;/p&gt; &lt;p&gt;I installed Visual Studio 11 without any problem other than the fact that it installed SQL Server without giving me any choice for the configuration. The easiest way to remedy that was to uninstall SQL Server and then reinstall it.&lt;/p&gt; &lt;p&gt;You can probably guess that the reinstall didn’t go smoothly. If it had, there’d be no reason for this post, eh?&lt;/p&gt; &lt;p&gt;I started by download the installer from &lt;a href=&quot;http://msdn.microsoft.com/en-us/evalcenter/hh230763&quot; target=&quot;_blank&quot;&gt;MSDN&lt;/a&gt;. There are a few choices depending on whether you wanted 32bit or 64bit, with or without tools. I pulled down the 64bit package that had the tools.&lt;/p&gt; &lt;p&gt;Then I copied it to the VM. &lt;/p&gt; &lt;p&gt;I double-clicked the .EXE, it unpacked into a temporary folder, a command windows briefly flashed and then nothing. So I did what anyone would have done. I double-clicked the .EXE again and watched the same sequence of events unfold. “Ah!” I said. I must need Admin privileges! No problem, I launched a command window as Administrator, navigated to the folder and ran the .EXE. &lt;/p&gt; &lt;p&gt;Same results as before.&lt;/p&gt; &lt;p&gt;I was confused because SQL Server had already been installed on the machine. I had just uninstalled it!&lt;/p&gt; &lt;p&gt;In the process of poking around on the machine, I ended up in the “Turn Windows features on or off” section of the Uninstall dialog. It was in there that I noticed that .NET 3.5 was not enabled. I enabled it, went back to the command prompt and retried the installer.&lt;/p&gt; &lt;p&gt;Something happen this time:&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTtNwCLxH6zCw3PZ3EIOW5QkBCwVVhpYFQDa-MucWYfh2RItKQkX5_4UVVEtFFur3EzPjB74uL6MfhH4ehAGBUmm4RFYoWX3jX8ZBB-tbZa3QVmx5f6lcekBFD0XMNNdXCCahzbiC7606F/s1600-h/image%25255B3%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk_N5qDd1SIuwr9JeX7gMC7Ep-M0bBu-McQQb14GXkAXb0rkXNxAiEeiPuQYy8OfN9-Oy6W_dzJvGRacgpn6O-3GXBPFnHmn8DOrhUm8OVeII2O4SDjHvKqHzBUMRJLOY775jiCMUWxrRP/?imgmax=800&quot; width=&quot;486&quot; height=&quot;287&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The installer can’t find .NET 4.0 but 4.5 is on the box! I hit Continue and the SQL Server Installation Center dialog appeared on the screen.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYKM0Puw9WMQteRsxPls6WdFZo55utj3Y613zzf5DyN5LElX1_hX040TysYpzYGVw9a-tSfEoPlO0YJXvCjFQAfmsHwYexOeEtMODagcGE9eBCuVe5su5TORh4FeXNxiyY_10nrNQX0li8/s1600-h/image%25255B7%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0aPrVjeIKXyyBWTPEZ7yboXow1QQkkvO-kvj3BCNBUc7SYdgJ9BqvRd4ccyiZJMBHvcEOuggH1-mO3gsjjXwNHXv_Mmn-C8vUommDerO29CohwS2_cxobp4I7_Yp5yxesvsdW2Y6CY5-I/?imgmax=800&quot; width=&quot;498&quot; height=&quot;416&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;It was easy sailing from this point!&lt;/p&gt; &lt;p&gt;By the way, you’ll see this windows pop up a lot!&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4JCIHjvLRXtjb2RRaU36F5AhzGJVtHD56TsrXPSUMe_zoGmuxWtoIdxkfBSNaILYBHMH7J0BuAUzsh9wD1W_u21NCk9R9ISJQcvVuyoMFHxa1dse-xq1ENNlhz8rvL3CFPfAOjFcC3Ysw/s1600-h/image%25255B11%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAlULovpLezNdu3uyw31TDKVo8Os5IQaF9sIn3f-UFwWp0mUZ27_2FGTQ-iRhwXhGbzNjoWOVVqBLm7hZ3G38a_5dpkn5ucIVuRn2ymOQm76e3qmV9PK1pzGuU4NEV7pivS-gZ1Ub39zj_/?imgmax=800&quot; width=&quot;688&quot; height=&quot;155&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The installation continued without any problem and I was able to successfully install SQL Server “Denali” CTP3.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHI7wCtI1J2ACvRGm899AWMn80lLZEY3N8A6QiGLnV8y9VsoANcGkCX0xFoNhBHzptsuwnfevyBloPhzhbEHFXaO105uQxYnjEcmA2Qy6D8maserVl-9RGKSJYn55HfEWYvUE2eiFhvPFZ/s1600-h/image%25255B15%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCTx5IkFSllz5S27zx_WFqt_7W6rx1v_Tq2HeETOuv8Mu7E5IQmiFLhfg7biJSjLrw-S89WT6rwx5FxVvC55pnZX0aKoy3kuT4JutVvhUsZcfRAALZr53W5HUgh_1jwiindYzi13GYhIj8/?imgmax=800&quot; width=&quot;494&quot; height=&quot;384&quot;&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;The unhandled exception dialog appeared again when I tried to close the SQL Server Installation Center dialog:&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2NdGFd4i2WLJCEzeEXIUUoeYjRyyGvS8YTLI1iu8i56K7bCFfwFLUz389AKbZ1TSLf3ZvRiVGSDDJg1Bs3kUUjYgUDpx6pNwwbGxJVX4cxvsUVlPc2RpZACH4xhyphenhyphenUlGxcJUPXl-sfog-8/s1600-h/image%25255B19%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYmWCOl4K_hIM3ESg202ciDR7CElAkt5hFxS_Djmmj4HPoSFGnR3Jk0oJWcNGvYUwZvi9go3m4C1rCZ8L_vlpWSsRkznu_qLwpVdAslvVtPeJBSxvlcIyfyTcOuOzsxLA6E0aYLJ1elk-_/?imgmax=800&quot; width=&quot;491&quot; height=&quot;438&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Hitting the Quit button finished closing the dialog.&lt;/p&gt; &lt;p&gt;If you’re curious, here are the SQL Server apps as they appear on the Win8 Start page:&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipoobDM3LEr6tNrucIjbLod3skJvCXDhreRj_LXIMHi7lDb1inpCvKXM8gZl0q4rnxMhkKAqjJ2i56i5n_oUCbL2RQRKTwhja3yODo0UmI_FbNhvMG-ekv09nlYidX5lFeEoqkoiJ4ptv6/s1600-h/image%25255B27%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggz7NresmUaoEKYyXRCynZmALWPDF5kXlu0JAJBkBlHZyBpx3tP2rfTRdcY7u-rYcfT3vQQH0ZRPFB0Dxf8pgl2Pjt4i7Kx4vThgSD4Ga40TcC6525hUDNJ2o4B64GEEhMNZkmfbXAIBnu/?imgmax=800&quot; width=&quot;188&quot; height=&quot;483&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;And here’s the new SQL Server Management Studio&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjnDTTgNKDVDliIlwTk-dUF8RBVinZkBb6Fs4kJJ6IUkh2mhZ1C4b47EaYhaQ2qH_bITV9WSnOQLKU9NdrQDW-i-__oFLUl5TI-k5AbXOFS9QxFVhDMk8hpIRl0ooJnUea17FGe-Korte5/s1600-h/image%25255B35%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPqKNQtt7ZsjN_6Eaz_G8zcA4eLC6PyfBlBzewGcDhwzNy6thu9Ct7o-4e2wV8OW-ls8q2MbVfoJrLYDg_CQwDgN9kbQANapdGGhOabER0E_7kt5XQA-EHLGmljLbIfJSAd5CSlbbS1_To/?imgmax=800&quot; width=&quot;645&quot; height=&quot;359&quot;&gt;&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/6930456787678611946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/09/installing-sql-server-denali-ctp3-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/6930456787678611946'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/6930456787678611946'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/09/installing-sql-server-denali-ctp3-on.html' title='Installing SQL Server “Denali” CTP3 on Windows 8 Preview'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk_N5qDd1SIuwr9JeX7gMC7Ep-M0bBu-McQQb14GXkAXb0rkXNxAiEeiPuQYy8OfN9-Oy6W_dzJvGRacgpn6O-3GXBPFnHmn8DOrhUm8OVeII2O4SDjHvKqHzBUMRJLOY775jiCMUWxrRP/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-2596938827265895324</id><published>2011-09-19T20:27:00.001-04:00</published><updated>2011-09-19T20:27:26.356-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="//build"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Metro"/><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 8"/><category scheme="http://www.blogger.com/atom/ns#" term="XAML"/><title type='text'>Notes from //build/ - Windows 8</title><content type='html'>&lt;p&gt;I attended the Microsoft //build/ conference last week. This was the public world’s second introduction to the next version of company’s OS, Windows 8. It was also the first time that any real depth about the product was provided. The general consensus from those I spoke with was they were very pleased with the features shown.&lt;/p&gt; &lt;h3&gt;Metro style apps&lt;/h3&gt; &lt;p&gt;First, and most obviously, the Metro style from Windows Phone 7 has been brought forward as the primary user experience in Windows 8. Along with that, the OS has been optimized for touch but the stylus, mouse, and keyboard are all still supported. &lt;br&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0iAIN-7qpzL8Vp38D9s1fwgcCSL_HAjrsyB5z562lRKKpGzVFIdLqTftE_yOvJyg0ynlJ8oQxhysgcjJ8U-wpP6549Oh1QUI8Tp_uYh1ve-iXBlZLZCgoPw9oS2DMHH1sC4t4LCtDCFYk/s1600-h/image%25255B3%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghuP8QXbKG_sJJOkQPIo6tRqLITVLIgiphMLpjoZ2766uD6qZvuMfwDKShHxYUIPKGKuF22VZhyJIF7W16Czj-t-Xl5_1miwWnu6rS-tl-OnJrer_IZuXpr7vbOG5TnY7XyLfphM3kb7T6/?imgmax=800&quot; width=&quot;660&quot; height=&quot;411&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;font size=&quot;1&quot;&gt;(Attribution: Microsoft Corp.)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;Note: It was pointed out that the correct capitalization is “Metro style apps” with a lowercase “S” on style and a lowercase “A” on apps.&lt;/em&gt;&lt;/p&gt; &lt;p&gt;The Start button has been morphed from a popup to an entire screen that consists of 1x1 or 2x1 “Live” tiles.&lt;br&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAaagOBN8nwg5v5H_xY32AxOrLWI_lt7chlG13HlYCRol8t-4tlLvohXs-EVh9Fft20ntDHcLLV6rpmdfE04ELQr6fHiCWzFltEqbIm_LPmTPF54ytuXjP7LWkx6gheO311M1rArwlWtSf/s1600-h/image%25255B7%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhTYoz5lzAJ6iKB0emmqKsb8rrqu1P47JXWbxtu1m-zgZmhUD8Of469dnOXG5Og03HZtng1lyml7JrCM7ZNBCz_wtQC2wrvagSWP7JnkkBot4kbp0FGoE2-mAVDoQVQaSx3f5lAUkoQBnM/?imgmax=800&quot; width=&quot;664&quot; height=&quot;430&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt; &lt;p&gt;The Start screen has all the apps that were pinned. There is an Apps screen that can be reached via Search. It contains all the apps that are installed:&lt;br&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOP1UxurCIK2_eNUoi7J8WP35ZV2cwpCf2Qie9Ui-X4CtU6mD5RzP9gsRFuLGTOQR1DiVcY1u8tqutMFfVxNve7a0sLSbrTrb5ZOWvd73-iaPzLUwsZ70CCurCZsLVkLXQrUjOKrMWumfw/s1600-h/image%25255B11%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCLtm-UiZaROiqrmjsEkv75OWkEuzwywYTAl_Ksnq0RS-jTUKIUCC57FzWs30r1mpArxaeuuKj-HhXE32lT_Gis-gHTasgA_ecIyvVQiSr9cSI52j09Blfv454G0OYp3IsBKLDKeQkSTBu/?imgmax=800&quot; width=&quot;677&quot; height=&quot;439&quot;&gt;&lt;/a&gt;&lt;br&gt;You can imagine that this screen could become quite crowded once a user starts installing apps. To help with this, Microsoft has introduced Semantic Zoom. Semantic Zoom used the “pinch zoom” gesture but instead of making the image larger, the entire view can be changed, providing something that is useful. &lt;/p&gt; &lt;p&gt;Using Semantic Zoom on the Apps page changes the view to:&lt;br&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8ticbcZ8E7DvzSM6uptQHucd3ypxj_Zgxqi87y9_rWg2Heo7FNMxKL2zz1BEIBgGVV476SRS3RYzaFkJR_jV5U2b8pQnMgjQPpaq8BJS40CAcyTQHVX1JYWj5yVJEpoFHyo9B3L23opt2/s1600-h/image%25255B15%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaU4wkQgB4-CUav-r6XXXzr6q7JaK82M-meGmKAUIcUE7OmCHI2XXlrBq6N19cZ7iTn7SMPHZU0MJ04bol7mtKamYq-uF8WfV7tJg0pXv4x-iRJl_RI-vgHx0QLow_ikQcvvJT_9mn1aWR/?imgmax=800&quot; width=&quot;692&quot; height=&quot;448&quot;&gt;&lt;/a&gt;&lt;br&gt;Semantic View was demonstrated on the Start page for the keynote, but it has been disabled in the Windows 8 preview that Microsoft released to the public.&lt;br&gt;&lt;/p&gt; &lt;h3&gt;Live Tiles&lt;/h3&gt; &lt;p&gt;The content of the tiles can change to reflect information that is important to the user. The intent is to create a personal connection with the user. For example, the Stocks application will cycle the most recent information for each stock symbol that the user has added to the application. This will continue even if the application has been suspended.&lt;/p&gt; &lt;p&gt;&lt;br&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZoOuuMC72EEEXtmNcf6rhLZ8lHKNxhLtBRjNBuV4SVGhe00dX_wgEskV4-BheBeyME9_-bb5cd-mDcjVQma3aMeyYXOA15Jew3SVt07TlERWqDF33w8dT9HFYehCGJVp4oeHnBYiRU-Q6/s1600-h/image%25255B19%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIh8cryi08USmu_1gldM5CPdmNCKSKKYEXO3n91hHm_YBLuaK5e6tfD9xwvcDMuBWr4wG5HtLKwab8AvWp6eusbvXFeyE8g7SkzXKtAgS5zxDn2KY4l5p8mGa0SVfE73bgrAendrxbIlqd/?imgmax=800&quot; width=&quot;374&quot; height=&quot;268&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt; &lt;h3&gt;Suspended?&lt;/h3&gt; &lt;p&gt;Yes. When the user navigates away from an app, the app will be suspended. The app will be notified that it is being suspended and given an opportunity to save any transient state. When the app is launched, it will be given an opportunity to restore that state. This is the Tombstone functionality that is currently used by Windows Phone 7 applications.&lt;br&gt;There is no concept of closing an app within the Metro style. Windows 8 will take of that for you. &lt;br&gt;&lt;/p&gt; &lt;h3&gt;Developing apps&lt;/h3&gt; &lt;p&gt;A controversy was created when Windows 8 was first introduced to the public. Microsoft announced that HTML5 and JavaScript were the tools that would be used to create the new Metro style apps. At //build/ we learned the truth: Use what you know.&lt;/p&gt; &lt;p&gt;&lt;br&gt;“Use what you know” was the tagline attached to the conference title and the message that Microsoft was delivering. At //BUILD/ Microsoft introduced a new development platform for Windows: Windows RunTime or WinRT. Using WinRT, a developer can create Metro style apps using:&lt;/p&gt; &lt;p&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; C/C++&lt;br&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; C#, VB.Net &lt;br&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; HTML5 &amp;amp; JavaScript&lt;br&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDpsbelsLutiu36Y1K0N_17dMni-owbrarBz9HS3c3KFzvSYXoiBk4ZTWQf_8o9bozQ7K7Lw8gxAeB-GMzRRsazzhAl8e4KIcYJutUkepEbGuLuWuNqysvP7VzA0HT9hRub5fuDTzCzg7m/s1600-h/image%25255B23%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiatR3QNVKd917R2SPP3gsXvXI7JbkU0wRc6MwPnfzChFcaTyZ1dZ_gQCvKAXQBRzqhUxkhXf3-xmTwj-8KHVfNeTlN_5PkpCZ8I3p-G-s6OsaL62HQuS8u5cjVSzSoWWAS2BqFx1jAwd2e/?imgmax=800&quot; width=&quot;643&quot; height=&quot;379&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;font size=&quot;1&quot;&gt;(Attribution: Microsoft Corp.)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;The best way to think of WinRT is as the Base Class Libraries for Metro style apps. &lt;br&gt;I plan to do another article that addresses WinRT.&lt;br&gt;&lt;/p&gt; &lt;h3&gt;And .NET?&lt;/h3&gt; &lt;p&gt;.Net is still an applicable platform for developing both Metro style and Desktop (think traditional) apps. Not all of the .Net framework is exposed when developing a Metro style app. Where there is functionality that is duplicated with WinRT, or not allowed, those .NET APIs have been hidden.&lt;br&gt;&lt;/p&gt; &lt;h3&gt;Is Silverlight dead?&lt;/h3&gt;&lt;br&gt; &lt;p&gt;Microsoft did not deliver any message about Silverlight during the conference. Silverlight will be supported in the Desktop version of IE (The Metro style version of IE does not allow any plugins, for security and stability). I don’t expect Microsoft to make any announcement about Silverlight in the near term. This is a preview version of Windows 8. We are a long time from RTM. &lt;br&gt;There are still a lot of solutions to deliver, and since Silverlight will continue to be supported by Windows 8, I feel that Silverlight is still a valid solution platform.&lt;br&gt;&lt;/p&gt; &lt;h3&gt;Is a Metro style app written in HTML5 &amp;amp; JavaScript accessible via the browser?&lt;/h3&gt;&lt;br&gt; &lt;p&gt;Nope. A Metro style app is not a web page. They must be installed from the App store (consumers) or side-loaded (Enterprise).&amp;nbsp; Don’t let the HTML5 &amp;amp; JavaScript fool you. This is just the choice of presentation platform and language. It is no different from choosing XAML and C#.&lt;br&gt;&lt;/p&gt; &lt;h3&gt;Getting started&lt;/h3&gt; &lt;p&gt;The keynotes, and most of the sessions, were recorded and are available on the //BUILD/ website (www.buildwindows.com). &lt;br&gt;The preview of Windows 8 can be downloaded from the Windows Dev Center (&lt;a href=&quot;http://msdn.microsoft.com/en-us/windows/apps/br229516)&quot;&gt;http://msdn.microsoft.com/en-us/windows/apps/br229516)&lt;/a&gt;. One download contains a preview of both Visual Studio Express 11 and Expression Blend. If you’d rather install them yourself, you can download them separately from the Visual Studio website: (&lt;a href=&quot;http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=27543)&quot;&gt;http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=27543)&lt;/a&gt;. &lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/2596938827265895324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/09/notes-from-build-windows-8.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/2596938827265895324'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/2596938827265895324'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/09/notes-from-build-windows-8.html' title='Notes from //build/ - Windows 8'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghuP8QXbKG_sJJOkQPIo6tRqLITVLIgiphMLpjoZ2766uD6qZvuMfwDKShHxYUIPKGKuF22VZhyJIF7W16Czj-t-Xl5_1miwWnu6rS-tl-OnJrer_IZuXpr7vbOG5TnY7XyLfphM3kb7T6/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-2616352582550888401</id><published>2011-06-06T22:35:00.001-04:00</published><updated>2011-06-06T22:35:35.936-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="JSON"/><category scheme="http://www.blogger.com/atom/ns#" term="WCF"/><category scheme="http://www.blogger.com/atom/ns#" term="XML"/><title type='text'>Messin’ with the WCF Web API, part II – Content Negotiation &amp;amp; Formatters</title><content type='html'>&lt;p&gt;In the &lt;a href=&quot;http://blog.malevy.net/2011/06/messin-with-wcf-web-api.html&quot;&gt;last post&lt;/a&gt;, I briefly introduced the WCF Web API and walked through the creation of the first service that I constructed as I was experimenting with the framework. WCF Web API has a couple more tricks that it does. In this post I’d like to look at Formatters and their part in Content Negotiation.&lt;/p&gt; &lt;h3&gt;Content Negotiation&lt;/h3&gt; &lt;p&gt;In section 6.3.2.7 of his dissertation, &lt;u&gt;Architectural Styles and the Design of Network-based Software Architectures&lt;/u&gt;, Roy Fielding describes Content Negotiation:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;All resources map a request (consisting of method, identifier, request-header fields, and&lt;br&gt;sometimes a representation) to a response (consisting of a status code, response-header&lt;br&gt;fields, and sometimes a representation). When an HTTP request maps to multiple&lt;br&gt;representations on the server, the server may engage in content negotiation with the client in order to determine which one best meets the client’s needs. This is really more of a “content selection” process than negotiation.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;So what does this mean? Let’s take a look at this in action. I’ll use the service that I built in the last &lt;a href=&quot;http://blog.malevy.net/2011/06/messin-with-wcf-web-api.html&quot;&gt;post&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Using &lt;a href=&quot;http://www.fiddler2.com/fiddler2/&quot;&gt;Fiddler&lt;/a&gt; I captured the request to retrieve the Xbox game with the ID of 12. That request looks like:&lt;/p&gt;GET &lt;a href=&quot;http://localhost:1064/MessinWebApi/games/12&quot;&gt;http://localhost:1064/MessinWebApi/games/12&lt;/a&gt; HTTP/1.1&lt;br&gt;&lt;font style=&quot;background-color: #ffff00&quot;&gt;Accept: application/xml&lt;/font&gt;&lt;br&gt;Accept-Language: en-US&lt;br&gt;User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)&lt;br&gt;Accept-Encoding: gzip, deflate&lt;br&gt;Connection: Keep-Alive&lt;br&gt;Host: localhost:1064  &lt;p&gt;And the response:&lt;/p&gt; &lt;p&gt;HTTP/1.1 200 OK&lt;br&gt;Cache-Control: private&lt;br&gt;Content-Length: 405&lt;br&gt;&lt;font style=&quot;background-color: #ffff00&quot;&gt;Content-Type: application/xml; charset=utf-8&lt;/font&gt;&lt;br&gt;Server: Microsoft-IIS/7.5&lt;br&gt;X-AspNet-Version: 4.0.30319&lt;br&gt;X-SourceFiles: =?UTF-8?B?QzpcVXNlcnNcTWlrZVxEb2N1bWVudHNcVmlzdWFsIFN0dWRpbyAyMDEwXFByb2plY3RzXE1lc3NpbldlYkFwaVxNZXNzaW5XZWJBcGlPbmVcTWVzc2luV2ViQXBpT25lXGdhbWVzXDEy?=&lt;br&gt;X-Powered-By: ASP.NET&lt;br&gt;Date: Mon, 06 Jun 2011 00:51:12 GMT&lt;/p&gt; &lt;p&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&amp;lt;Game&amp;gt;&amp;lt;Id&amp;gt;12&amp;lt;/Id&amp;gt;&amp;lt;Description&amp;gt;James Cameron&#39;s Dark Angel&amp;lt;/Description&amp;gt;&amp;lt;Developer&amp;gt;Radical Entertainment&amp;lt;/Developer&amp;gt;&amp;lt;Genre&amp;gt;&amp;lt;Id&amp;gt;53&amp;lt;/Id&amp;gt;&amp;lt;Name&amp;gt;Action&amp;lt;/Name&amp;gt;&amp;lt;/Genre&amp;gt;&amp;lt;Name&amp;gt;James Cameron&#39;s Dark Angel&amp;lt;/Name&amp;gt;&amp;lt;Price&amp;gt;49.990000&amp;lt;/Price&amp;gt;&amp;lt;Publisher&amp;gt;Radical Entertainment&amp;lt;/Publisher&amp;gt;&amp;lt;Rating&amp;gt;&amp;lt;Id&amp;gt;4&amp;lt;/Id&amp;gt;&amp;lt;Name&amp;gt;T (Teen)&amp;lt;/Name&amp;gt;&amp;lt;/Rating&amp;gt;&amp;lt;ReleaseDate&amp;gt;2002-09-01T00:00:00&amp;lt;/ReleaseDate&amp;gt;&amp;lt;/Game&amp;gt;&lt;/p&gt; &lt;p&gt;And again:&lt;/p&gt; &lt;p&gt;GET &lt;a href=&quot;http://localhost:1064/MessinWebApi/games/12&quot;&gt;http://localhost:1064/MessinWebApi/games/12&lt;/a&gt; HTTP/1.1&lt;br&gt;&lt;font style=&quot;background-color: #ffff00&quot;&gt;Accept: application/json&lt;br&gt;&lt;/font&gt;Accept-Language: en-US&lt;br&gt;User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)&lt;br&gt;Accept-Encoding: gzip, deflate&lt;br&gt;Connection: Keep-Alive&lt;br&gt;Host: localhost:1064&lt;/p&gt; &lt;p&gt;And the response:&lt;/p&gt; &lt;p&gt;HTTP/1.1 200 OK&lt;br&gt;Cache-Control: private&lt;br&gt;Content-Length: 293&lt;br&gt;&lt;font style=&quot;background-color: #ffff00&quot;&gt;Content-Type: application/json; charset=utf-8&lt;/font&gt;&lt;br&gt;Server: Microsoft-IIS/7.5&lt;br&gt;X-AspNet-Version: 4.0.30319&lt;br&gt;X-SourceFiles: =?UTF-8?B?QzpcVXNlcnNcTWlrZVxEb2N1bWVudHNcVmlzdWFsIFN0dWRpbyAyMDEwXFByb2plY3RzXE1lc3NpbldlYkFwaVxNZXNzaW5XZWJBcGlPbmVcTWVzc2luV2ViQXBpT25lXGdhbWVzXDEy?=&lt;br&gt;X-Powered-By: ASP.NET&lt;br&gt;Date: Mon, 06 Jun 2011 00:53:54 GMT&lt;/p&gt; &lt;p&gt;{&quot;Description&quot;:&quot;James Cameron&#39;s Dark Angel&quot;,&quot;Developer&quot;:&quot;Radical Entertainment&quot;,&quot;Genre&quot;:{&quot;Id&quot;:53,&quot;Name&quot;:&quot;Action&quot;},&quot;Id&quot;:12,&quot;Name&quot;:&quot;James Cameron&#39;s Dark Angel&quot;,&quot;Price&quot;:49.990000,&quot;Publisher&quot;:&quot;Radical Entertainment&quot;,&quot;Rating&quot;:{&quot;Id&quot;:4,&quot;Name&quot;:&quot;T (Teen)&quot;},&quot;ReleaseDate&quot;:&quot;\/Date(1030852800000-0400)\/&quot;}&lt;/p&gt; &lt;p&gt;Now I didn’t make any changes to the service between those two requests. I only changed the &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html&quot;&gt;Accept header&lt;/a&gt; in the request. For the first request I used a value of &lt;strong&gt;application/xml&lt;/strong&gt; and &lt;strong&gt;application/json&lt;/strong&gt; was used in the second. This is Content Negotiation. The client (Fiddler in this case) is using the Accept header to indicate the response formats that it can handle.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;Note: To be fair, Content Negotiation can also be used to specify other preferences like encodings and language.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The client is free to indicate more than one format, or Media Type, as the value for the Accept header. The convention is that the values are specified in order of preference. The service is then free to use any of the specified formats that it can reproduce.&lt;/p&gt; &lt;p&gt;The role of rendering a response into the requested media type falls to the Formatters. These are components of the &lt;a href=&quot;http://codebetter.com/glennblock/2011/05/17/message-handlers-vs-operation-handlers-which-one-to-use-2/&quot;&gt;pipeline&lt;/a&gt; that I mentioned in the first post. The reason that I’m bringing this up at this point in time, seemingly out of order, is to introduce the base functionality that you get for free: the ability to product XML and JSON straight out of the box.&lt;/p&gt; &lt;h3&gt;Custom Formatters&lt;/h3&gt; &lt;p&gt;Xml and JSON are covered. You’ll need a custom formatter for anything else and luckily Microsoft has made it super easy to create them. The complexity required is dependent on the representation of the response that you’re trying to create. To demonstrate this, I’m going to create a custom formatter that returns the cover image for each game. When &lt;a href=&quot;http://wildermuth.com/2009/12/19/XBoxGames_Databases_for_SQL_Server_2005_and_2008&quot;&gt;Shawn Wildermuth&lt;/a&gt; put together the &lt;a href=&quot;http://wildermuth.com/2009/12/19/XBoxGames_Databases_for_SQL_Server_2005_and_2008&quot;&gt;Xbox games sample database&lt;/a&gt;, he included the cover image, as a jpg, in the Games table. My custom formatter is going to take the image and stream it back to the caller.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;Note: I wish I could claim this as an original idea but it’s not. The sample application that ships with the WCF Web API has &lt;/em&gt;&lt;a href=&quot;http://www.quotedb.com/quotes/810&quot;&gt;&lt;em&gt;similar&lt;/em&gt;&lt;/a&gt;&lt;em&gt; functionality. I’m just translating the functionality as appropriate for this data set.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;To start I need to have Entity Framework return the Image column when a game is retrieved. To accomplish this I just have to add a property to the Game class with the same name as the field in the table:&lt;/p&gt; &lt;div class=&quot;csharpcode&quot;&gt;&lt;pre class=&quot;alt&quot;&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; Game&lt;/pre&gt;&lt;pre&gt;    {&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; Id { get; set; }&lt;/pre&gt;&lt;pre&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Description { get; set; }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Developer { get; set; }&lt;/pre&gt;&lt;pre&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; Genre Genre { get; set; }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Name { get; set; }&lt;/pre&gt;&lt;pre&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;decimal&lt;/span&gt;? Price { get; set; }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Publisher { get; set; }&lt;/pre&gt;&lt;pre&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; Rating Rating { get; set; }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; DateTime? ReleaseDate { get; set; }&lt;/pre&gt;&lt;pre&gt;        &lt;font style=&quot;background-color: #ffff00&quot;&gt;&lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;byte&lt;/span&gt;[] Image { get; set; }&lt;/font&gt;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;    }&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type=&quot;text/css&quot;&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Next I create a new folder in the solution called Formatters and add the following new class, ImageFormatter:&lt;/p&gt;&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;pre class=&quot;alt&quot;&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; ImageFormatter : MediaTypeFormatter&lt;/pre&gt;&lt;pre&gt;    {&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; ImageFormatter()&lt;/pre&gt;&lt;pre&gt;        {&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            &lt;span class=&quot;kwrd&quot;&gt;this&lt;/span&gt;.SupportedMediaTypes.Add(&lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; MediaTypeHeaderValue(&lt;span class=&quot;str&quot;&gt;&quot;image/jpeg&quot;&lt;/span&gt;));&lt;/pre&gt;&lt;pre&gt;        }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;        &lt;span class=&quot;kwrd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;bool&lt;/span&gt; OnCanReadType(Type type)&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        {&lt;/pre&gt;&lt;pre&gt;            &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        }&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;bool&lt;/span&gt; OnCanWriteType(Type type)&lt;/pre&gt;&lt;pre&gt;        {&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;typeof&lt;/span&gt; (Game) == type;&lt;/pre&gt;&lt;pre&gt;        }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt; OnReadFromStream(Type type, Stream stream, HttpContentHeaders contentHeaders)&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        {&lt;/pre&gt;&lt;pre&gt;            &lt;span class=&quot;kwrd&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; NotImplementedException();&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        }&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; OnWriteToStream(Type type, &lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;value&lt;/span&gt;, Stream stream, HttpContentHeaders contentHeaders, TransportContext context)&lt;/pre&gt;&lt;pre&gt;        {&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            var game = &lt;span class=&quot;kwrd&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;as&lt;/span&gt; Game;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            &lt;span class=&quot;rem&quot;&gt;// it would probably be better to write some null image - {shurg}&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;            &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;kwrd&quot;&gt;null&lt;/span&gt; == game) &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt;;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;kwrd&quot;&gt;null&lt;/span&gt; == game.Image) &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt;;&lt;/pre&gt;&lt;pre&gt;            &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (0 == game.Image.Length) &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt;;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;            stream.Write(game.Image, 0, game.Image.Length);&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;            contentHeaders.ContentType = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; MediaTypeHeaderValue(&lt;span class=&quot;str&quot;&gt;&quot;image/jpeg&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        }&lt;/pre&gt;&lt;pre&gt;    }&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type=&quot;text/css&quot;&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I believe the code is pretty simple to follow. I just want to point out a couple of things. In the ctor, I’m adding the image/jpeg media type to the collection of media types supported by this formatter. I’ve also provided an override for the OnCanWriteType() method. With those two pieces in place, I’m instructing the WCF Web API pipeline that this formatter can create an image/jpeg representation of instances of Game.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The last piece is to adjust the configuration so that WCF Web API will include the formatter in the pipeline. This is done when the routes are registered in Global.asax:&lt;/p&gt;&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; RegisterRoutes(RouteCollection routes)&lt;/pre&gt;&lt;pre&gt;        {&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            routes.IgnoreRoute(&lt;span class=&quot;str&quot;&gt;&quot;{resource}.axd/{*pathInfo}&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            &lt;font style=&quot;background-color: #ffff00&quot;&gt;var config = HttpHostConfiguration.Create()&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;                &lt;font style=&quot;background-color: #ffff00&quot;&gt;.AddFormatters(&lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; ImageFormatter());&lt;/font&gt;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;            &lt;font style=&quot;background-color: #ffff00&quot;&gt;routes.MapServiceRoute&amp;lt;GamesResource&amp;gt;(&lt;span class=&quot;str&quot;&gt;&quot;games&quot;&lt;/span&gt;, config);&lt;/font&gt;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;            routes.MapRoute(&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;                &lt;span class=&quot;str&quot;&gt;&quot;Default&quot;&lt;/span&gt;, &lt;span class=&quot;rem&quot;&gt;// Route name&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;                &lt;span class=&quot;str&quot;&gt;&quot;{controller}/{action}/{id}&quot;&lt;/span&gt;, &lt;span class=&quot;rem&quot;&gt;// URL with parameters&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;                &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; { controller = &lt;span class=&quot;str&quot;&gt;&quot;Home&quot;&lt;/span&gt;, action = &lt;span class=&quot;str&quot;&gt;&quot;Index&quot;&lt;/span&gt;, id = UrlParameter.Optional } &lt;span class=&quot;rem&quot;&gt;// Parameter defaults&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;            );&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        }&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type=&quot;text/css&quot;&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;To retrieve the cover image, I make a request for a specific game, just as in the previous two examples, but use the value &quot;image/jpeg” for the Accept header:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;GET &lt;a href=&quot;http://localhost:1064/MessinWebApi/games/12&quot;&gt;http://localhost:1064/MessinWebApi/games/12&lt;/a&gt; HTTP/1.1&lt;br&gt;&lt;font style=&quot;background-color: #ffff00&quot;&gt;Accept: image/jpeg&lt;/font&gt;&lt;br&gt;Accept-Language: en-US&lt;br&gt;User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)&lt;br&gt;Accept-Encoding: gzip, deflate&lt;br&gt;Connection: Keep-Alive&lt;br&gt;Host: localhost:1064&lt;br&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Fiddler is kind enough to render the image for me:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUF7LUDd11ihmQsOXvrM7r0qMce2zKt676oRKV2UhCQgHQb_Vr16EboP-nQs2mnoBKC_3tA_qt3fF0YUx5kVs4DIjeAGAz-o7aH7mUz28z4QS8pndzi59FssnaF2EoD1iGgl87ESiA2hRP/s1600-h/image3.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGkQmUA6BE_5IOfHjsAGadZTlKrT-CyTSJPG9aB19M7Y-XywfXvgx2p-wM64lMAXYIVRliTdHpFK0z3RslGGFpPo32yNDjplnwiyB_6f3JoSETlIKhjuJF0Wy6qUkawwrZhBe0lHm-awa2/?imgmax=800&quot; width=&quot;671&quot; height=&quot;560&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;Note: the art of the cover image is probably copy written by someone. All rights belong to them.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;Formatters are a key component of the pipeline. A formatter will be responsible for creating a representation of a resource and the WCF Web API will handle engaging the correct formatter based on the Accept header in the request.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/2616352582550888401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/06/messin-with-wcf-web-api-part-ii-content.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/2616352582550888401'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/2616352582550888401'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/06/messin-with-wcf-web-api-part-ii-content.html' title='Messin’ with the WCF Web API, part II – Content Negotiation &amp;amp; Formatters'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGkQmUA6BE_5IOfHjsAGadZTlKrT-CyTSJPG9aB19M7Y-XywfXvgx2p-wM64lMAXYIVRliTdHpFK0z3RslGGFpPo32yNDjplnwiyB_6f3JoSETlIKhjuJF0Wy6qUkawwrZhBe0lHm-awa2/s72-c?imgmax=800" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-104295389854191640</id><published>2011-06-05T18:08:00.001-04:00</published><updated>2011-06-05T18:08:56.346-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><category scheme="http://www.blogger.com/atom/ns#" term="WCF"/><category scheme="http://www.blogger.com/atom/ns#" term="XML"/><title type='text'>Messin’ with the WCF Web API</title><content type='html'>&lt;p&gt;Back in April, Microsoft released the fourth preview of WCF Web API on &lt;a href=&quot;http://wcf.codeplex.com/releases/view/64449&quot;&gt;CodePlex&lt;/a&gt;. The intent of the WCF Web API is to make it easier to expose application data and services over HTTP. I’ve seen a lot of people throw in the REST descriptor but I’m not ready to go there yet.&lt;/p&gt; &lt;p&gt;I’ve spent the last couple of weeks playing with the WCF Web API and I’ve decided to put what I’ve learned out there for others. I’m imagining a series of posts but we’ll have to see where my schedule allows me to go.&lt;/p&gt; &lt;p&gt;In this first post, I want to basically put down the steps that I used to get started; consider this a step above the traditional &lt;a href=&quot;http://en.wikipedia.org/wiki/Hello_World&quot;&gt;Hello World program&lt;/a&gt;.&lt;/p&gt; &lt;h3&gt;It’s all about the data&lt;/h3&gt; &lt;p&gt;To get started, I first needed something to serve up. There is always the typical Northwind or AdventureWorks database that everyone is probably already familiar with. Instead, I went for something different. &lt;a href=&quot;http://wildermuth.com/&quot;&gt;Shawn Wildermuth&lt;/a&gt; has been kind enough to to make available a &lt;a href=&quot;http://wildermuth.com/2009/12/19/XBoxGames_Databases_for_SQL_Server_2005_and_2008&quot;&gt;database&lt;/a&gt; of XBox games. I’m running SQL Server 2008 so I grabbed the appropriate zip file and attached the database that is contained within it.&lt;/p&gt; &lt;p&gt;Next I need a host. A WCF service can be hosted within a number of application. I going to use an ASP.NET MVC 3 Application.&lt;/p&gt; &lt;p&gt;As long as I’m playing with new tech, I’m going to use the Code First features of Entity Framework 4. If you’re following along at home and Entity Framework isn’t already installed, you can get it via &lt;a href=&quot;http://nuget.codeplex.com/&quot;&gt;NuGet&lt;/a&gt;. The package name is &lt;a href=&quot;http://nuget.org/List/Packages/EntityFramework&quot;&gt;EntityFramework&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The next thing is to create some classes that EF will use to expose the data in the Xbox games database. I’ll create three: Game, Genre and Rating and put them in the Models folder. This seemed like a good enough place to store them for now. I can always move them later.&lt;/p&gt; &lt;div class=&quot;csharpcode&quot;&gt;&lt;pre class=&quot;alt&quot;&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; Game&lt;/pre&gt;&lt;pre&gt;    {&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; Id { get; set; }&lt;/pre&gt;&lt;pre&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Description { get; set; }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Developer { get; set; }&lt;/pre&gt;&lt;pre&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; Genre Genre { get; set; }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Name { get; set; }&lt;/pre&gt;&lt;pre&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;decimal&lt;/span&gt;? Price { get; set; }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Publisher { get; set; }&lt;/pre&gt;&lt;pre&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; Rating Rating { get; set; }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; DateTime? ReleaseDate { get; set; }&lt;/pre&gt;&lt;pre&gt;    }&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type=&quot;text/css&quot;&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;pre class=&quot;alt&quot;&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; Genre&lt;/pre&gt;&lt;pre&gt;    {&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; Id { get; set; }&lt;/pre&gt;&lt;pre&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Name { get; set; }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;    }&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type=&quot;text/css&quot;&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;pre class=&quot;alt&quot;&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; Rating&lt;/pre&gt;&lt;pre&gt;    {&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; Id { get; set; }&lt;/pre&gt;&lt;pre&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Name { get; set; }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;    }&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type=&quot;text/css&quot;&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The data is accessed through an instance of DbContext. Mine looks like this:&lt;/p&gt;&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;pre class=&quot;alt&quot;&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; XBoxGames : DbContext&lt;/pre&gt;&lt;pre&gt;    {&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; DbSet&amp;lt;Game&amp;gt; Games { get; set; }&lt;/pre&gt;&lt;pre&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; DbSet&amp;lt;Genre&amp;gt; Genres { get; set; }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; DbSet&amp;lt;Rating&amp;gt; Ratings { get; set; }&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; OnModelCreating(DbModelBuilder modelBuilder)&lt;/pre&gt;&lt;pre&gt;        {&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            &lt;span class=&quot;kwrd&quot;&gt;base&lt;/span&gt;.OnModelCreating(modelBuilder);&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            modelBuilder.Entity&amp;lt;Genre&amp;gt;().ToTable(&lt;span class=&quot;str&quot;&gt;&quot;Genres&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;SimpleGames&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;            modelBuilder.Entity&amp;lt;Genre&amp;gt;().HasKey(g =&amp;gt; g.Id);&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            modelBuilder.Entity&amp;lt;Genre&amp;gt;().Property(g =&amp;gt; g.Id).HasColumnName(&lt;span class=&quot;str&quot;&gt;&quot;GenreID&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            modelBuilder.Entity&amp;lt;Rating&amp;gt;().ToTable(&lt;span class=&quot;str&quot;&gt;&quot;Ratings&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;SimpleGames&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;            modelBuilder.Entity&amp;lt;Rating&amp;gt;().HasKey(g =&amp;gt; g.Id);&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            modelBuilder.Entity&amp;lt;Rating&amp;gt;().Property(r =&amp;gt; r.Id).HasColumnName(&lt;span class=&quot;str&quot;&gt;&quot;RatingID&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            modelBuilder.Entity&amp;lt;Game&amp;gt;().ToTable(&lt;span class=&quot;str&quot;&gt;&quot;Games&quot;&lt;/span&gt;, &lt;span class=&quot;str&quot;&gt;&quot;SimpleGames&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;            modelBuilder.Entity&amp;lt;Game&amp;gt;().HasKey(g =&amp;gt; g.Id);&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            modelBuilder.Entity&amp;lt;Game&amp;gt;().Property(g =&amp;gt; g.Id).HasColumnName(&lt;span class=&quot;str&quot;&gt;&quot;GameID&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            modelBuilder.Entity&amp;lt;Game&amp;gt;()&lt;/pre&gt;&lt;pre&gt;                .HasOptional(g =&amp;gt; g.Genre)&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;                .WithMany()&lt;/pre&gt;&lt;pre&gt;                .Map(m =&amp;gt; m.MapKey(&lt;span class=&quot;str&quot;&gt;&quot;Genre&quot;&lt;/span&gt;));&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;            modelBuilder.Entity&amp;lt;Game&amp;gt;()&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;                .HasOptional(g =&amp;gt; g.Rating)&lt;/pre&gt;&lt;pre&gt;                .WithMany()&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;                .Map(m=&amp;gt;m.MapKey(&lt;span class=&quot;str&quot;&gt;&quot;Rating&quot;&lt;/span&gt;));&lt;/pre&gt;&lt;pre&gt;        }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;    }&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type=&quot;text/css&quot;&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The three properties Games, Genres and Ratings are used to access and manipulate the data using Linq. The OnModelCreating() override is the key to the Code First implementation. This method contains the mapping of the tables to the classes and defines the relationships between the tables, in terms of the classes.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The last item is to tell Entity Framework where to find the database. I’ve added the following connection string to the web.config file:&lt;/p&gt;&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;pre class=&quot;alt&quot;&gt;  &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;connectionStrings&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;XBoxGames&quot;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;         &lt;span class=&quot;attr&quot;&gt;connectionString&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;data source=.\SQLEXPRESS; Integrated Security=SSPI; database=XBoxGames&quot;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;          &lt;span class=&quot;attr&quot;&gt;providerName&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;System.Data.SqlClient&quot;&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;  &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;connectionStrings&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type=&quot;text/css&quot;&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;br /&gt;&lt;h3&gt;Resources&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;The next step is to expose the game data over HTTP. If you were wondering when I’d get to WCF Web API, well, that’s now. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Like EntityFramework, WCF Web API can be added to the project using NuGet. The package to install is &lt;a href=&quot;http://nuget.org/List/Packages/WebApi.All&quot;&gt;WebApi.All&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNAPJK_M5V-o1TprWkv5MB81RSegSINgbvg-AR30oAKZ_gvryVMAl1BYRYVBoaP9MqU6CtUhfJNWJgTUK6ZwCSjLN2_T6IYcSwMwFW-4T978uFC6RFN3nw_0J2uB-gjLR0KhegO-is3zVO/s1600-h/image3.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifu-sb0D_4QWpm7b6TmRBMhe0FZxZT0nVtlKQlEQxMhbxRk0R6Od2wzFk2DDzVJU8w37VbY3qYHcO_ferhNk3eIePB9SxSA7fxkzO1vbrYP6qa1jdFOcgHEccGAf6r7lWg569WU-NK_UyS/?imgmax=800&quot; width=&quot;688&quot; height=&quot;434&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The nice thing about using NuGet to add libraries to your solution is that it will automatically pickup any dependencies that are required. I needed four. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;I’ve decided to create a resource called GamesResource and expose it over HTTP. &lt;/p&gt;&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;pre class=&quot;alt&quot;&gt;    [ServiceContract]&lt;/pre&gt;&lt;pre&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; GamesResource&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;    {&lt;/pre&gt;&lt;pre&gt;        [WebGet(UriTemplate = &quot;&quot;)]&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; List&amp;lt;Game&amp;gt; GetGames()&lt;/pre&gt;&lt;pre&gt;        {&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;            &lt;span class=&quot;kwrd&quot;&gt;using&lt;/span&gt; (var gamesRepository = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; XBoxGames())&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            {&lt;/pre&gt;&lt;pre&gt;                &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; gamesRepository&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;                    .Games&lt;/pre&gt;&lt;pre&gt;                    .AsNoTracking()&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;                    .OrderBy(g =&amp;gt; g.Id)&lt;/pre&gt;&lt;pre&gt;                    .Include(&lt;span class=&quot;str&quot;&gt;&quot;Genre&quot;&lt;/span&gt;)&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;                    .Include(&lt;span class=&quot;str&quot;&gt;&quot;Rating&quot;&lt;/span&gt;)&lt;/pre&gt;&lt;pre&gt;                    .ToList();&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            }&lt;/pre&gt;&lt;pre&gt;        }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;    }&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type=&quot;text/css&quot;&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Accessing this resource will return a list of all the games, sorted by the game ID.&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;Note: Returning the entire table via HTTP is probably a very unlikely scenario, if for no other reason than you are stressing your network and server resources. The most common mitigation is to provide either filtering or paging capabilities. I plan to add paging in a future post.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;The last thing that I have to do is add some configuration that exposes the new GamesResource. Within Global.asax.cs, I’ve changed the RegisterRoutes() method to:&lt;/p&gt;&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;pre class=&quot;alt&quot;&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; RegisterRoutes(RouteCollection routes)&lt;/pre&gt;&lt;pre&gt;        {&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            routes.IgnoreRoute(&lt;span class=&quot;str&quot;&gt;&quot;{resource}.axd/{*pathInfo}&quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            &lt;font style=&quot;background-color: #ffff00&quot;&gt;routes.MapServiceRoute&amp;lt;GamesResource&amp;gt;(&lt;span class=&quot;str&quot;&gt;&quot;games&quot;&lt;/span&gt;);&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            routes.MapRoute(&lt;/pre&gt;&lt;pre&gt;                &lt;span class=&quot;str&quot;&gt;&quot;Default&quot;&lt;/span&gt;, &lt;span class=&quot;rem&quot;&gt;// Route name&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;                &lt;span class=&quot;str&quot;&gt;&quot;{controller}/{action}/{id}&quot;&lt;/span&gt;, &lt;span class=&quot;rem&quot;&gt;// URL with parameters&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;                &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; { controller = &lt;span class=&quot;str&quot;&gt;&quot;Home&quot;&lt;/span&gt;, action = &lt;span class=&quot;str&quot;&gt;&quot;Index&quot;&lt;/span&gt;, id = UrlParameter.Optional } &lt;span class=&quot;rem&quot;&gt;// Parameter defaults&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            );&lt;/pre&gt;&lt;pre&gt;        }&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type=&quot;text/css&quot;&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, &quot;Courier New&quot;, courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The call to MapServiceRoute() exposes the GamesResource as an Uri whose path starts with “games”. For example, the Uri &lt;a href=&quot;http://localhost/games&quot;&gt;http://localhost/games&lt;/a&gt; would be directed to our GetGames() method within GamesResource.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Starting the site with F5 and navigating to the games resource (for me is: &lt;a title=&quot;http://localhost:1064/MessinWebApi/games&quot; href=&quot;http://localhost:1064/MessinWebApi/games&quot;&gt;http://localhost:1064/MessinWebApi/games&lt;/a&gt;) displays the list of games, encoded using Xml!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtOILYM1Jod4LeCJkZ104eO930xQkZlrNPOpClL5ViV2HDvLurkQGBTeBKCIa2YfcLOWh-rH_DoHXgml4pWobehgG_P_Eqy0SKdXePlbtlvHtH2HUOesP15JDOt4Zukr2Y68Q-om-2J_tC/s1600-h/image8.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcusMX33o_IzrWYwgXG2IQtI1CcbloE8KKXRxmrGu524BEQqep6MrHpiuXDNrLV57QESv-1Lr8PpYgKGl-YSu2U_acTD9NcWTjXeMfoNWaOTjefs38jMt4BI-iVKPt-ujyo5Q709GlwERE/?imgmax=800&quot; width=&quot;702&quot; height=&quot;585&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Returning a single game&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;I now want to allow the consumer of my service to fetch a single game using an Uri similar to &lt;a href=&quot;http://localhost/games/12&quot;&gt;http://localhost/games/12&lt;/a&gt;. This is easy and built into the WCF Web API via the UriTemplate parameter of the WebGet Attribute. This will look familiar if you’ve worked with ASP.Net MVC routing.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I’m going to add a new method to GamesResource called GetSingleGame():&lt;/p&gt;&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;pre class=&quot;alt&quot;&gt;        [WebGet(UriTemplate = &lt;span class=&quot;str&quot;&gt;&quot;{id}&quot;&lt;/span&gt;)]&lt;/pre&gt;&lt;pre&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; Game GetSingleGame(&lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; id)&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        {&lt;/pre&gt;&lt;pre&gt;            &lt;span class=&quot;kwrd&quot;&gt;using&lt;/span&gt; (var gamesRepository = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; XBoxGames())&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;            {&lt;/pre&gt;&lt;pre&gt;                &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; idToFind = &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt;.Parse(id);&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;                &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; gamesRepository&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;                    .Games&lt;/pre&gt;&lt;pre&gt;                    .AsNoTracking()&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;                    .Include(&lt;span class=&quot;str&quot;&gt;&quot;Genre&quot;&lt;/span&gt;)&lt;/pre&gt;&lt;pre&gt;                    .Include(&lt;span class=&quot;str&quot;&gt;&quot;Rating&quot;&lt;/span&gt;)&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;                    .Where(g =&amp;gt; g.Id == idToFind)&lt;/pre&gt;&lt;pre&gt;                    .FirstOrDefault();&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;            }&lt;/pre&gt;&lt;pre class=&quot;alt&quot;&gt;        }&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;GetSingleGame() is very similar to GetGames() with the exception that I have defined a token called {id} within the UriTemplate property of the WebGet attribute and I’ve added a parameter to GetSingleGame() to receive the value. The WCF Web API infrastructure will handle parsing the incoming request to get the ID and making the appropriate call to GetSingleGame().&lt;/p&gt;&lt;br /&gt;&lt;p&gt;When put into motion, a request for the game with an ID of 12 (&lt;a title=&quot;http://localhost:1064/MessinWebApi/games/12&quot; href=&quot;http://localhost:1064/MessinWebApi/games/12&quot;&gt;http://localhost:1064/MessinWebApi/games/12&lt;/a&gt;) results in the following Xml:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE16ZUa7K7ccjR2ge8GxPxTsumIoh4YErcVLxunlfZqjjdi8T6P-c5UFDs8pj54FzGf9ANZLg3JfRKf40-xmYTmnwzbX2sRhAOZZa4ZFdTi3Qg3Pz2KR6pFw4Dwh1NkiAwuZpTe5YqazOU/s1600-h/image%25255B4%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTKywgsRvvtmfCFKKJO2msXP0PPOQKItfE-Qz2tE1P9SUP1FdhYGtWBAaRJ1c-GQCAPBLZQhd6cQzCMzN2dsHW4poCDnfKNwTBytz_rEvGzt2BvXkloPWn7bn9mkvTaSWIa1I23WTid2LU/?imgmax=800&quot; width=&quot;722&quot; height=&quot;584&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;This is just the “tip of the iceberg” for WCF Web Api. There is a very extensible &lt;a href=&quot;http://codebetter.com/glennblock/2011/05/17/message-handlers-vs-operation-handlers-which-one-to-use-2/&quot;&gt;pipeline&lt;/a&gt; built into the framework. I plan to explore some of these features in future posts. &lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/104295389854191640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/06/messin-with-wcf-web-api.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/104295389854191640'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/104295389854191640'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/06/messin-with-wcf-web-api.html' title='Messin’ with the WCF Web API'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifu-sb0D_4QWpm7b6TmRBMhe0FZxZT0nVtlKQlEQxMhbxRk0R6Od2wzFk2DDzVJU8w37VbY3qYHcO_ferhNk3eIePB9SxSA7fxkzO1vbrYP6qa1jdFOcgHEccGAf6r7lWg569WU-NK_UyS/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-4286135912425701352</id><published>2011-06-04T20:29:00.001-04:00</published><updated>2011-06-04T20:29:04.001-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Blackberry"/><category scheme="http://www.blogger.com/atom/ns#" term="WP7"/><title type='text'>One week with the HTC Trophy</title><content type='html'>&lt;p&gt;On May 26, Verizon made their first phone running the Microsoft Windows 7 OS available, the HTC Trophy. I placed my order before getting ready to go to work and Verizon was nice enough ship it FedEx Next Day (Thanks Verizon!). The phone came on Friday and a spent the entire weekend becoming familiar with it. &lt;/p&gt; &lt;p&gt;I’ve now had the phone for one week and I’ve enjoyed every bit of it. I love the user experience, especially the little jumps and nudges that get your attention and direct you to more features. Previously I had a Blackberry Storm 1 and the Trophy is 10x the phone.&lt;/p&gt; &lt;p&gt;My wife hated the Blackberry Storm. As a test, I gave her the Trophy and asked her to make a phone call. On the Storm, this simple task would frustrate the hell out of her. On the Trophy, she got past the lock screen (I had to give her the code obviously), launched the phone app and made the call. I asked how she knew to get to the keypad on the lock screen, given that she’d never used a WP7 phone before. She didn’t know. “I just did” she replied.&lt;/p&gt; &lt;p&gt;I love the phone but it’s not perfect. I used the Storm for two years and the Blackberry OS is much more mature. It’s only natural that I carried some expectations over to the Trophy. Here are the things that I don’t like or wish that WP7 supported (in no particular order):&lt;/p&gt; &lt;p&gt;- Integrated inbox.&lt;br&gt;WP7, just like the Storm, is capable of syncing with multiple email accounts. However, the Storm can present a unified inbox. I understand that this might be a feature in the next version of the WP7 OS, Mango.&lt;/p&gt; &lt;p&gt;- You can’t change the base font size&lt;br&gt;My eyesight isn’t what it used to be. I’ve been told that this is a common complaint from people over the age of 40. It would be nice if you could change the base font size for the device. It is nice that some apps and features support zooming but then you’re stuck panning around the screen.&lt;/p&gt; &lt;p&gt;- Battery life&lt;br&gt;My sense is that the Storm had a better battery life. I would frequently only recharge the Storm every other day, even though I had enabled Bluetooth and had a number of apps that would download data in the background. On the Trophy, turning off Bluetooth has helped a lot. I rarely enable Wifi. Now, to be fair, multiple people have expressed that “less than optimal” battery life is a common trait for HTC phones.&lt;/p&gt; &lt;p&gt;- Unable to flag an email&lt;br&gt;I had this on my list since it was something that I could do on the Storm and not WP7. However, I’ve recently discovered that I can flag messages but only for my Exchange and Gmail accounts. I can’t find a way to flag messages coming from my Hotmail account.&lt;/p&gt; &lt;p&gt;- No filters for message syncing&lt;br&gt;Blackberry supported defining filters as part of the email account subscriptions. I used them to exclude emails coming from discussion lists. I really miss this feature.&lt;/p&gt; &lt;p&gt;That’s it! Just five crummy complaints and none of them serious enough to drive me back to the Storm or another platform.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/4286135912425701352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/06/one-week-with-htc-trophy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/4286135912425701352'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/4286135912425701352'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/06/one-week-with-htc-trophy.html' title='One week with the HTC Trophy'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-175564263202705069</id><published>2011-05-10T21:25:00.001-04:00</published><updated>2011-05-10T21:25:42.776-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hardware"/><title type='text'>New laptop–update</title><content type='html'>&lt;p&gt;In my &lt;a href=&quot;http://blog.malevy.net/2011/05/new-laptop.html&quot;&gt;previous post&lt;/a&gt; I discussed my new laptop. In that post I mentioned that my only disappointment was the discovery that the wifi card, a Atheros AR9285, was a single-band card. I’ve recently replaced it with an &lt;a href=&quot;http://www.newegg.com/Product/Product.aspx?Item=N82E16833106061&quot;&gt;Intel 622AN.HMWWB Mini PCI Express 6200 Centrino Advanced-N Wireless Adapter&lt;/a&gt;. The card is working great and the installation was about 10 minutes. &lt;/p&gt; &lt;p&gt;Hopefully some other Asus G73SW owner will find this information useful.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/175564263202705069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/05/new-laptopupdate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/175564263202705069'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/175564263202705069'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/05/new-laptopupdate.html' title='New laptop–update'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-7770911605749147656</id><published>2011-05-04T22:41:00.001-04:00</published><updated>2011-05-04T22:41:55.913-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hardware"/><title type='text'>New laptop</title><content type='html'>&lt;p&gt;I recently purchased a new laptop I’ve had the previous one for a couple of years now so when an opportunity to purchase a new one presented itself,&amp;nbsp; who am I to pass on it!&lt;/p&gt; &lt;p&gt;I had been thinking about the features for a new laptop for a while. It had to be capable of 8GB of ram, 16 would be even better. I also wanted a quad-core processor. &lt;/p&gt; &lt;p&gt;When the time came to start looking around, I was able to narrow the field quite quickly. I’ve been a Dell user for quite a number of years. Every computer in the house, except for one, was purchased from Dell. It was then that I hit a snag. It seems that the laptop vendors are now doing displays using the HD resolutions: 720p, 900p and 1080p.&lt;/p&gt; &lt;p&gt;Sadly, there is no way that I can do a 1080p screen on a 15” laptop. My eyes just aren’t what they used to be. I was hesitant to go with 720p. It would be a lot of real estate to give up from the current laptop. 900p seemed to be a good compromise but there aren’t a lot of 15&quot; laptops that have a 900p screen. &lt;/p&gt; &lt;p&gt;I decided that 720p was probably the way to go but, just to make sure, I visited the local Microcenter to see what 720p looked like on a 15” laptop. &lt;/p&gt; &lt;p&gt;And that’s where I found the new laptop. The &lt;a href=&quot;http://www.asus.com/Notebooks/Gaming_Powerhouse/G73SW&quot;&gt;Asus G73sw&lt;/a&gt;. Everything that I wanted but with a 17” screen. A 17” screen wasn’t in the original plans but I can read 1080p on a 17” screen!&lt;/p&gt; &lt;p&gt;Enough with the narrative. Here’s the specs on the (now) old laptop:&lt;/p&gt; &lt;p&gt;Dell Vostro 1500 &lt;br&gt;4GB RAM&lt;br&gt;Core 2 Duo T9300 @ 2.5GHz&lt;br&gt;NVIDIA GeForce 8600M GT&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlQR4XsqUVu7i3D_WzvgnaL8SAg4yU8yokUr8XY0kKqBkBle5I_01mHkVNXJPxUOHUv6cAkw3k6KL3kQJ4mmhJ1CZJg3OMrs7GYaEsFDlq2D9LkjVmvAhDYn0_g3z6yePm1bHCM0JDG4D2/s1600-h/image%5B2%5D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxwqQ35CPSN42oNxeYYsalR8Pp46Ipb5mdXvJbAY4nEAsJH_iDp5bGBC2B2hAYkWUjpnAUChnPvQX3yVFuWnY_887dqEotXGter0xKUb-mCDyKKXK1dk6Dh3iug5owdY6B-vgHVIw286DS/?imgmax=800&quot; width=&quot;602&quot; height=&quot;208&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The (now) current laptop:&lt;img style=&quot;display: inline; float: right&quot; alt=&quot;gallery_left&quot; align=&quot;right&quot; src=&quot;http://www.asus.com/websites/Global/products/KeYVsP7c4mgNmh2B/EQ3IPAGKxjcsdQhG_500.jpg&quot; width=&quot;316&quot; height=&quot;316&quot;&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;http://www.asus.com/Notebooks/Gaming_Powerhouse/G73SW#Awards&quot;&gt;Asus G73sw&lt;/a&gt;&lt;br&gt;8GB RAM (capable of 16)&lt;br&gt;Core i7-2630QM @ 2GHz (boosts to 2.9Ghz)&lt;br&gt;NVIDIA GeForce GTX 460M&lt;br&gt;Dual hard-drive capable&lt;/p&gt; &lt;p&gt;The ‘Q’ in the processor name stands for Quad-Core!&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcZU-pnSXyJLtSpEZCboQJ-btP53PpbwXA2g0YFaohxmIFE5mqAkaiB14XBIK7TP7Xv_ZJM5UjKwD9qZpYoGo7WYSXhSm149lt_QplNWP_IOmqL6DyAzCrVtcqEWgdipYeibOyX5jGZAyu/s1600-h/image%5B6%5D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px&quot; title=&quot;image&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivipRZzAh861Puc5IyrU5l_0dYws52uHxMpdJ3uEKvfilDJ8p032yvpFFa9YwaKVbLg2kZZcZdvLOOfGFAlDrKgQzPcbPigOcSWMbeiM92bO7RABtYPFYotCNekUlnBytj_dplHxPY7av_/?imgmax=800&quot; width=&quot;611&quot; height=&quot;204&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt; &lt;p&gt;The performance boost is quite nice.&lt;/p&gt; &lt;p&gt;The only aspect of the Asus that I’m disappointed with is the WLAN card. It’s an Atheros AR9285. While the card does do 802.11n, it only does so at 2.4GHz. It’s not a dual-band card. I can only use one of the bands that my dual-band DLink DIR-825 supports. Luckily the Atheros is just a PCIe card so I’m hoping to replace it at some point.&lt;/p&gt; &lt;p&gt;Also, the wife get a “new” laptop for her birthday&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/7770911605749147656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/05/new-laptop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/7770911605749147656'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/7770911605749147656'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/05/new-laptop.html' title='New laptop'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxwqQ35CPSN42oNxeYYsalR8Pp46Ipb5mdXvJbAY4nEAsJH_iDp5bGBC2B2hAYkWUjpnAUChnPvQX3yVFuWnY_887dqEotXGter0xKUb-mCDyKKXK1dk6Dh3iug5owdY6B-vgHVIw286DS/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-8543938693967455270</id><published>2011-04-24T09:20:00.001-04:00</published><updated>2011-04-24T09:20:22.831-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Health"/><category scheme="http://www.blogger.com/atom/ns#" term="Workout"/><title type='text'>Workout Update</title><content type='html'>&lt;p&gt;Back on &lt;a href=&quot;http://blog.malevy.net/2011/01/this-is-where-i-am.html&quot; target=&quot;_blank&quot;&gt;8 Jan&lt;/a&gt;, I had finished up a workout cycle and posted my lifts at that time. Since then I’ve completed four more cycles. Here are the current numbers:&lt;/p&gt; &lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;456&quot;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Life&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Weight (lbs)&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Reps&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;154&quot;&gt;Theoretical Max (lbs)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Military Press&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;140&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;1&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;154&quot;&gt;145&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Deadlift&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;300&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;3&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;154&quot;&gt;329&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Bench Press&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;240&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;5&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;154&quot;&gt;330&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Squat&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;230&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;4&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;154&quot;&gt;260&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;Just looking at the weight, you would think that I’ve gotten stronger. In fact, I feel stronger. Yet, when comparing the theoretical max between 8 Jan and now, I have dropped in all the lifts except the bench. &lt;/p&gt; &lt;p&gt;My guess is that I underestimated my one-rep max (ORM) for all but the bench when I started the workout. Now the reps that I’m getting are closer to those on the workout. The third week of the cycle calls for three sets at 5,3 and 1 reps respectively. Previously I was getting 10s and 12s. Now the reps are closer to schedule.&lt;/p&gt; &lt;p&gt;The Bench Press results are most interesting. This is the lift that I was disappointed with the most since I wasn’t seeing the gains that I was seeing with the others. In fact, I was really considering changing this part of the workout. In reality, a 60lb increase in four months is probably pretty good.&lt;/p&gt; &lt;p&gt;Based on the two sets of results, I think I’ll stay on the workout, unchanged, for another three or four cycles. &lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/8543938693967455270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/04/workout-update.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/8543938693967455270'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/8543938693967455270'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/04/workout-update.html' title='Workout Update'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-6277478942783646732</id><published>2011-04-17T09:47:00.001-04:00</published><updated>2011-04-17T09:47:58.568-04:00</updated><title type='text'>Greed Kata–Second attempt</title><content type='html'>&lt;p&gt;When I wrote the &lt;a href=&quot;http://blog.malevy.net/2011/04/greed-katafirst-attempt.html&quot; target=&quot;_blank&quot;&gt;post&lt;/a&gt; on my first attempt, I mentioned that I thought I was “missing something obvious.” It occurred to me after I put up that post.&lt;/p&gt; &lt;blockquote&gt; &lt;h4&gt;A die can only be used in one scoring combination&lt;/h4&gt;&lt;/blockquote&gt; &lt;p&gt;This is probably obvious to everyone else but I’m only responsible for what goes on in my head.&lt;/p&gt; &lt;p&gt;This realization push me to think that calculating the score using the &lt;a href=&quot;http://www.eaipatterns.com/PipesAndFilters.html&quot; target=&quot;_blank&quot;&gt;Pipes and Filters pattern&lt;/a&gt; would probably be a good fit. I started with the data that each scorer, the filter, would operate on:&lt;/p&gt; &lt;div&gt;&lt;/div&gt; &lt;div id=&quot;codeSnippetWrapper&quot;&gt; &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; GameContext&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;      &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; Score;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;      &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] DiceValues;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;  }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Each filter would use the die values stored in the DiceValues field and update the Score field.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For the scorers, I started with the single value rules:&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;p&gt;A single one (1) is worth 100 points.&lt;br&gt;A single five (5) is worth 50 points. &lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;Working through lead to the following:&lt;/p&gt;&lt;br /&gt;&lt;div id=&quot;codeSnippetWrapper&quot;&gt;&lt;br /&gt;&lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; ValueScorer&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;readonly&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; _die;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;readonly&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; _value;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; ValueScorer(&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; die, &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;         _die = die;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;         _value = &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; GameContext Compute(GameContext context)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (0 == context.DiceValues.Length) &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; context;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;         var occurances = Array.FindAll(context.DiceValues, v =&amp;gt; v== &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;._die).Length;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;         context.Score += occurances * &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;._value;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;         List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt; diceValues = RemoveValuesUsedInAScoringCombination(context.DiceValues, occurances);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;         context.DiceValues = diceValues.ToArray();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; context;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt; RemoveValuesUsedInAScoringCombination(&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] currentDiceValues, &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; occurances)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&lt;/span&gt;         var diceValues = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt;(currentDiceValues);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (var ii &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; Enumerable.Range(1, occurances))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&lt;/span&gt;             diceValues.Remove(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;._die);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum31&quot;&gt;  31:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; diceValues;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum32&quot;&gt;  32:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum33&quot;&gt;  33:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id=&quot;codeSnippetWrapper&quot;&gt;The next set of rules:&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;div&gt;A set of three ones (1) is worth 1000 points&lt;br&gt;A set of three of any other number is worth 100 time that number (ex. {2,2,2} = 200 points}.&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div&gt;For which I ended up with:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;div id=&quot;codeSnippetWrapper&quot;&gt;&lt;br /&gt;&lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; TripleScorer&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; GameContext Compute(GameContext context)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (0 == context.DiceValues.Length) &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; context;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;         var triples = context.DiceValues.GroupBy(d =&amp;gt; d).Where(g =&amp;gt; g.Count() &amp;gt;= 3);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;         context.Score += triples.Sum(g =&amp;gt; (g.Count() / 3) * ((1 == g.Key) ? 1000 : g.Key * 100));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;         List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt; diceValues = RemoveValuesUsedInAScoringCombination(context.DiceValues, triples);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;         context.DiceValues = diceValues.ToArray();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; context;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt; RemoveValuesUsedInAScoringCombination(&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] currentDiceValues, IEnumerable&amp;lt;IGrouping&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;, &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt;&amp;gt; triples)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;         var diceValues = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt;(currentDiceValues);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (var tripleGroup &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; triples)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; digitsToRemove = (tripleGroup.Count()/3)*3;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (var ii &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; Enumerable.Range(1,digitsToRemove))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&lt;/span&gt;             {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&lt;/span&gt;                 diceValues.Remove(tripleGroup.Key);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&lt;/span&gt;             }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; diceValues;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The method RemoveValuesUsedInAScoringCombination() is key to making this approach work. This method updates the DiceValues array in the context to remove the values that were used. This piece enforces the constraint that a die is only used once in a scoring combination.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The driver is really straight forward and look like:&lt;/p&gt;&lt;br /&gt;&lt;div id=&quot;codeSnippetWrapper&quot;&gt;&lt;br /&gt;&lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Scorer&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; Computer(&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] diceValues)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (0 == diceValues.Length) &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; 0;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;         var tripleScorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; TripleScorer();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;         var oneScorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ValueScorer(1,100);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;         var fiveScorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ValueScorer(5,50);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;         var context = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; GameContext() {DiceValues = diceValues, Score = 0};&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;         context = tripleScorer.Compute(context);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;         context = oneScorer.Compute(context);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;         context = fiveScorer.Compute(context);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; context.Score;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;What I find really nice about this approach is that adding additional scoring combinations is just a matter of creating another scorer. For example, say that the ruling body for the game Greed introduces the following rule:&lt;/p&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;p&gt;A set of five consecutive numbers (ex. {1,2,3,4,5} or {2,3,4,5,6}) is called a Straight and is worth 2000 points.&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;This is easily implemented with a Scorer such as:&lt;/p&gt;&lt;br /&gt;&lt;div id=&quot;codeSnippetWrapper&quot;&gt;&lt;br /&gt;&lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; StraightScorer&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; GameContext Compute(GameContext context)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (0 == context.DiceValues.Length) &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; context;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; startingAt &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; Enumerable.Range(1,2))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.DiceValuesContainStraight(startingAt, context.DiceValues))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;             {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;                 context.Score += 2000;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;                 context.DiceValues = &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.RemoveValuesUsedInAScoringCombination(context.DiceValues, startingAt).ToArray();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;             }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; context;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;bool&lt;/span&gt; DiceValuesContainStraight(&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; straightStartsAt, &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] diceValues)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (var n &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; Enumerable.Range(straightStartsAt,5))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (!diceValues.Contains(n)) &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt; RemoveValuesUsedInAScoringCombination(&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] currentDiceValues, &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; startingAt)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&lt;/span&gt;         var diceValues = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; List&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt;(currentDiceValues);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum31&quot;&gt;  31:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (var n &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; Enumerable.Range(startingAt, 5))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum32&quot;&gt;  32:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum33&quot;&gt;  33:&lt;/span&gt;             diceValues.Remove(n);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum34&quot;&gt;  34:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum35&quot;&gt;  35:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; diceValues;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum36&quot;&gt;  36:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum37&quot;&gt;  37:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum38&quot;&gt;  38:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;The driver gets modified as:&lt;/p&gt;&lt;br /&gt;&lt;div id=&quot;codeSnippetWrapper&quot;&gt;&lt;br /&gt;&lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Scorer&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; Computer(&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] diceValues)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (0 == diceValues.Length) &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; 0;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;         var straightScorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; StraightScorer();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;         var tripleScorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; TripleScorer();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;         var oneScorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ValueScorer(1,100);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;         var fiveScorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; ValueScorer(5,50);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;         var context = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; GameContext() {DiceValues = diceValues, Score = 0};&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;         context = straightScorer.Compute(context);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;         context = tripleScorer.Compute(context);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;         context = oneScorer.Compute(context);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;         context = fiveScorer.Compute(context);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; context.Score;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Modifying the &lt;a href=&quot;http://blog.malevy.net/2011/04/greed-katafirst-attempt.html&quot; target=&quot;_blank&quot;&gt;previous version&lt;/a&gt; would not have been nearly as simple.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/6277478942783646732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/04/greed-katasecond-attempt.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/6277478942783646732'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/6277478942783646732'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/04/greed-katasecond-attempt.html' title='Greed Kata–Second attempt'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-290166163035124208</id><published>2011-04-13T22:40:00.001-04:00</published><updated>2011-04-13T22:40:23.095-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Kata"/><category scheme="http://www.blogger.com/atom/ns#" term="Practice"/><title type='text'>Greed Kata–First attempt</title><content type='html'>&lt;p&gt;I’ve had this on my TODO list since this year’s CodeMash conference. If you’re not already familiar with the Greed kata, or kata’s in general, take a moment and read the &lt;a href=&quot;http://blogger.forgottenskies.com/?p=687&quot; target=&quot;_blank&quot;&gt;article&lt;/a&gt; on Steve Gentile’s site. You can also take a look at his solution.&lt;/p&gt; &lt;p&gt;For my first attempt, I made an effort to stay away from Linq. I had no specific reason for this additional constraint. I was really just curious how the solution would turn out. So with that lead-in, here’s my first attempt:&lt;/p&gt; &lt;div id=&quot;codeSnippetWrapper&quot;&gt; &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; Scorer&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; Compute(&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] diceValues)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (0 == diceValues.Length) &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; 0;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;         Dictionary&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;, &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt; valueGroups = GroupByDiceValue(diceValues);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; totalScore = 0;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (KeyValuePair&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;, &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt; group &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; valueGroups)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;             totalScore += ScoreGroup(group.Value, group.Key);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;         &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; totalScore;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; ScoreGroup(&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; count, &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; groupScore = 0;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (count&amp;gt;=3)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt; == 1) groupScore += 1000;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt; groupScore += &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt; * 100;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&lt;/span&gt;             count -= 3;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&lt;/span&gt;             &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (1 == &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum31&quot;&gt;  31:&lt;/span&gt;             groupScore += count * 100;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum32&quot;&gt;  32:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum33&quot;&gt;  33:&lt;/span&gt;             &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum34&quot;&gt;  34:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt; (5 == &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum35&quot;&gt;  35:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum36&quot;&gt;  36:&lt;/span&gt;             groupScore += count * 50;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum37&quot;&gt;  37:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum38&quot;&gt;  38:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; groupScore;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum39&quot;&gt;  39:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum40&quot;&gt;  40:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum41&quot;&gt;  41:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;private&lt;/span&gt; Dictionary&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;, &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt; GroupByDiceValue(&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] diceValues)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum42&quot;&gt;  42:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum43&quot;&gt;  43:&lt;/span&gt;         Array.Sort(diceValues);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum44&quot;&gt;  44:&lt;/span&gt;         var valueGroups = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Dictionary&amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;, &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;&amp;gt;();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum45&quot;&gt;  45:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt; (&lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; diceValues)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum46&quot;&gt;  46:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum47&quot;&gt;  47:&lt;/span&gt;             &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt; count = 0;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum48&quot;&gt;  48:&lt;/span&gt;             valueGroups.TryGetValue(&lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;, &lt;span style=&quot;color: #0000ff&quot;&gt;out&lt;/span&gt; count);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum49&quot;&gt;  49:&lt;/span&gt;             valueGroups[&lt;span style=&quot;color: #0000ff&quot;&gt;value&lt;/span&gt;] = ++count;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum50&quot;&gt;  50:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum51&quot;&gt;  51:&lt;/span&gt;         &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; valueGroups;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum52&quot;&gt;  52:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum53&quot;&gt;  53:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;And here are the tests:&lt;/p&gt;&lt;br /&gt;&lt;div id=&quot;codeSnippetWrapper&quot;&gt;&lt;br /&gt;&lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; [TestFixture]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;class&lt;/span&gt; ScorerTests&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;     &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;     [Test]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Compute_WhenNoValues_Score_0()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;         var scorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Scorer();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;         Assert.That(scorer.Compute(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[]{}), Is.EqualTo(0));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;     [Test]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Compute_ThreeOnes_Score_1000()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;         var scorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Scorer();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;         Assert.That(scorer.Compute(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] {1,1,1,2,3}), Is.EqualTo(1000));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;     [Test]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Compute_ThreeTwos_Score_200()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum22&quot;&gt;  22:&lt;/span&gt;         var scorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Scorer();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum23&quot;&gt;  23:&lt;/span&gt;         Assert.That(scorer.Compute(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] { 3, 2, 2, 2, 3 }), Is.EqualTo(200));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum24&quot;&gt;  24:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum25&quot;&gt;  25:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum26&quot;&gt;  26:&lt;/span&gt;     [Test]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum27&quot;&gt;  27:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Compute_ThreeThreess_Score_300()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum28&quot;&gt;  28:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum29&quot;&gt;  29:&lt;/span&gt;         var scorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Scorer();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum30&quot;&gt;  30:&lt;/span&gt;         Assert.That(scorer.Compute(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] { 4, 4, 3, 3, 3 }), Is.EqualTo(300));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum31&quot;&gt;  31:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum32&quot;&gt;  32:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum33&quot;&gt;  33:&lt;/span&gt;     [Test]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum34&quot;&gt;  34:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Compute_ASingleOne_Score_100()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum35&quot;&gt;  35:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum36&quot;&gt;  36:&lt;/span&gt;         var scorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Scorer();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum37&quot;&gt;  37:&lt;/span&gt;         Assert.That(scorer.Compute(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] { 4, 4, 1, 2, 2 }), Is.EqualTo(100));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum38&quot;&gt;  38:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum39&quot;&gt;  39:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum40&quot;&gt;  40:&lt;/span&gt;     [Test]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum41&quot;&gt;  41:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Compute_ASingleFive_Score_50()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum42&quot;&gt;  42:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum43&quot;&gt;  43:&lt;/span&gt;         var scorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Scorer();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum44&quot;&gt;  44:&lt;/span&gt;         Assert.That(scorer.Compute(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] { 4, 4, 5, 2, 2 }), Is.EqualTo(50));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum45&quot;&gt;  45:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum46&quot;&gt;  46:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum47&quot;&gt;  47:&lt;/span&gt;     [Test]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum48&quot;&gt;  48:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Compute_FourOnes_Score_1100()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum49&quot;&gt;  49:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum50&quot;&gt;  50:&lt;/span&gt;         var scorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Scorer();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum51&quot;&gt;  51:&lt;/span&gt;         Assert.That(scorer.Compute(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] { 1, 1, 1, 1, 2 }), Is.EqualTo(1100));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum52&quot;&gt;  52:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum53&quot;&gt;  53:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum54&quot;&gt;  54:&lt;/span&gt;     [Test]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum55&quot;&gt;  55:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Compute_ThreeOnesAndTwoFives_Score_1100()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum56&quot;&gt;  56:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum57&quot;&gt;  57:&lt;/span&gt;         var scorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Scorer();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum58&quot;&gt;  58:&lt;/span&gt;         Assert.That(scorer.Compute(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] { 5, 5, 1, 1, 1 }), Is.EqualTo(1100));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum59&quot;&gt;  59:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum60&quot;&gt;  60:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum61&quot;&gt;  61:&lt;/span&gt;     [Test]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum62&quot;&gt;  62:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Compute_ThreeThreesAndOneFives_Score_350()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum63&quot;&gt;  63:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum64&quot;&gt;  64:&lt;/span&gt;         var scorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Scorer();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum65&quot;&gt;  65:&lt;/span&gt;         Assert.That(scorer.Compute(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] { 4, 5, 3, 3, 3 }), Is.EqualTo(350));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum66&quot;&gt;  66:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum67&quot;&gt;  67:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum68&quot;&gt;  68:&lt;/span&gt;     [Test]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum69&quot;&gt;  69:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;void&lt;/span&gt; Compute_NoValidScoringCombinations_Score_0()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum70&quot;&gt;  70:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum71&quot;&gt;  71:&lt;/span&gt;         var scorer = &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Scorer();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum72&quot;&gt;  72:&lt;/span&gt;         Assert.That(scorer.Compute(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;int&lt;/span&gt;[] { 2, 2, 4, 4, 3 }), Is.EqualTo(0));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum73&quot;&gt;  73:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum74&quot;&gt;  74:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum75&quot;&gt;  75:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;I’m not unhappy with the solution but the voice in my head is nagging me that I’m missing something obvious.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/290166163035124208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/04/greed-katafirst-attempt.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/290166163035124208'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/290166163035124208'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/04/greed-katafirst-attempt.html' title='Greed Kata–First attempt'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-7939469023982375349</id><published>2011-04-10T12:08:00.001-04:00</published><updated>2011-04-10T12:08:23.572-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Humor"/><title type='text'>Best constraint in an EULA–ever!</title><content type='html'>&lt;p&gt;I found this in an End User License Agreement that I was reading though this morning:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;You will not use the Software for, and will not permit the Software to be used for, any purposes prohibited by law, including, without limitation, for the development, design, manufacture or production of missiles or nuclear, chemical or biological weapons.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I should read more of this things.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/7939469023982375349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/04/best-constraint-in-eulaever.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/7939469023982375349'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/7939469023982375349'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/04/best-constraint-in-eulaever.html' title='Best constraint in an EULA–ever!'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-2636969551509743606</id><published>2011-03-03T21:14:00.001-05:00</published><updated>2011-03-03T21:14:52.288-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>Setting a GUID to Empty in the Visual Studio 2010 Watch window</title><content type='html'>&lt;p&gt;This is something that I stumbled upon the other day and I’ve finally gotten a chance to write it up. My current client has an application that uses GUIDs for IDs and there are lots of IDs. There is also a lot of logic in the application that is based on the presence of absence of a GUID value. The absence is indicated by the use of the Empty GUID. &lt;/p&gt; &lt;p&gt;So the other day a co-worker and I were using the debugger to delve into the bowels of the app trying to find the cause of a defect. We came to the conclusion that there was an issue with state around one of the GUIDS. The GUID had a value when it was supposed to be Empty. Luckily this is easy to test since there are a number of way to alter the value of a variable within the debugger. &lt;/p&gt; &lt;p&gt;Unfortunately it took a bit to discover how to set a GUID to empty.&lt;/p&gt; &lt;p&gt;It seems that you can’t just use the value “{00000000-0000-0000-0000-000000000000}”. You’ll be punished with an error message stating “Invalid expression term ‘{‘”. Your next thought might be to remove the braces ({}). In that case you’ll be rewarded with another error message stating “Cannot convert type ‘int’ to ‘System.Guid’.&lt;/p&gt; &lt;p&gt;I was shocked to find out that the answer is to enter ‘Guid.Empty’ for the value:&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoC8-hOw5-Gm3-XzhKiaBuFCCPj904bDEtLEII3n18Lr4FkpR-l7aXntjFgYTp-CdcdDIvvmImoqw6or-XahLJ2MNiWcxqmCDsnUy9aCn6lwd0noCO-4JvP9uW8SwnSiIXz2C82qJoptgj/s1600-h/SNAGHTMLab00d12%5B4%5D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;SNAGHTMLab00d12&quot; border=&quot;0&quot; alt=&quot;SNAGHTMLab00d12&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8ptX1oPk4uMmL2hp5gzDrX7dHWYcp4lkQz4kSrbfam8Awju5WOV2JYkw8AHY6aFIR4ZkpX5n-j1prvC3Xix9jMyiVdMRn_R7o2_H9xDamTnQ3D9TtKtjy7v_kMxUYL21c3goA8oew1vgz/?imgmax=800&quot; width=&quot;564&quot; height=&quot;135&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Results in:&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSYTG6cvlPJVE-inxgcX7XwEwu-uTXfpi4syRPsUqMBtdSXzn3c7bUAoAgXGqK7Gt67alSZ1ksLcj9HKBMQkpLCCYyhuqgWXwDTTL0rPgYPMd5zpDGhR569YhG0GgA6JAZW-G-QD_R9efi/s1600-h/SNAGHTMLab2217c%5B4%5D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;SNAGHTMLab2217c&quot; border=&quot;0&quot; alt=&quot;SNAGHTMLab2217c&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOkq8shYwpchyphenhyphendSHNGbMmbWVR4jhkoVHGyegKqemYhK00kY36il4VH-69b_7jQFe3DZ5Oh0v7YiWUxGMK7N7fNurRKQ-6uplwRUuhYDNNkBzd8bmD80tey4a5bJi5J89tOWAjIhQS6KI2Y/?imgmax=800&quot; width=&quot;575&quot; height=&quot;128&quot;&gt;&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/2636969551509743606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/03/setting-guid-to-empty-in-visual-studio.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/2636969551509743606'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/2636969551509743606'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/03/setting-guid-to-empty-in-visual-studio.html' title='Setting a GUID to Empty in the Visual Studio 2010 Watch window'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8ptX1oPk4uMmL2hp5gzDrX7dHWYcp4lkQz4kSrbfam8Awju5WOV2JYkw8AHY6aFIR4ZkpX5n-j1prvC3Xix9jMyiVdMRn_R7o2_H9xDamTnQ3D9TtKtjy7v_kMxUYL21c3goA8oew1vgz/s72-c?imgmax=800" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-5774827650486224529</id><published>2011-01-08T19:59:00.001-05:00</published><updated>2011-01-08T19:59:48.211-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Health"/><category scheme="http://www.blogger.com/atom/ns#" term="Workout"/><title type='text'>This is where I am</title><content type='html'>&lt;p&gt;I was assigned to an engagement this summer that had me working a lot of hours. 60-70 was the norm. I even did 97 towards the end, so that batch-processing could be delivered on time. The net effect of all that work was that I had to drop my workouts from my weekly schedule. I didn’t workout for a good six to eight weeks. &lt;/p&gt; &lt;p&gt;I started back to the gym when things calmed down. I was doing the 531 workout before the craziness started so I decided to pick it back up again. Unfortunately I had to backup a couple of cycles.&lt;/p&gt; &lt;p&gt;I just finished another cycle, and since this is the start of a new years, I thought I would post my max lifts for the four main exercises that I do: Standing military press, Deadlift, Bench press and Squat. I’m mainly doing this so that I have an easy way to measure my results this time next year.&lt;/p&gt; &lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;400&quot;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Lift&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Weight&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Reps&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Theoretical Max&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Military Press&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;120&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;7&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;148&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Deadlift&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;265&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;10&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;353&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Bench Press&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;225&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;6&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;270&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;Squat&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;200&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;12&lt;/td&gt; &lt;td valign=&quot;top&quot; width=&quot;100&quot;&gt;280&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;h3&gt;&amp;nbsp;&lt;/h3&gt; &lt;h3&gt;About the Theoretical Max&lt;/h3&gt; &lt;p&gt;In the &lt;a href=&quot;http://www.flexcart.com/members/elitefts/default.asp?m=PD&amp;amp;cid=114&amp;amp;pid=2976&quot; target=&quot;_blank&quot;&gt;ebook&lt;/a&gt; that describes the workout, Wendler provides a formula that can be used to calculate an estimated one-rep maximum – a guess at the most amount of weight that could be moved for one repetition:&lt;/p&gt; &lt;p align=&quot;center&quot;&gt;&lt;strong&gt;Weight x Reps x 0.0333 + Weight = Estimated 1RM&lt;/strong&gt;&lt;/p&gt; &lt;p&gt; The prescribed purpose of the formula is to provide a means to compare two lifts in order to gauge progress. Which lift is better 215 for 8 or 230 for 5. I use the formula to set rep goals.&lt;/p&gt; &lt;p&gt;I’ll start a new cycle tomorrow. I look forward to seeing where I am in a year.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/5774827650486224529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2011/01/this-is-where-i-am.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/5774827650486224529'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/5774827650486224529'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2011/01/this-is-where-i-am.html' title='This is where I am'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-8323890570833541271</id><published>2010-11-27T09:34:00.001-05:00</published><updated>2010-11-27T09:34:26.591-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MSMQ"/><category scheme="http://www.blogger.com/atom/ns#" term="PowerShell"/><title type='text'>Retrieving message counts of a remote MSMQ queue using PowerShell</title><content type='html'>&lt;p&gt;My current client does work for the retail industry. This weekend is the beginning of the holiday shopping season, a very important period to the retail industry. &lt;/p&gt; &lt;p&gt;This is also the first time that I’ve seen the planning and operations that the Retail IT groups go through. I’m really impressed by the amount of planning and support that is in place to make sure that IT-related issues don’t interfere with holiday shoppers. There are bridge calls that begin at 2am, around the clock monitoring of servers, hourly reports, call-ins every 30 minutes and lots of people are either active or on-call.&lt;/p&gt; &lt;p&gt;My part in this was to spend three hours monitoring 13 remote servers. To make life a little easier, we used a PowerShell script similar to this to retrieve the queue lengths of some remote MSMQ queues.&lt;/p&gt; &lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt; &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; $queuesToCheck = &lt;span style=&quot;color: #006080&quot;&gt;&#39;Q1&#39;&lt;/span&gt; , &lt;span style=&quot;color: #006080&quot;&gt;&#39;Q2&#39;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt; $servers = &lt;span style=&quot;color: #006080&quot;&gt;&#39;myserver1&#39;&lt;/span&gt;, &lt;span style=&quot;color: #006080&quot;&gt;&#39;myserver2&#39;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt; $queues = @()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt; $servers | ForEach-Object {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;     $ServerName = $_&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;     &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;     $machineQueuesToCheck = $queuesToCheck | ForEach-Object { &lt;span style=&quot;color: #006080&quot;&gt;&quot;$ServerName\$_&quot;&lt;/span&gt;.ToLower() }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;     $queues += gwmi -class Win32_PerfRawData_MSMQ_MSMQQueue -computerName $ServerName  | Where-Object {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;         $machineQueuesToCheck -contains $_.Name.Trim() -and $_.MessagesInQueue &lt;span style=&quot;color: #cc6633&quot;&gt;-gt&lt;/span&gt; 0&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;     } &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt; $queues | Format-Table Name, MessagesInQueue&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/8323890570833541271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2010/11/retrieving-message-counts-of-remote.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/8323890570833541271'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/8323890570833541271'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2010/11/retrieving-message-counts-of-remote.html' title='Retrieving message counts of a remote MSMQ queue using PowerShell'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-4386249201447527479</id><published>2010-09-06T20:58:00.001-04:00</published><updated>2010-09-06T20:58:02.157-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ascendo"/><category scheme="http://www.blogger.com/atom/ns#" term="Blackberry"/><title type='text'>Ascendo DataVault &amp;amp; Blackberry Desktop Manager v6</title><content type='html'>&lt;p&gt;I’ve been a Blackberry Storm 9530 owner since the device was released. I’ve been really happy with the device, especially with the application ecosystem. There are lots of apps for the device. (There are a lot of apps for Blackberry devices in general). &lt;/p&gt; &lt;p&gt;As a computer professional, I spend a lot of time on the Internet. I’m a member of a large number of sites and that leads to a lot of username/password combinations to keep track of. An app for tracking passwords is a necessity for me. I don’t have the memory to track them all. Single-sign-on can’t come fast enough.&lt;/p&gt; &lt;p&gt;So I tried a bunch of password apps and ended up with DataVault from Ascendo, mainly due to its flexibility and the fact that there is a version that runs on Windows and the Blackberry Storm. The two versions will sync between each other through the Blackberry Desktop Manager.&lt;/p&gt; &lt;p&gt;This worked well until about a month ago when RIM released v6.0 of the Desktop Manager. According to an &lt;a href=&quot;http://www.ascendo-inc.com/datavault/blackberry/faq.html#BDM6&quot; target=&quot;_blank&quot;&gt;FAQ&lt;/a&gt; on Ascendo’s site, RIM removed an API that Ascendo was using to support synchronization. Unfortunately I didn’t notice that synchronization was broken until today.&lt;/p&gt; &lt;p&gt;The &lt;a href=&quot;http://www.ascendo-inc.com/datavault/blackberry/faq.html#BDM6&quot; target=&quot;_blank&quot;&gt;FAQ&lt;/a&gt; suggest upgrading to the latest version, 4.7.1 which has a fix for the problem. Still no syncing for me.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;http://www.ascendo-inc.com/datavault/blackberry/faq.html#syncProblem&quot; target=&quot;_blank&quot;&gt;Another FAQ&lt;/a&gt; suggests upgrading the device version to the latest. Still no syncing for.&lt;/p&gt; &lt;p&gt;On a whim, I try running the Desktop Manager as Administrator. Surprise! The sync dialog appears. &lt;/p&gt; &lt;p&gt;Only two hours lost.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/4386249201447527479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2010/09/ascendo-datavault-blackberry-desktop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/4386249201447527479'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/4386249201447527479'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2010/09/ascendo-datavault-blackberry-desktop.html' title='Ascendo DataVault &amp;amp; Blackberry Desktop Manager v6'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-5391819552141139581</id><published>2010-08-29T21:58:00.001-04:00</published><updated>2010-08-29T21:58:33.718-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Spring.Net"/><category scheme="http://www.blogger.com/atom/ns#" term="XML"/><title type='text'>Register Spring.Net objects with code</title><content type='html'>&lt;p&gt;Anyone that has worked with Spring.Net is probably familiar with configuring the IOC container using an XML document. A typical example would be: &lt;/p&gt; &lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt; &lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt; &amp;lt;objects xmlns=&lt;span style=&quot;color: #006080&quot;&gt;&quot;http://www.springframework.net&quot;&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;          xmlns:v=&lt;span style=&quot;color: #006080&quot;&gt;&#39;http://www.springframework.net/validation&#39;&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;          xmlns:aop=&lt;span style=&quot;color: #006080&quot;&gt;&quot;http://www.springframework.net/aop&quot;&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;          xmlns:db=&lt;span style=&quot;color: #006080&quot;&gt;&quot;http://www.springframework.net/db&quot;&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; &amp;lt;?xml version=&lt;span style=&quot;color: #006080&quot;&gt;&quot;1.0&quot;&lt;/span&gt; encoding=&lt;span style=&quot;color: #006080&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;?&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;   &amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;object&lt;/span&gt; id=&lt;span style=&quot;color: #006080&quot;&gt;&quot;ConsoleWriter&quot;&lt;/span&gt; type=&lt;span style=&quot;color: #006080&quot;&gt;&quot;SimpleCalculatorWithComplexTree.Writers.ConsoleWriter&quot;&lt;/span&gt; singleton=&lt;span style=&quot;color: #006080&quot;&gt;&quot;false&quot;&lt;/span&gt; &amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;     &amp;lt;constructor-arg name=&lt;span style=&quot;color: #006080&quot;&gt;&quot;formatter&quot;&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;ref&lt;/span&gt;=&lt;span style=&quot;color: #006080&quot;&gt;&quot;HexFormatter&quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;   &amp;lt;/&lt;span style=&quot;color: #0000ff&quot;&gt;object&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;   &amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;object&lt;/span&gt; id=&lt;span style=&quot;color: #006080&quot;&gt;&quot;Calculator&quot;&lt;/span&gt; type=&lt;span style=&quot;color: #006080&quot;&gt;&quot;SimpleCalculatorWithComplexTree.Calculator&quot;&lt;/span&gt; singleton=&lt;span style=&quot;color: #006080&quot;&gt;&quot;false&quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;     &amp;lt;constructor-arg name=&lt;span style=&quot;color: #006080&quot;&gt;&quot;writer&quot;&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;ref&lt;/span&gt;=&lt;span style=&quot;color: #006080&quot;&gt;&quot;ConsoleWriter&quot;&lt;/span&gt; /&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;   &amp;lt;/&lt;span style=&quot;color: #0000ff&quot;&gt;object&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;   &amp;lt;&lt;span style=&quot;color: #0000ff&quot;&gt;object&lt;/span&gt; id=&lt;span style=&quot;color: #006080&quot;&gt;&quot;HexFormatter&quot;&lt;/span&gt; type=&lt;span style=&quot;color: #006080&quot;&gt;&quot;SimpleCalculatorWithComplexTree.Formatters.HexFormatter&quot;&lt;/span&gt; singleton=&lt;span style=&quot;color: #006080&quot;&gt;&quot;false&quot;&lt;/span&gt; &amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt;     &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum19&quot;&gt;  19:&lt;/span&gt;   &amp;lt;/&lt;span style=&quot;color: #0000ff&quot;&gt;object&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum20&quot;&gt;  20:&lt;/span&gt;   &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum21&quot;&gt;  21:&lt;/span&gt; &amp;lt;/objects&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;The last couple of years has seen an anti-XML movement begin to form. In the world of IOC containers, this has materialized as a movement away from XML configuration and more towards using code constructs and “convention over configuration.” I’m not against XML. After all, almost everything has a place.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I recently did a presentation on Spring.Net for a .NET user group. I wanted to introduce the IOC container without overwhelming people with XML. A quick search found an article about &lt;a href=&quot;http://eeichinger.blogspot.com/2009/12/merry-xmlless-codeconfig-for-springnet.html&quot; target=&quot;_blank&quot;&gt;XMLless configuration of the container&lt;/a&gt;. This approach felt like it would be a distraction from my goal of getting to the container.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Luckily I stumbled into at &lt;a href=&quot;http://blog.springsource.com/2008/01/04/spring-net-11-and-container-configuration/&quot; target=&quot;_blank&quot;&gt;article&lt;/a&gt; from early 2008 that discussed the configuration api. From this I was able to create this method that extends the GenericApplicationContext and allows for easy registration of a type in the container:&lt;/p&gt;&lt;br /&gt;&lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;&lt;br /&gt;&lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; Imports System.Runtime.CompilerServices&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt; Imports Spring.Context.Support&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt; Imports Spring.Objects.Factory.Support&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt; Public Module SpringExtension&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt;     &amp;lt;Extension()&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;     Public Sub RegisterType(Of T)(ByVal ctx As GenericApplicationContext, ByVal builderConfig As Action(Of ObjectDefinitionBuilder))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;         Dim objectDefinitionFactory As IObjectDefinitionFactory = New DefaultObjectDefinitionFactory()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt;         Dim builder As ObjectDefinitionBuilder = ObjectDefinitionBuilder.RootObjectDefinition(objectDefinitionFactory, GetType(T))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;         builderConfig.Invoke(builder)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum14&quot;&gt;  14:&lt;/span&gt;         ctx.RegisterObjectDefinition(builder.ObjectDefinition.ObjectType.Name, builder.ObjectDefinition)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum15&quot;&gt;  15:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum16&quot;&gt;  16:&lt;/span&gt;     End Sub&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum17&quot;&gt;  17:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum18&quot;&gt;  18:&lt;/span&gt; End Module&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Here’s a quick example of its use:&lt;/p&gt;&lt;br /&gt;&lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;&lt;br /&gt;&lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum1&quot;&gt;   1:&lt;/span&gt; Dim ctx = New GenericApplicationContext()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum2&quot;&gt;   2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum3&quot;&gt;   3:&lt;/span&gt; ctx.RegisterType(Of Calculator)(Sub(b As ObjectDefinitionBuilder) b _&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum4&quot;&gt;   4:&lt;/span&gt;                               .SetAutowireMode(Spring.Objects.Factory.Config.AutoWiringMode.AutoDetect) _&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum5&quot;&gt;   5:&lt;/span&gt;                               .SetSingleton(False))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum6&quot;&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum7&quot;&gt;   7:&lt;/span&gt; ctx.RegisterType(Of HexFormatter)(Sub(b As ObjectDefinitionBuilder) b _&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum8&quot;&gt;   8:&lt;/span&gt;                       .SetAutowireMode(Spring.Objects.Factory.Config.AutoWiringMode.AutoDetect) _&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum9&quot;&gt;   9:&lt;/span&gt;                       .SetSingleton(False))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum10&quot;&gt;  10:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum11&quot;&gt;  11:&lt;/span&gt; ctx.RegisterType(Of ConsoleWriter)(Sub(b As ObjectDefinitionBuilder) b _&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum12&quot;&gt;  12:&lt;/span&gt;                       .SetAutowireMode(Spring.Objects.Factory.Config.AutoWiringMode.AutoDetect) _&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #606060&quot; id=&quot;lnum13&quot;&gt;  13:&lt;/span&gt;                       .SetSingleton(False))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/5391819552141139581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2010/08/register-springnet-objects-with-code.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/5391819552141139581'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/5391819552141139581'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2010/08/register-springnet-objects-with-code.html' title='Register Spring.Net objects with code'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1766780051966124712.post-7630259095844075778</id><published>2010-08-22T11:35:00.001-04:00</published><updated>2010-08-22T11:35:32.502-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hyper-V"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Disable password expiration on Windows Hyper-V server</title><content type='html'>&lt;p&gt;Back in &lt;a href=&quot;http://blog.malevy.net/2010/04/hyper-v-server-cannot-connect-to-rpc.html&quot;&gt;April&lt;/a&gt; I wrong a quick entry about not being able to use the Hyper-V Remote manager to access the Hyper-V server. I was getting the error “Cannot connect to the RPC service on computer…” because my credentials on the server had expired. Today I finally got around to changing the account security policy on the server to prevent password from expiring. The command is:&lt;/p&gt; &lt;p&gt;NET accounts /MAXPWAGE:UNLIMITED&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='https://blog.malevy.net/feeds/7630259095844075778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://blog.malevy.net/2010/08/disable-password-expiration-on-windows.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/7630259095844075778'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1766780051966124712/posts/default/7630259095844075778'/><link rel='alternate' type='text/html' href='https://blog.malevy.net/2010/08/disable-password-expiration-on-windows.html' title='Disable password expiration on Windows Hyper-V server'/><author><name>Michael Levy</name><uri>http://www.blogger.com/profile/09059272598066364817</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid7dg-SUVtlFFaq_RT2PXuq4a41dEAiHhHfh0g-C4_h2P7m1131-RS-Lb0IGljAWXU_xwQUk6SpMr2Yub3YAX5aGli-j8uM2750xZKx3HpVA1sg5k8R9GnV4RFKICfZlo/s220/new-profile.jpg'/></author><thr:total>9</thr:total></entry></feed>