<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>PeterKellner.net</title><link>http://peterkellner.net</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Peterkellnernet" /><description>Microsoft Focussed, JavaScript (ExtJS, SenchaTouch &amp; Windows 8 Metro)</description><language>en</language><lastBuildDate>Tue, 07 Feb 2012 13:14:45 PST</lastBuildDate><generator>http://wordpress.org/?v=2.9.2</generator><sy:updatePeriod xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">hourly</sy:updatePeriod><sy:updateFrequency xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">1</sy:updateFrequency><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Peterkellnernet" /><feedburner:info uri="peterkellnernet" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>37.311042</geo:lat><geo:long>-121.961622</geo:long><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/Peterkellnernet" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2FPeterkellnernet" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item><title>MACBook PRO running VMWARE Fusion with Visual Studio</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/uW4SimM_pRw/</link><category>ASP.NET 2.0</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Tue, 07 Feb 2012 12:59:28 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2012/02/07/macbook-pro-running-vmware-fusion-with-visual-studio/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>I’ve been a macbook user for about 2 weeks now.&#160; As a Microsoft guy, it’s really important to me that the Macbook run Windows 7 really well.&#160; So far, I’m not impressed (hopefully this will change once you all give me some good advice).&#160; I’ve set up bootcamp on half my SSD drive and OSX Lion on the other half.&#160; VMWare seems to run reasonably well, but when I try and run Visual Studio I get lots of hanging and very very slow performance.&#160; I’ve got 16Gig of RAM and the latest macbook with a core i7.&#160; I’ve tried giving VMWARE 4 or 8 GB’s of ram, but have the same issues.</p>  <p>I’ve also run bootcamp native and had some hanging also, but not as bad as Fusion.</p>  <p>Anyone else have similar experiences?&#160; Any suggestions?&#160; I’ve heard that macbook’s are awesome at running windows 7.&#160; So far, I have not experience that.&#160; </p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/uW4SimM_pRw" height="1" width="1"/>]]></content:encoded><description>I’ve been a macbook user for about 2 weeks now.&amp;#160; As a Microsoft guy, it’s really important to me that the Macbook run Windows 7 really well.&amp;#160; So far, I’m not impressed (hopefully this will change once you all give me some good advice).&amp;#160; I’ve set up bootcamp on half my SSD drive and OSX [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2012/02/07/macbook-pro-running-vmware-fusion-with-visual-studio/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://peterkellner.net/2012/02/07/macbook-pro-running-vmware-fusion-with-visual-studio/</feedburner:origLink></item><item><title>HTML5 Media Queries, Tablet Verses Phone, Anything but Intuitive</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/ZWLJsGTMIeY/</link><category>CSS3</category><category>HTML5</category><category>HTML5 Media Query</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Thu, 02 Feb 2012 18:57:22 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2012/02/02/html5-media-queries-tablet-verses-phone-anything-but-intuitive/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>&#160;</p>  <p>&#160;</p>  <h2>Background and Introduction</h2>  <p>I’m building a mobile touch application that uses <a href="http://www.sencha.com/products/touch/">SenchaTouch 2</a> on the client and <a href="http://msdn.microsoft.com/en-us/data/aa937723">Microsoft’s ASP.NET EF Code First</a> on the server.&#160; Things have been moving along pretty quickly because both of these toolkit’s are awesome.&#160; I got stuck for about 2 hours on what I thought should be a very simple problem.&#160; I’ve basically got a two panel application where on the left panel I want to be able to show a “display second panel” button if I’m on a small screen, and if I’m on a big screen I don’t want to show that button, but I do want to show the second panel.&#160; Basically, here is what I want my app to look like using <a href="http://www.w3schools.com/html5/default.asp">HTML5</a> <a href="http://www.css3.info/preview/media-queries/">Media Queries</a>.</p>  <p>&#160;</p>  <table border="2" cellspacing="0" cellpadding="10" width="548"><tbody>     <tr>       <td valign="top" width="286">         <h3>Tablet Mode</h3>       </td>        <td valign="top" width="258">         <h3>Phone Mode</h3>       </td>     </tr>      <tr>       <td valign="top" width="283"><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/02/image2.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/02/image_thumb2.png" width="268" height="68" /></a></td>        <td valign="top" width="258"><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/02/image3.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/02/image_thumb3.png" width="206" height="62" /></a></td>     </tr>   </tbody></table>  <p>&#160;</p>  <p>Notice that the Tablet Mode is wider than 480 pixels and the Phone Mode is narrower (OK, take my word for it).&#160; As you collapse the browser you will see it automatically change.</p>  <p>&#160;</p>  <h2>How It Works</h2>  <p>Basically, an HTML5 media query is no more than letting you have CSS that only gets run under certain circumstances.&#160; That is, the browser window is less than a certain width (or great than), or even something like printing.&#160; I first got introduced to media queries a while back when at our code camp (Silicon Valley Code Camp), we had people complaining that when they printed their schedules, it included all our “junk” on the left and right margins.&#160; The solution was to use a media query that said “if printing, add a special css to those columns telling them not to show”.</p>  <p>&#160;</p>  <h2>My Problem and Solution Today</h2>  <p>The media query itself that you put in your css looks like the following:</p>  <p>   <pre class="csharpcode">@media only screen and (max-width:480px) {
           .showOnTablet {
               display: none;
           }
       }</pre>
</p>

<p><style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>It’s actually pretty simple.&#160; It says anything you assign the class “showOnTablet” to, will render it invisible.&#160; If you think about it, you could order the problem I outlined above lots of ways.&#160; The “if” statements are very stragiht forward (or so I thought).&#160; It may be (OK, likely is) my lack of understanding of CSS, but at the end of the day, to make the Media Query work, this is what I had to do in my css (style) file.</p>

<p>1.&#160; Set all my DOM elements I want to display to visible.</p>

<p>2.&#160; Create a media query for each item I want to make invisible.</p>

<p>&#160;</p>

<p>Sound simple right?</p>

<p>So, here is what does not work.</p>

<p>1) Have one media query for each object (div or span) that sets one item visible and one item invisible</p>

<p>2) Set both objects (div or span) to invisible, then have the media query make them visible</p>

<p>I would not 100% swear to what does not work, but I can promise if you follow what I show does work, that will work for you also.</p>

<p>&#160;</p>

<h2>The HTML Page (finally)</h2>

<p>
  <pre class="csharpcode"><span class="kwrd">&lt;!</span><span class="html">DOCTYPE</span> <span class="attr">html</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">html</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">head</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">meta</span> <span class="attr">charset</span><span class="kwrd">=&quot;utf-8&quot;</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">title</span><span class="kwrd">&gt;</span>Brain Bashing With HTML5 Media Queries<span class="kwrd">&lt;/</span><span class="html">title</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">style</span> <span class="attr">type</span><span class="kwrd">=&quot;text/css&quot;</span><span class="kwrd">&gt;</span>

        .floatRight {
            float: right;
            margin-top: 10px;
            padding: 5px;
            background: Yellow;
            border-radius: 22px;
        }

        .left {
            margin-top: 10px;
            padding: 5px;
            background: red;
            border-radius: 10px;
        }

        .showOnTablet {
            display: visible;
        }

        .showOnMobile {
            display: visible;
        }

        @media only screen and (max-width:480px) {
            .showOnTablet {
                display: none;
            }
        }

        @media only screen and (min-width:481px) {
            .showOnMobile {
                display: none;
            }
        }
    <span class="kwrd">&lt;/</span><span class="html">style</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">head</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">body</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">div</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">class</span><span class="kwrd">=&quot;showOnTablet floatRight&quot;</span><span class="kwrd">&gt;</span>
        RIGHT PANEL
    <span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">class</span><span class="kwrd">=&quot;left&quot;</span><span class="kwrd">&gt;</span>
        LEFT PANEL  
        <span class="kwrd">&lt;</span><span class="html">button</span> <span class="attr">type</span><span class="kwrd">=&quot;button&quot;</span> <span class="attr">class</span><span class="kwrd">=&quot;showOnMobile&quot;</span><span class="kwrd">&gt;</span>
            Show Panel Info (not really)<span class="kwrd">&lt;/</span><span class="html">button</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span>


<span class="kwrd">&lt;/</span><span class="html">body</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">html</span><span class="kwrd">&gt;</span></pre>
  <style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style></p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/ZWLJsGTMIeY" height="1" width="1"/>]]></content:encoded><description>&amp;#160;  &amp;#160;  Background and Introduction  I’m building a mobile touch application that uses SenchaTouch 2 on the client and Microsoft’s ASP.NET EF Code First on the server.&amp;#160; Things have been moving along pretty quickly because both of these toolkit’s are awesome.&amp;#160; I got stuck for about 2 hours on what I thought [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2012/02/02/html5-media-queries-tablet-verses-phone-anything-but-intuitive/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><feedburner:origLink>http://peterkellner.net/2012/02/02/html5-media-queries-tablet-verses-phone-anything-but-intuitive/</feedburner:origLink></item><item><title>Take Defaults! (not customizations) When Installing Software</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/GtbU9MptMaE/</link><category>ASP.NET 2.0</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Tue, 31 Jan 2012 21:55:11 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2012/01/31/take-defaults-not-customizations-when-installing-software/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>&#160;</p>  <h2>Some Background</h2>  <p>Years ago, my friend Bill Venners of <a href="http://www.artima.com/weblogs/index.jsp?blogger=bv">Artima</a> told me a life long lesson that I always seem to forget.&#160; He said that when people design <a href="http://www.apple.com/macosx/recovery/">installation</a> programs, they always thoroughly test the “default” installation but not all the corner cases around custom options.</p>  <p>Today, while configuring my new <a href="http://www.apple.com/mac/">MacBook</a> (Best <a href="http://windows.microsoft.com/en-us/windows7/products/home">Windows 7</a> Computer Laptop they say), I learned this lesson all over again.&#160; So, here is the story.</p>  <p>&#160;</p>  <h2>   <p>How To Split Your Hard MacBook Primary Drive 50/50, IOS Lion and Windows 7</p> </h2>  <p>My thinking is that I need to first allocate a NTFS partition on the MacBook that takes half my hard drive and let the OSX Lion install take over the rest.&#160; After about 10 iterations of IOS complaining that it did not have enough resources, I finally decided to take a step backwards and ask myself “how would my mom be able to do this?” and we all know that Mac’s are designed for my mom.&#160; So, with that thinking, I just let the IOS Lion install take over the entire disk.&#160; Then I ran the Boot Camp Assistant.&#160; It asked me how much of my hard drive I wanted for Windows, I said 50% and everything ran perfect.&#160; No partition magic, no special setup, just take the defaults with <a href="http://www.apple.com/support/bootcamp/">bootcamp</a>!</p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/GtbU9MptMaE" height="1" width="1"/>]]></content:encoded><description>&amp;#160;  Some Background  Years ago, my friend Bill Venners of Artima told me a life long lesson that I always seem to forget.&amp;#160; He said that when people design installation programs, they always thoroughly test the “default” installation but not all the corner cases around custom options.  Today, while configuring my new [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2012/01/31/take-defaults-not-customizations-when-installing-software/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><feedburner:origLink>http://peterkellner.net/2012/01/31/take-defaults-not-customizations-when-installing-software/</feedburner:origLink></item><item><title>A SenchTouch2 Simple Example Using Tab Pages and Buttons</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/Ln27IiKxE8k/</link><category>JavaScript</category><category>Sencha</category><category>SenchaTouch</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Tue, 24 Jan 2012 21:47:41 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2012/01/24/a-senchtouch2-simple-example-using-tab-pages-and-buttons/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Again, I find myself going back to basics when trying to make my SenchaTouch2 Project work.&#160; Today, I updated my framework to <a href="http://www.sencha.com/">Sencha’s</a> latest alpha release of the tools (p4).&#160; I often make these examples because I’m trying to prove there is a <a href="http://www.sencha.com/products/touch/">SenchaTouch</a> bug and usually find out it’s my bug somehow.&#160; So, since I went to the trouble of making a simple example of two stand alone buttons that switch between <a href="http://docs.sencha.com/touch/2-0/#!/api/Ext.tab.Panel">tab</a> pages, I thought I’d blog it.</p>  <p>Here is what we get ultimately.&#160; When clicking on b1 or b2, the home and the contact tab are selected automatically (same as clicking on those two items in the tab bar).</p>  <p>One thing I find a little odd, is that to create the class, you say Ext.TabPanel and not Ext.tab.Panel. (OK, I just tested that and both work)</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image14.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image_thumb12.png" width="244" height="233" /></a></p>  <p>And, here is the code:</p>  <pre class="csharpcode"><span class="kwrd">&lt;!</span><span class="html">DOCTYPE</span> <span class="attr">html</span><span class="kwrd">&gt;</span>

<span class="rem">&lt;!-- Auto Generated with Sencha Designer --&gt;</span>
<span class="rem">&lt;!-- Modifications to this file will be overwritten. --&gt;</span>
<span class="kwrd">&lt;</span><span class="html">html</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">head</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">meta</span> <span class="attr">http-equiv</span><span class="kwrd">=&quot;Content-Type&quot;</span> <span class="attr">content</span><span class="kwrd">=&quot;text/html; charset=utf-8&quot;</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">title</span><span class="kwrd">&gt;</span>AgelessST2<span class="kwrd">&lt;/</span><span class="html">title</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">link</span> <span class="attr">rel</span><span class="kwrd">=&quot;stylesheet&quot;</span> <span class="attr">type</span><span class="kwrd">=&quot;text/css&quot;</span> <span class="attr">href</span><span class="kwrd">=&quot;sencha-touch-2.0.0-pr3/resources/css/sencha-touch.css&quot;</span><span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">script</span> <span class="attr">type</span><span class="kwrd">=&quot;text/javascript&quot;</span> <span class="attr">src</span><span class="kwrd">=&quot;sencha-touch-2.0.0-pr3/sencha-touch-all-debug.js&quot;</span><span class="kwrd">&gt;&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span>
    
    &lt;script type=<span class="str">&quot;text/javascript&quot;</span>  &gt;

        Ext.setup({
            onReady: <span class="kwrd">function</span> () {

                <span class="kwrd">var</span> pan = Ext.create(<span class="str">'Ext.TabPanel'</span>, {
                    height: 150,
                    defaults: {
                        styleHtmlContent: <span class="kwrd">true</span>
                    },
                    items: [
                        {

                            title: <span class="str">'Home'</span>,
                            html: <span class="str">'Home Screen'</span>
                        },
                        {

                            title: <span class="str">'Contact'</span>,
                            html: <span class="str">'Contact Screen'</span>
                        }
                    ]
                });

                <span class="kwrd">var</span> buttonPannel = Ext.create(<span class="str">'Ext.Panel'</span>, {
                    layout: <span class="str">'hbox'</span>,
                    items: [
                            {
                                xtype: <span class="str">'button'</span>,
                                text: <span class="str">'b1'</span>,
                                handler: <span class="kwrd">function</span> (button) {
                                    pan.setActiveItem(0);
                                }
                            },
                            {
                                xtype: <span class="str">'button'</span>,
                                text: <span class="str">'b2'</span>,
                                handler: <span class="kwrd">function</span> (button) {
                                    pan.setActiveItem(2);
                                }
                            }
                ]
                });

                Ext.Viewport.add({
                    fullscreen: <span class="kwrd">true</span>,
                    layout: <span class="str">'vbox'</span>,
                    items: [buttonPannel, pan]
                });
            }
        });

      
    
    
    <span class="kwrd">&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">head</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">body</span><span class="kwrd">&gt;&lt;/</span><span class="html">body</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">html</span><span class="kwrd">&gt;</span></pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>Hope this helps.


<img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/Ln27IiKxE8k" height="1" width="1"/>]]></content:encoded><description>Again, I find myself going back to basics when trying to make my SenchaTouch2 Project work.&amp;#160; Today, I updated my framework to Sencha’s latest alpha release of the tools (p4).&amp;#160; I often make these examples because I’m trying to prove there is a SenchaTouch bug and usually find out it’s my bug somehow.&amp;#160; So, since [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2012/01/24/a-senchtouch2-simple-example-using-tab-pages-and-buttons/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://peterkellner.net/2012/01/24/a-senchtouch2-simple-example-using-tab-pages-and-buttons/</feedburner:origLink></item><item><title>PC verses MAC (let the debate continue)</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/AbYpZA6bExc/</link><category>ASP.NET 2.0</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Tue, 24 Jan 2012 11:14:37 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2012/01/24/pc-verses-mac-let-the-debate-continue/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>&#160;</p>  <p>So, I know it’s hard to believe, but I am actually considering getting a Macbook to use as my main development computer.&#160; The reason is I’m using some beta mobile development tools that only support the Mac.&#160; The problem is that if I don’t use these tools and incrementally build my app with them, I will get my app far out of wac (wac being a technical term) that I will never be able to get it back in wac again.&#160; </p>  <p>So, I have a good friend who is a Mac wizard and I thought I’d ask him a question.&#160; Below is my question and his answer.&#160; Keep in mind, my friend is very technical in the Mac world.</p>  <p>Question from me (PC Guy):</p>  <blockquote>   <p>I’ve been trying to figure that out for myself which Mac model to get.&#160; If I get one, I want SandyBridge or later.&#160; I think that’s quad core, but hard to tell.&#160; Apple just seems to give dates on the refurbished site for their computers.&#160; It’s also good to know they work with 16gb ram.&#160; I need that because I run big fat windows VM’s.&#160; The other thing I can’t quite figure out is if the 15’s support 2 drives internally if you are willing to forego the optical drive.&#160; I like to run the boot drive as SSD (SATA3) and the secondary drive as just a normal SATA2 or SATA3.</p> </blockquote>  <p>My Friends answer (MAC Guy)</p>  <blockquote>   <p>You&#8217;re talking like a pc guy. Pick the prettiest one.</p></blockquote><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/AbYpZA6bExc" height="1" width="1"/>]]></content:encoded><description>&amp;#160;  So, I know it’s hard to believe, but I am actually considering getting a Macbook to use as my main development computer.&amp;#160; The reason is I’m using some beta mobile development tools that only support the Mac.&amp;#160; The problem is that if I don’t use these tools and incrementally build my app with [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2012/01/24/pc-verses-mac-let-the-debate-continue/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">2</slash:comments><feedburner:origLink>http://peterkellner.net/2012/01/24/pc-verses-mac-let-the-debate-continue/</feedburner:origLink></item><item><title>Create A Simple MVC Button Click Listener in SenchaTouch2</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/E80PpvEpFvI/</link><category>Sencha</category><category>SenchaMVC</category><category>Visual Studio 2010</category><category>visu</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Mon, 23 Jan 2012 20:14:39 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2012/01/23/create-a-simple-mvc-button-click-listener-in-senchatouch2/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>&#160;</p>  <p>I do not even want to admit how much time I spent today in a more complex application trying to get a <a href="http://www.sencha.com/learn/layout-faq/">button</a> to respond to a tap event in <a href="http://www.sencha.com/products/touch/">SenchaTouch 2.0 Beta</a>.&#160; I did notice several people like me on the forums with similar issues, but I did not find one concrete example that made the simple “click a <a href="http://miamicoder.com/2010/creating-sencha-touch-toolbar-buttons/">button application</a>”.&#160; Of course I’m building this in <a href="http://www.microsoft.com/visualstudio/en-us">Microsoft Visual Studio 2010</a> and debugging with <a href="https://chrome.google.com/">Chrome</a>.&#160; Let me start at the end.&#160; When you are done, you will have a simple two button page that you can click on either button and have your MVC controller react to either button as well as trap the button hit inside the actual Panel.</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image12.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image_thumb10.png" width="431" height="255" /></a></p>  <p>&#160;</p>  <p>And for those of you that have read enough, here is the source:&#160;&#160; <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:6cf571a4-5052-4531-9334-dc07fcce1ced" class="wlWriterEditableSmartContent"><p> <a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/Sencha2MVCButtons1.zip" target="_blank">ZIP File Of Project With 2 Buttons and Listeners</a></p></div> </p>  <p>&#160;</p>  <p>&#160;</p>  <h2>The Nitty Gritty</h2>  <p>Creating an SenchaTouch project with MVC is a little tricky to setup.&#160; You need to get all the directories right.&#160; My favorite way to do this is to use the Sencha Designer to create the project, then abandon it if I want to strike out on my own.&#160; That is what I’ve done here.&#160; I don’t even think you can tell.</p>  <p>Here is the file layout as seen from Visual Studio:</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image13.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image_thumb11.png" width="213" height="170" /></a></p>  <p>5 Files and 3 directories.</p>  <p>Let’s first take a look at the Panel that contains the buttons.&#160; Here is the code:</p>  <pre class="csharpcode">Ext.define(<span class="str">'MyApp.view.MyPanel'</span>, {
    extend: <span class="str">'Ext.Panel'</span>,
    alias: <span class="str">'widget.mypanel'</span>,
    config: {
        items: [
            {
                xtype: <span class="str">'button'</span>,
                itemId: <span class="str">'mybutton1'</span>,
                text: <span class="str">'MyButton1'</span>,
                action: <span class="str">'b1'</span>
            },
            {
                xtype: <span class="str">'button'</span>,
                itemId: <span class="str">'mybutton2'</span>,
                text: <span class="str">'MyButton2'</span>,
                action: <span class="str">'b2'</span>
            }
        ],

        listeners: [
            {
                fn: <span class="str">'onMybutton1Tap'</span>,
                <span class="kwrd">event</span>: <span class="str">'tap'</span>,
                <span class="kwrd">delegate</span>: <span class="str">'#mybutton1'</span>
            }
        ]
    },
    onMybutton1Tap: <span class="kwrd">function</span> (button, e, options) {
        console.log(<span class="str">'tap from mybutton1'</span>);
    }
});</pre>

<p><style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>Just a couple things to notice.&#160; 1) I’m defining an itemId which we will only be using in the local event (onMybutton1Tap).&#160; If you notice the listener has a property delegate which looks for that.&#160; I’m not sure if this is the best way to do this.&#160; I’ve notice several forum people saying use the “on” syntax.&#160; I did not find an example of that so this is what we have and it works.&#160; Also notice the action property.&#160; If you try and look that up on the SenchaTouch doc’s you will not find it.&#160; I just made it up out of thin air (really!, well, I followed others examples).&#160; I actually asked about this in the forums and I was told that is OK.&#160; As a type safe language guy, it hurts, but I did it.</p>

<p>&#160;</p>

<p>That’s it for the view.&#160; Let’s move over to the controller.&#160; Here is the source for that:</p>

<pre class="csharpcode">Ext.define(<span class="str">'MyApp.controller.MyController'</span>, {
    extend: <span class="str">'Ext.app.Controller'</span>,

    views: [
        <span class="str">'MyPanel'</span>
    ],

    refs: [
        {
            <span class="kwrd">ref</span>: <span class="str">'MyPanel'</span>,
            selector: <span class="str">'mypanel'</span>
        }],

    init: <span class="kwrd">function</span> () {

        <span class="kwrd">this</span>.control({
            <span class="str">'button[action=b1]'</span>: {
                tap: <span class="kwrd">this</span>.onButtonTap1
            },
            <span class="str">'button[action=b2]'</span>: {
                tap: <span class="kwrd">this</span>.onButtonTap2
            }
        });
    },

    onLaunch: <span class="kwrd">function</span> () {
        console.log(<span class="str">'onLaunch'</span>);
    },

    onButtonTap1: <span class="kwrd">function</span> () {
        console.log(<span class="str">'controller: onButtonTap1'</span>);
    },

    onButtonTap2: <span class="kwrd">function</span> () {
        console.log(<span class="str">'controller: onButtonTap2'</span>);
    },

    config: {

    }
});</pre>

<p><style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>Basically, what this is doing is filtering all buttons, then looking at just the buttons that have an action of b1 or b2.&#160; If this was a large application, we’d probably want to do some more fancy component querying, but for now, this is OK.&#160; If you keep your controllers small, this should always work.</p>

<p>&#160;</p>

<p>That’s it for now.&#160; Download the source and run it.&#160; I hope it saves you a ton of time.&#160; </p>

<p>As always any experts want to comment and improve or correct what I’ve done, please feel free to comment.&#160; </p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/E80PpvEpFvI" height="1" width="1"/>]]></content:encoded><description>&amp;#160;  I do not even want to admit how much time I spent today in a more complex application trying to get a button to respond to a tap event in SenchaTouch 2.0 Beta.&amp;#160; I did notice several people like me on the forums with similar issues, but I did not find one concrete [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2012/01/23/create-a-simple-mvc-button-click-listener-in-senchatouch2/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://peterkellner.net/2012/01/23/create-a-simple-mvc-button-click-listener-in-senchatouch2/</feedburner:origLink></item><item><title>vaasnet, Awesome First Experience.  Need a VM Now, for just 2 hours?</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/9FBrZ0IqnCU/</link><category>VPS</category><category>hosting</category><category>web</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Thu, 19 Jan 2012 16:09:50 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2012/01/19/vaasnet-awesome-first-experience-need-a-vm-now-for-just-2-hours/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>&#160;</p>  <p>I’ve known about <a href="http://www.vaasnet.com/">vaasnet</a> for quite a while.&#160; Basically, <a href="http://www.vaasnet.com/">vaasnet</a> is a way to almost instantly (OK, it took about 4 seconds to come up) grab a fresh VM (currently 99 cents an hour), do a bunch of stuff and go away.&#160; My bunch of stuff was I need to download a bittorrent file that was about 5 gig and I know if I do it from either home or over my hotspot, bad things will happen.&#160; If I do it at home, <a href="http://xfinity.comcast.net/?">Comcast</a> will send me a letter accusing me of stealing something, and if I use my <a href="http://www.verizonwireless.com/b2c/index.html">Verizon</a> hotspot, well, it’s a 5 gig per month plan.&#160; You do the math.</p>  <p>Back to vaasnet.&#160; Here is my experience today:</p>  <ol>   <li>30 seconds to put my credit card it</li>    <li>4 seconds to boot a general purpose workstation</li>    <li>5 seconds to RDP into it</li>    <li>2 minutes to download bit torrent</li>    <li>35 minutes to have bit torrent download a 5 gig file!</li>    <li>35 minutes to have bit torrent download a 5 gig file (had to say it twice)</li>    <li>1 minute to transfer the file to my <a href="http://www.orcsweb.com/">ORCSWeb</a> server I already have</li>    <li>$1.70 billed to my credit card.</li>    <li>OMG!</li> </ol>  <p>I think that about says it all.&#160; OK, maybe not it all.</p>  <p>I’ll be back!</p>  <p>OK, now that says it all.</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image11.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image_thumb9.png" width="501" height="429" /></a></p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/9FBrZ0IqnCU" height="1" width="1"/>]]></content:encoded><description>&amp;#160;  I’ve known about vaasnet for quite a while.&amp;#160; Basically, vaasnet is a way to almost instantly (OK, it took about 4 seconds to come up) grab a fresh VM (currently 99 cents an hour), do a bunch of stuff and go away.&amp;#160; My bunch of stuff was I need to download a bittorrent [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2012/01/19/vaasnet-awesome-first-experience-need-a-vm-now-for-just-2-hours/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><feedburner:origLink>http://peterkellner.net/2012/01/19/vaasnet-awesome-first-experience-need-a-vm-now-for-just-2-hours/</feedburner:origLink></item><item><title>EntityFramework CodeFirst and AutoKey Generation</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/NbAyO6oEqhc/</link><category>CodeFirst</category><category>Entity Framework</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Sun, 15 Jan 2012 13:02:45 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2012/01/15/entityframework-codefirst-and-autokey-generation/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>&#160;</p>  <p>This one had me a little stumped, and as usual, there are not enough examples in the <a href="http://www.microsoft.com/en-us/default.aspx">Microsoft</a> documentation to be very helpful. I’m using <a href="http://msdn.microsoft.com/en-us/data/aa937723">EntityFramework</a> <a href="http://msdn.microsoft.com/en-us/data/hh134698">CodeFirst</a> with <a href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions">Visual Studio</a> 2011.&#160; Let’s assume you create a class as follows:</p>  <p>&#160;</p>  <pre class="csharpcode"><span class="kwrd">public</span> <span class="kwrd">class</span> CongressNumber
    {
        [Key]
        <span class="kwrd">public</span> <span class="kwrd">int</span> CongressNumberValue { get; set; }
    }</pre>

<p><style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style></p>

<p>Then, you manually set the value of CongressNumberValue to 112.&#160; I’d certainly think that is a reasonable thing to do. I know that the Microsoft guys often special case Id or id, but hard to believe they would take something like CongressNumberValue and assume I meant that to be an autogenerating Identity column.&#160; Well, it seems they do that and the doc’s don’t even mention it.&#160; </p>

<p>After first, finding the <a href="http://msdn.microsoft.com/en-us/library/gg197525(v=vs.103).aspx">page on annotations</a>, I discovered that what we really need to set is this to have it work as we want (with no identity key generation).</p>

<pre class="csharpcode"> <span class="kwrd">public</span> <span class="kwrd">class</span> CongressNumber
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        <span class="kwrd">public</span> <span class="kwrd">int</span> CongressNumberValue { get; set; }
    }</pre>

<p>I found this after drilling down some in there doc.&#160; What surprises me is that no where does it mention that if you have a string, that does not get database generated, but if you have an int, that does.&#160; I wonder what happens if you have a Guid? (I’ll leave that up to someone who wants to use a guid).</p>

<p>I would have loved to put in my own comments on the page: <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.databasegeneratedoption(v=vs.103).aspx">http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.databasegeneratedoption(v=vs.103).aspx</a> but there was no user comment section.&#160; Oh well.</p>

<p>To be fair, on the page: <a href="http://msdn.microsoft.com/en-us/library/gg197525(v=vs.103).aspx">http://msdn.microsoft.com/en-us/library/gg197525(v=vs.103).aspx</a> it does explain about identity and integers but when I had my issue, I was already on the detail page.&#160; Seems to me the detail page should have more information on it than the summary page that leads in.&#160; The only reason I found it was because while writing this post, I went back to get the proper links.</p>

<p>&#160;</p>

<p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image10.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image_thumb8.png" width="542" height="89" /></a></p>

<p>HTH’s.</p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/NbAyO6oEqhc" height="1" width="1"/>]]></content:encoded><description>&amp;#160;  This one had me a little stumped, and as usual, there are not enough examples in the Microsoft documentation to be very helpful. I’m using EntityFramework CodeFirst with Visual Studio 2011.&amp;#160; Let’s assume you create a class as follows:  &amp;#160;  public class CongressNumber
    {
     [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2012/01/15/entityframework-codefirst-and-autokey-generation/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://peterkellner.net/2012/01/15/entityframework-codefirst-and-autokey-generation/</feedburner:origLink></item><item><title>When Using EF CodeFirst With Visual Studio, How to Live With Cannot drop database because it is in use error.</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/qok4XTrmHjQ/</link><category>CodeFirst</category><category>Entity Framework</category><category>SQL</category><category>Sql Server</category><category>Sql Server CE</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Sun, 15 Jan 2012 10:58:50 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2012/01/15/when-using-ef-codefirst-with-visual-studio-how-to-live-with-cannot-drop-database-because-it-is-in-use-error/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<h2>   <p>Problem</p> </h2>  <p>So, if you have been doing development with <a href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions">Visual Studio 2010</a>, <a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=8363">Entity Framework</a> <a href="http://msdn.microsoft.com/en-us/data/aa937723">CodeFirst</a>, <a href="http://www.microsoft.com/sqlserver/en/us/default.aspx">SqlServer</a> or <a href="http://en.wikipedia.org/wiki/SQL_Server_Compact">SqlServerCE</a> for any amount of time, you’ll quickly run into the problem that the database can not be reinitialized because it is open.&#160; Basically, the scenario is this.</p>  <p>1)&#160; Put in your <a href="http://msdn.microsoft.com/en-us/library/2027ewzw.aspx">Global.asax.cs</a> file a line that always recreates the database (naturally because you are in a development mode and as you constantly change your model and seed data).&#160; The line is something like this:&#160; Database.SetInitializer(new <a href="http://msdn.microsoft.com/en-us/library/gg679506(v=vs.103).aspx">DropCreateDatabaseAlways</a>&lt;SiteDB&gt;());</p>  <p>2)&#160; Run your application with something like Debug/Run (All is fine)</p>  <p>3)&#160; Go into the database browser (either in Visual Studio or Enterprise Manager)&#160; and look at some data.</p>  <p>4)&#160; Run your application again and you will get this error: “[SqlException (0x80131904): Cannot drop database &quot;NewYorkTimesDb&quot; because it is currently in use.]”.&#160; This is because your database browser has a connection to the database and until it is dropped, you can not drop the catalog.</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image9.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image_thumb7.png" width="574" height="199" /></a></p>  <p>&#160;</p>  <h2>Solutions</h2>  <p>&#160;</p>  <p>The easiest and guaranteed to work solution is just to restart your SqlServer database server (control panel, services).&#160; This is what I use to do but finally got tired of that because it takes about 20 seconds and, well, I’m very impatient.</p>  <p>The other solution <a href="http://stackoverflow.com/questions/11620/how-do-you-kill-all-current-connections-to-a-sql-server-2005-database">I found</a> in the forums (can’t find the link right now) is to execute the following script from the master database catalog:</p>  <pre class="csharpcode"><span class="kwrd">use</span> master
<span class="kwrd">ALTER</span> <span class="kwrd">DATABASE</span> NewYorkTimesDb 
   <span class="kwrd">SET</span> SINGLE_USER <span class="kwrd">WITH</span> <span class="kwrd">ROLLBACK</span> <span class="kwrd">IMMEDIATE</span> 
<span class="kwrd">ALTER</span> <span class="kwrd">DATABASE</span> NewYorkTimesDb <span class="kwrd">SET</span> MULTI_USER</pre>

<p>Basically, just switching from multi-user to single-user and back clears the connections.</p>

<p>HTH’s!<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style></p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/qok4XTrmHjQ" height="1" width="1"/>]]></content:encoded><description>Problem   So, if you have been doing development with Visual Studio 2010, Entity Framework CodeFirst, SqlServer or SqlServerCE for any amount of time, you’ll quickly run into the problem that the database can not be reinitialized because it is open.&amp;#160; Basically, the scenario is this.  1)&amp;#160; Put in your [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2012/01/15/when-using-ef-codefirst-with-visual-studio-how-to-live-with-cannot-drop-database-because-it-is-in-use-error/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://peterkellner.net/2012/01/15/when-using-ef-codefirst-with-visual-studio-how-to-live-with-cannot-drop-database-because-it-is-in-use-error/</feedburner:origLink></item><item><title>How To Permanently Turn Off Personal Search Results in Google</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/d02laEdibWU/</link><category>google</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Sat, 14 Jan 2012 16:47:01 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2012/01/14/how-to-permanently-turn-off-personal-search-results-in-google/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Not sure if you are like me, but I use both Bing and Google for search.&#160; Lately, my top 10 or so search results on everything I type are from my <a href="http://google.com">Google</a> circles people.&#160; The <a href="http://www.huffingtonpost.com/larry-magid/google-personal-search-results-_b_1206420.html">problem</a> is I want the best or most popular answer, not the one that one of my google circles people may have typed.&#160; So, here are the steps:</p>  <p>1.&#160; Search for something on Google.</p>  <p>2.&#160; Click on the little wheel in the upper right</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image5.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image_thumb4.png" width="244" height="83" /></a></p>  <p>3.&#160; Choose Search Settings</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image6.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image_thumb5.png" width="224" height="222" /></a></p>  <p>4. Change the results to not use personal results</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image8.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image_thumb6.png" width="433" height="134" /></a></p>  <p>5. Press Save.</p>  <p>&#160;</p>  <p>That’s it! Now, things are as they were.</p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/d02laEdibWU" height="1" width="1"/>]]></content:encoded><description>Not sure if you are like me, but I use both Bing and Google for search.&amp;#160; Lately, my top 10 or so search results on everything I type are from my Google circles people.&amp;#160; The problem is I want the best or most popular answer, not the one that one of my google circles people [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2012/01/14/how-to-permanently-turn-off-personal-search-results-in-google/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://peterkellner.net/2012/01/14/how-to-permanently-turn-off-personal-search-results-in-google/</feedburner:origLink></item><item><title>Building a Simple 2 Card Carousel with SenchaTouch 2</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/zwmKfj0gNvM/</link><category>JavaScript</category><category>Sencha</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Mon, 09 Jan 2012 13:58:01 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2012/01/09/building-a-simple-2-card-carousel-with-senchatouch-2/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>It was surprisingly difficult for me to build a very simple <a href="http://www.sencha.com/learn/touch">Carousel</a> application with <a href="http://www.sencha.com/products/touch/">SenchaTouch</a> 2.0 so I thought I’d make a short blog post with the example code in the hopes it saves someone else some time.&#160; Basically, since this runs from the <a href="http://www.sencha.com/">Sencha</a> CDN, you should be able to paste this code directly into your web site as an html page and it should run directly.</p>  <p>The fact that you have to have an items array inside an items array is a little confusing as well as having to specify the height or nothing comes out.&#160; I’m used to using flex: 1 to get the width right, but I had forgotten about height.</p>  <p>Here is what is created and the html and <a href="http://en.wikipedia.org/wiki/JavaScript">JavaScript</a> code.</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image4.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image_thumb3.png" width="244" height="175" /></a></p>  <p>&#160;</p>  <p>and the html:</p>  <p>&#160;</p>  <pre class="csharpcode"><span class="kwrd">&lt;!</span><span class="html">DOCTYPE</span> <span class="attr">html</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">html</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">head</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">meta</span> <span class="attr">http-equiv</span><span class="kwrd">=&quot;Content-Type&quot;</span> <span class="attr">content</span><span class="kwrd">=&quot;text/html; charset=utf-8&quot;</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">title</span><span class="kwrd">&gt;</span>SenchaTouch 2.0 Carousel Example From PeterKellner.net<span class="kwrd">&lt;/</span><span class="html">title</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">link</span> <span class="attr">rel</span><span class="kwrd">=&quot;stylesheet&quot;</span> <span class="attr">type</span><span class="kwrd">=&quot;text/css&quot;</span> <span class="attr">href</span><span class="kwrd">=&quot;http://extjs.cachefly.net/touch/sencha-touch-designer-edition/resources/css/sencha-touch.css&quot;</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">script</span> <span class="attr">type</span><span class="kwrd">=&quot;text/javascript&quot;</span> <span class="attr">src</span><span class="kwrd">=&quot;http://extjs.cachefly.net/touch/sencha-touch-designer-edition/sencha-touch-all-debug.js&quot;</span><span class="kwrd">&gt;&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span>
    &lt;script type=<span class="str">&quot;text/javascript&quot;</span>&gt;

        Ext.setup({
            fullscreen: <span class="kwrd">true</span>,
            onReady: <span class="kwrd">function</span> () {
                Ext.create(<span class="str">'Ext.Panel'</span>, {
                    fullscreen: <span class="kwrd">true</span>,
                    height: 200,
                    items: [{
                        xtype: <span class="str">'carousel'</span>,
                        height: 200,
                        items: [
                                {
                                    title: <span class="str">'title card 1'</span>,
                                    html: <span class="str">'card1'</span>,
                                    cls: <span class="str">'card1'</span>
                                },
                                {
                                    title: <span class="str">'title card 2'</span>,
                                    html: <span class="str">'card2'</span>,
                                    cls: <span class="str">'card2'</span>
                                }
                            ]
                    }]
                });
            }
        });
    <span class="kwrd">&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">head</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">body</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">body</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">html</span><span class="kwrd">&gt;</span></pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>

<p>HTH’s</p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/zwmKfj0gNvM" height="1" width="1"/>]]></content:encoded><description>It was surprisingly difficult for me to build a very simple Carousel application with SenchaTouch 2.0 so I thought I’d make a short blog post with the example code in the hopes it saves someone else some time.&amp;#160; Basically, since this runs from the Sencha CDN, you should be able to paste this code directly [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2012/01/09/building-a-simple-2-card-carousel-with-senchatouch-2/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://peterkellner.net/2012/01/09/building-a-simple-2-card-carousel-with-senchatouch-2/</feedburner:origLink></item><item><title>Debugging in Visual Studio 2011 Preview / WinRT Metro JavaScript With Live Watch Variables Pinned to the background</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/puRXxHugiiw/</link><category>Visual Studio 2011 Developer Preview</category><category>WinRT</category><category>Windows 8 Metro</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Tue, 03 Jan 2012 15:30:51 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2012/01/03/debugging-in-visual-studio-2011-preview-winrt-metro-javascript-with-live-watch-variables-pinned-to-the-background/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Yes, this is JavaScript I’m debugging in <a href="http://msdn.microsoft.com/en-us/vstudio/hh127353">Visual Studio 2011 Pre Release</a>.&#160; Just like <a href="http://msdn.microsoft.com/en-us/vstudio/hh388566">c#</a> and <a href="http://msdn.microsoft.com/en-us/vstudio/hh388568">vb</a>!&#160; A picture is worth hundreds of words, so, here is the picture (and of course the words will follow).</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image3.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image_thumb2.png" width="628" height="456" /></a></p>  <p>&#160;</p>  <p>About 1 year ago, I did a similar post explaining pinned variable with <a href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions">Visual Studio 2010</a> and the .net framework.</p>  <p><a title="http://peterkellner.net/2010/12/08/pinning-watch-variables-while-debugging-visual-studio-2010/" href="http://peterkellner.net/2010/12/08/pinning-watch-variables-while-debugging-visual-studio-2010/">http://peterkellner.net/2010/12/08/pinning-watch-variables-while-debugging-visual-studio-2010/</a></p>  <p>I won’t go into all the details again, but suffice it to say, everything is the same, but now I’m debugging in <a href="http://en.wikipedia.org/wiki/JavaScript">JavaScript</a>!&#160; Up until now, I’ve felt like Firebug, Chrome and IE debuggers in JavaScript were the best way to go.&#160; This really changes my mind.</p>  <p>If you notice, the problem I’m solving is I’m verifying that my min’s and max’s are tracking correctly.&#160; Notice that I can keep pressing “run” and as I do I can see the live new values without having to go search them out.&#160; Those variables are right where I want them.</p>  <p>Totally awesome!&#160; Nice job VS team.</p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/puRXxHugiiw" height="1" width="1"/>]]></content:encoded><description>Yes, this is JavaScript I’m debugging in Visual Studio 2011 Pre Release.&amp;#160; Just like c# and vb!&amp;#160; A picture is worth hundreds of words, so, here is the picture (and of course the words will follow).  &amp;#160;    &amp;#160;  About 1 year ago, I did a similar post explaining pinned variable [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2012/01/03/debugging-in-visual-studio-2011-preview-winrt-metro-javascript-with-live-watch-variables-pinned-to-the-background/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><feedburner:origLink>http://peterkellner.net/2012/01/03/debugging-in-visual-studio-2011-preview-winrt-metro-javascript-with-live-watch-variables-pinned-to-the-background/</feedburner:origLink></item><item><title>With Windows 8 Metro HTML5/CSS3/JavaScript/WinRT, Read Any File From Project Directory</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/AKJRh3V3Oso/</link><category>JavaScript</category><category>Visual Studio 2011 Developer Preview</category><category>Windows 8</category><category>Windows 8 Metro</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Tue, 03 Jan 2012 13:25:23 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2012/01/03/with-windows-8-metro-html5css3javascriptwinrt-read-any-file-from-project-directory/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>One of the standard things we programmers do is to read static files from our project directory.&#160; That is, say you put a <a href="http://json.org">json</a> file such as /data/stats_data.json at the root of your <a href="http://msdn.microsoft.com/en-us/vstudio/hh127353">Visual Studio 2011 PreRelease Developer Edition</a> project and you want to read it and convert it to a JavaScript object using <a href="http://msdn.microsoft.com/en-us/library/windows/apps/br211377.aspx">WinRT</a> (JSON.parse(..)).&#160; This post explains how to do that using the <a href="http://msdn.microsoft.com/en-us/windows/apps">Metro App Development Framework with JavaScript.</a></p>  <p>&#160;</p>  <div>   <div style="width: 450px; float: right">     <p>By way of background, this post was motivated by two threads I had with a great support helper on the MSDN forums named <a href="http://social.msdn.microsoft.com/profile/jpsanders/?ws=usercard-mini">Jeff Sanders</a>.&#160; The links are here:&#160; <a href="http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/4f27f674-8952-4e4e-bb17-dcdff74d0790">Thread 1</a>&#160; and <a href="http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/6c989bba-0455-41db-b414-7a30fd6904b5">Thread 2</a>.</p>   </div>    <div>     <p><a href="http://social.msdn.microsoft.com/profile/jpsanders/?ws=usercard-mini"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image2.png" width="184" height="244" /></a></p>   </div> </div>  <p>&#160;</p>  <p>First, let’s look at the basic empty project by creating a Blank Application as follows:</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image_thumb.png" width="394" height="370" /></a></p>  <p>&#160;</p>  <p>Then, drop some JavaScript into a new data directory which is what we plan on reading into our <a href="http://javascript.org">JavaScript</a>.</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image7.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image7_thumb.png" width="266" height="261" /></a></p>  <p>&#160;</p>  <p>Now, let’s add some code to the default.js file and one function called ReadAllDataFile that actually does the heavy lifting.&#160; Add to the default.html just one div tag in the body so we can prove we did something good, and run it.&#160; Below is the project that has all this in it. </p>  <table cellspacing="0" cellpadding="2" width="400" border="1"><tbody>     <tr>       <td width="114">Link To Download Project: </td>        <td valign="top" width="348">&#160; <div id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:80f27518-7944-460f-bd09-3c2747ae89e2" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"><p> <a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/MetroJSApp1.zip" target="_blank">Visual Studio 2011 Project With Source</a></p></div>       </td>     </tr>   </tbody></table>  <p>&#160;</p>  <p>And the explanation for the code pasted to the bottom with line numbers now (though it’s pretty self explanatory).&#160; If you feel the urge to cut and paste the code, you will get annoyed with my line numbers. I’d suggest grabbing the zip file of the project from above and using that code for pasting purposes.</p>  <ul>   <ul>     <li><u>Line 57</u> simple is the code that executes when the app launches. All it does is call our function ReadAllDataFile with the local path to the file we want.</li>      <li><u>Lines 4 and 5</u> get the location of our project. Remember, out deployment is actually copied some place totally different and packaged for running.&#160; It is not running in our local directory so it’s important that whatever file you reference be a part of your solution.</li>      <li><u>Lines 7 and 8</u> basically create a “promise” which when the file is accessed, will return and execute the anonymous function we are passing it (starting with ..(function(stream) {…).</li>      <li><u>Line 15</u> completes after the promise to read the file.</li>      <li><u>Line 19</u> should actually be enough, but I found that some json files have wide characters in them causing it to crash.&#160; The workaround is to read the bytes and convert them while stripping out the higher order characters.&#160; Remember, this is a simple example, you may want those high order characters.</li>      <li><u>Lines 36 and 37</u> grab the population of the state of New York (my home state) from the JSON file.</li>      <li><u>Line 40</u> displays it on the web page as follows:</li>   </ul> </ul>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image1.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2012/01/image_thumb1.png" width="244" height="150" /></a></p>  <p>(Tablet Simulator Screen Shot With Result Above)</p>  <p>default.js:</p>  <div class="csharpcode">   <pre><span class="lnum">   1:  </span><span class="rem">// read the file you want</span></pre>

  <pre><span class="lnum">   2:  </span><span class="kwrd">function</span> ReadAllDataFile(fileNameInLocalTree) {</pre>

  <pre><span class="lnum">   3:  </span>    </pre>

  <pre><span class="lnum">   4:  </span>    <span class="kwrd">var</span> package = Windows.ApplicationModel.Package.current;</pre>

  <pre><span class="lnum">   5:  </span>    <span class="kwrd">var</span> installedLocation = package.installedLocation;</pre>

  <pre><span class="lnum">   6:  </span>&#160;</pre>

  <pre><span class="lnum">   7:  </span>    installedLocation.createFileAsync(fileNameInLocalTree, Windows.Storage.CreationCollisionOption.openIfExists).then(<span class="kwrd">function</span> (dataFile) {</pre>

  <pre><span class="lnum">   8:  </span>        dataFile.openAsync(Windows.Storage.FileAccessMode.read).then(<span class="kwrd">function</span> (stream) {</pre>

  <pre><span class="lnum">   9:  </span>            <span class="kwrd">var</span> size = stream.size;</pre>

  <pre><span class="lnum">  10:  </span>            <span class="kwrd">if</span> (size == 0) {</pre>

  <pre><span class="lnum">  11:  </span>                <span class="rem">// Data not found</span></pre>

  <pre><span class="lnum">  12:  </span>            }</pre>

  <pre><span class="lnum">  13:  </span>            <span class="kwrd">else</span> {</pre>

  <pre><span class="lnum">  14:  </span>                <span class="kwrd">var</span> inputStream = stream.getInputStreamAt(0);</pre>

  <pre><span class="lnum">  15:  </span>                <span class="kwrd">var</span> reader = <span class="kwrd">new</span> Windows.Storage.Streams.DataReader(inputStream);</pre>

  <pre><span class="lnum">  16:  </span>&#160;</pre>

  <pre><span class="lnum">  17:  </span>                reader.loadAsync(size).then(<span class="kwrd">function</span> () {</pre>

  <pre><span class="lnum">  18:  </span>&#160;</pre>

  <pre><span class="lnum">  19:  </span>                    <span class="rem">//var contents = reader.readString(size); // fails with multibyte error if bad data (see legislators.getList.json)</span></pre>

  <pre><span class="lnum">  20:  </span>&#160;</pre>

  <pre><span class="lnum">  21:  </span>                    <span class="rem">// allocate the full array so readBytes can insert it in full</span></pre>

  <pre><span class="lnum">  22:  </span>                    <span class="kwrd">var</span> array = <span class="kwrd">new</span> Array(size);</pre>

  <pre><span class="lnum">  23:  </span>                    reader.readBytes(array);</pre>

  <pre><span class="lnum">  24:  </span>                    </pre>

  <pre><span class="lnum">  25:  </span>                    <span class="kwrd">var</span> newString = <span class="str">&quot;&quot;</span>;</pre>

  <pre><span class="lnum">  26:  </span>                    <span class="kwrd">for</span> (<span class="kwrd">var</span> i = 0; i &lt; array.length; i++) {</pre>

  <pre><span class="lnum">  27:  </span>                        <span class="rem">// only printable characters (include spaces because could be part of names) (very rough here)</span></pre>

  <pre><span class="lnum">  28:  </span>                        <span class="rem">// http://www.csgnetwork.com/asciiset.html</span></pre>

  <pre><span class="lnum">  29:  </span>                        <span class="kwrd">if</span> (array[i] &gt;= 32 &amp;&amp; array[i] &lt;= 126) {</pre>

  <pre><span class="lnum">  30:  </span>                            <span class="kwrd">var</span> c = String.fromCharCode(array[i]);</pre>

  <pre><span class="lnum">  31:  </span>                            newString += c;</pre>

  <pre><span class="lnum">  32:  </span>                        }</pre>

  <pre><span class="lnum">  33:  </span>                    }</pre>

  <pre><span class="lnum">  34:  </span>&#160;</pre>

  <pre><span class="lnum">  35:  </span>                    </pre>

  <pre><span class="lnum">  36:  </span>                    <span class="kwrd">var</span> result = JSON.parse(newString);</pre>

  <pre><span class="lnum">  37:  </span>                    <span class="kwrd">var</span> newYorkPopulation = result.NY.P001001;</pre>

  <pre><span class="lnum">  38:  </span>&#160;</pre>

  <pre><span class="lnum">  39:  </span>                    <span class="rem">// output to the screen</span></pre>

  <pre><span class="lnum">  40:  </span>                    document.getElementById(<span class="str">'outputhere'</span>).innerHTML = <span class="str">&quot;New York Population: &quot;</span> + newYorkPopulation;</pre>

  <pre><span class="lnum">  41:  </span>                    </pre>

  <pre><span class="lnum">  42:  </span>                });</pre>

  <pre><span class="lnum">  43:  </span>            }</pre>

  <pre><span class="lnum">  44:  </span>        })</pre>

  <pre><span class="lnum">  45:  </span>    });</pre>

  <pre><span class="lnum">  46:  </span>}</pre>

  <pre><span class="lnum">  47:  </span>&#160;</pre>

  <pre><span class="lnum">  48:  </span>(<span class="kwrd">function</span> () {</pre>

  <pre><span class="lnum">  49:  </span>    <span class="str">'use strict'</span>;</pre>

  <pre><span class="lnum">  50:  </span>    <span class="rem">// Uncomment the following line to enable first chance exceptions.</span></pre>

  <pre><span class="lnum">  51:  </span>    Debug.enableFirstChanceException(<span class="kwrd">true</span>);</pre>

  <pre><span class="lnum">  52:  </span>&#160;</pre>

  <pre><span class="lnum">  53:  </span>    WinJS.Application.onmainwindowactivated = <span class="kwrd">function</span> (e) {</pre>

  <pre><span class="lnum">  54:  </span>        <span class="kwrd">if</span> (e.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) {</pre>

  <pre><span class="lnum">  55:  </span>            </pre>

  <pre><span class="lnum">  56:  </span>            <span class="rem">// start of my insert code            </span></pre>

  <pre><span class="lnum">  57:  </span>            ReadAllDataFile(<span class="str">&quot;\data\\states_data.json&quot;</span>);</pre>

  <pre><span class="lnum">  58:  </span>            <span class="rem">// end of my insert code</span></pre>

  <pre><span class="lnum">  59:  </span>        }</pre>

  <pre><span class="lnum">  60:  </span>    }</pre>

  <pre><span class="lnum">  61:  </span>&#160;</pre>

  <pre><span class="lnum">  62:  </span>    WinJS.Application.start();</pre>

  <pre><span class="lnum">  63:  </span>})();</pre>
</div>
<style type="text/css">







.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>

<p>&#160;</p>

<p>Hope this Helps!&#160; Remember, these are pre-beta bits so things could change when production comes a long.&#160; Feel free to add comments to this post and let me know if it stops working.&#160; </p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/AKJRh3V3Oso" height="1" width="1"/>]]></content:encoded><description>One of the standard things we programmers do is to read static files from our project directory.&amp;#160; That is, say you put a json file such as /data/stats_data.json at the root of your Visual Studio 2011 PreRelease Developer Edition project and you want to read it and convert it to a JavaScript object using WinRT [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2012/01/03/with-windows-8-metro-html5css3javascriptwinrt-read-any-file-from-project-directory/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://peterkellner.net/2012/01/03/with-windows-8-metro-html5css3javascriptwinrt-read-any-file-from-project-directory/</feedburner:origLink></item><item><title>stackoverflow Really annoyed me this morning!</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/jtQdwv5DkSg/</link><category>forums</category><category>stackoverflow</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Sat, 31 Dec 2011 11:09:34 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2011/12/31/stackoverflow-really-annoyed-me-this-morning/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>For the past month or so, I’ve been more involved at <a href="http://stackoverflow.com/">stackoverflow</a> than I have ever been.&#160; I’ve accumulated 317 points (not much, but enough to be part of the community) and until this morning, I had forgotten what I don’t like about this community site.</p>  <p>Specifically, I asked a very straight forward question which I feel I asked both respectfully and appropriately.&#160; I created a very succinct title and tagged it in a very reasonable way.&#160; I’m definitely not a JavaScript/IPad wizard, but I do know how to effectively work with community forums.</p>  <p>My Question:&#160; “<a href="http://stackoverflow.com/questions/8685978/heuristically-figuring-out-whether-im-running-ipad1-or-ipad2">Heuristically figuring out whether I&#8217;m running IPad1 or IPad2</a>”</p>  <p>Let me go through the responses 1 by 1 and I think you will see how this really annoyed me.</p>  <ol>   <li>nnnnn responds with “<u>what do you mean “heuristically</u>”.&#160;&#160;&#160; Well nnnn, shall I google that for you?&#160; how about if you read my question and looked up heuristically you would know the answer to your own question, but then, nnnnn has over 9000 points so who am I to suggest something like that.</li>    <li>Mitch tells me to “<u>Fix the cause, NOT the symptoms</u>”.&#160; Well Mitch, did you find that in some book of snappy forum retorts?&#160; How do you know that my problems can be fixed by reducing memory usage without killing the usefulness of the solution.&#160; No Mitch, you don’t know that so another unhelpful answer, but again, Mitch has over 11,000 points so again, how am I to criticize.</li>    <li>Finally, the last comment (by definition) says “<u>closed as exact duplicate</u> by Sam152 (5917 points), nnnnn (9527 points), Don Roby (11,854 points), Mitch Wheat (103,375 points) and Ben Voight (66,445 points).&#160; There reason which is that my question is a duplicate is patently false.&#160; Also, the answer they point to is also patently false!&#160; Running IOS 5.0.1 on both IPad1 and IPad2 return identical device strings.&#160; I know because I have both devices and I’ve tested that.&#160; Not only that, I’m guessing none of all those high point people even read my question which explicitly asked for a heuristic solution.</li> </ol>  <p>Bottom line, very frustrating.&#160; I’m sure there a lot of good things going on at stackoverflow, however today, I feel like a squashed bug with my question.&#160; On a slightly positive note, 2 people did point out that the question shows research effort and voted up the question so I guess it’s not a lost cause (even though the door has been slammed shut but the 5 stack overflow veterans who marked the question as “exact duplicate”.&#160; I asked for it to be reopened but I suspect after this post I will probably lose my 317 points for questioning the kings.</p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/jtQdwv5DkSg" height="1" width="1"/>]]></content:encoded><description>For the past month or so, I’ve been more involved at stackoverflow than I have ever been.&amp;#160; I’ve accumulated 317 points (not much, but enough to be part of the community) and until this morning, I had forgotten what I don’t like about this community site.  Specifically, I asked a very straight forward question [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2011/12/31/stackoverflow-really-annoyed-me-this-morning/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><feedburner:origLink>http://peterkellner.net/2011/12/31/stackoverflow-really-annoyed-me-this-morning/</feedburner:origLink></item><item><title>How To Quick Launch Programs in Windows 8 Without Metro</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/HWep2s2kSI4/</link><category>Windows 8</category><category>Windows 8 Metro</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Sat, 31 Dec 2011 08:12:07 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2011/12/31/how-to-quick-launch-programs-in-windows-8-without-metro/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>I’ve been building a small app in <a href="http://en.wikipedia.org/wiki/Windows_8">Windows 8</a> <a href="http://msdn.microsoft.com/en-us/windows/apps/br229512">Metro</a> so have been learning quite a bit about how to use my desktop efficiently.&#160; One of the big hassles is that <a href="http://windows.microsoft.com/en-US/windows-8/preview">Windows 8</a> really wants you to use the Metro interface to launch programs.&#160; Probably on a single screen device or tablet with no physical keyboard this works well, but in a desktop environment where we all are use to the fast “start” button with search, the Metro interface is quite inconvenient.</p>  <p>So, my solution is to put as many <a href="https://buildwindowscontest.com/">apps</a> on my desktop as I can, then they are just one click away.&#160; The way I have found to do that is to launch file explorer, find the actual program you want to put on your desktop, right click on it and say “Add To Desktop” as is shown in the picture below:</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image14.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb13.png" width="256" height="336" /></a></p>  <p>&#160;</p>  <p>Notice that I’m actually putting the file explorer itself on my desktop.</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image15.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb14.png" width="83" height="108" /></a></p>  <p>&#160;</p>  <p>I’ve found that if I want to bring up multiple file explorers, then this is a good way to do that.&#160; If I bring it up by way of the Metro interface, I can only bring up one instance of file explorer.</p>  <blockquote>   <p><em><font style="background-color: #ffff00">*Note 1/3/2012 – I have discovered that if you press shift and launch from your task bar that an additional copy comes up rather than taking you to the first copy you launched.</font></em></p> </blockquote>  <p>HTH’s.</p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/HWep2s2kSI4" height="1" width="1"/>]]></content:encoded><description>I’ve been building a small app in Windows 8 Metro so have been learning quite a bit about how to use my desktop efficiently.&amp;#160; One of the big hassles is that Windows 8 really wants you to use the Metro interface to launch programs.&amp;#160; Probably on a single screen device or tablet with no physical [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2011/12/31/how-to-quick-launch-programs-in-windows-8-without-metro/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://peterkellner.net/2011/12/31/how-to-quick-launch-programs-in-windows-8-without-metro/</feedburner:origLink></item><item><title>Building A Windows 8 Metro Style JavaScript / HTML5 / CSS3 App Using ListView</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/k4256StmeYE/</link><category>.NET 4.5</category><category>HTML</category><category>HTML5</category><category>JavaScript</category><category>Windows 8</category><category>Windows 8 Metro</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Tue, 27 Dec 2011 14:08:36 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2011/12/27/building-a-windows-8-metro-style-javascript-html5-css3-app-using-listview/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>&#160;</p>  <h3>Background</h3>  <p>The new <a href="http://msdn.microsoft.com/en-us/library/windows/apps/">Windows 8 Developer environment</a> is seriously under documented at this point in it’s product life.&#160; <a href="http://www.microsoft.com/en-us/default.aspx">Microsoft</a> released a “Developer Preview” at the <a href="http://www.buildwindows.com/">Build Conference</a> in September, than has not done any noticeable updates or improvement on those bits.&#160; The Video’s online from build are very helpful because you can go through them in slow motion and see how to make things work.&#160; In this article, I’m going to go through the steps necessary in a lot of detail to build a simple list read-only list viewer of US Congress legislators in California.&#160; At the end, we’ll have something like the following working:</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image10.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb9.png" width="343" height="226" /></a></p>  <p>(actual tablet from build running the app)</p>  <p>&#160;</p>  <p>and the completed solution from Visual Studio 2011 (it’s always nice to have source)</p>  <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:1e923b73-d9ba-469f-ad29-75379fe3c99f" class="wlWriterSmartContent">   <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/CongressApp.zip" target="_blank">Visual Studio Project</a></p> </div>  <p>&#160;</p>  <h3>Getting Visual Studio 2011 Going To Create The Project</h3>  <p>First, launch <a href="http://msdn.microsoft.com/en-us/vstudio/hh127353">Visual Studio 2011</a> and give the standard File/New Project choice and chose JavaScript / Windows Metro Style / Fixed Layout Application as follows:</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image11.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb10.png" width="428" height="320" /></a></p>  <p>&#160;</p>  <p>Notice, there are two files we will primary work with, default.js and default.html. </p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image12.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb11.png" width="244" height="237" /></a></p>  <p>The default.html is a very classic html page with just the standard html doctype, some JavaScript includes, a style sheet and a simple div container.&#160; The default.js is actually what gives this page life.</p>  <p>One thing you’ll quickly discover if you have done much web development before (particularly JavaScript) is that unlike XAML in Visual Studio, there is no design view.&#160; This shouldn’t be an entire surprise because in Microsoft’s ASP.NET MVC, there also is know design view for html files.&#160; However, there is a really big difference here that I don’t see people pointing out clearly enough.&#160; I’m going to say it twice for emphasis.&#160; When you run your Metro App, there is no IE Debug, Firebug or Chrome Developer Tools to look at what are running (OK, I’ll spare saying it again, but this is really critical).&#160; The way most of us do web development that depends on a lot of JavaScript is to launch the application in the browser, then dive into the browser’s debugger and do all there debugging from there (that is by running the Visual Studio project outside the Visual Studio debugger.</p>  <p>Blend to the rescue! (more like fire, and without <a href="http://msdn.microsoft.com/en-us/windows/apps/br229516.aspx">Expression Blend</a>, the house would burn down).&#160; When you right click on the HTML file (as shown below) and open in blend, you will now see the page as if it were being run.&#160; I’ve noticed that if I load my JavaScript data stores from local arrays, those actually render, but if I try to pull data from a live data source they do not.&#160; I’m guessing that’s my misunderstanding for how to do it, rather than a product short coming.</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image13.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb12.png" width="244" height="203" /></a></p>  <p>&#160;</p>  <h3>Putting Down the ListView in HTML</h3>  <p>Let’s get down to some real work here.&#160; First, let’s open the default.html and put down a listview.&#160; Before though, let’s look at what the template gives us (it’s very simple and boring).</p>  <pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">body</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">data-win-control</span><span class="kwrd">=&quot;WinJS.UI.ViewBox&quot;</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">class</span><span class="kwrd">=&quot;fixed-layout&quot;</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">p</span><span class="kwrd">&gt;</span>Content goes here<span class="kwrd">&lt;/</span><span class="html">p</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">body</span><span class="kwrd">&gt;</span></pre>

<p>We’ll add all our stuff to the “Content goes here”.&#160; Fist, let’s add the listview control as follows:</p>

<pre class="csharpcode">&lt;div id=<span class="str">&quot;listview&quot;</span>
   <span class="kwrd">class</span>=<span class="str">&quot;flipView&quot;</span>
   data-win-control=<span class="str">&quot;WinJS.UI.ListView&quot;</span> 
   data-win-options=<span class="str">&quot;{dataSource: itemDataSource, itemRenderer: personTemplate,
       layout: {type: WinJS.UI.GridLayout, maxRows:2}}&quot;</span>
     style=<span class="str">&quot;margin: 15px 15px 15px 15px; left: -3px; top: 10px; height: 100%;width: 100%&quot;</span>&gt;
&lt;/div&gt;</pre>

<p>and the template itself:</p>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>

<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">id</span><span class="kwrd">=&quot;personTemplate&quot;</span> <span class="attr">data-win-control</span><span class="kwrd">=&quot;WinJS.Binding.Template&quot;</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">style</span><span class="kwrd">=&quot;width: 100%;height: 100%&quot;</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">style</span><span class="kwrd">=&quot;margin: 15px 15px 15px 15px&quot;</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">img</span> <span class="attr">data-win-bind</span><span class="kwrd">=&quot;src: govtrack_id convertGovTrackIdToImgTag&quot;</span> 
        <span class="attr">alt</span><span class="kwrd">=&quot;Databound image&quot;</span> <span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">h3</span><span class="kwrd">&gt;</span>
        Rep <span class="kwrd">&lt;</span><span class="html">span</span> <span class="attr">class</span><span class="kwrd">=&quot;content&quot;</span> <span class="attr">data-win-bind</span><span class="kwrd">=&quot;innerText: firstname&quot;</span><span class="kwrd">&gt;</span>
         <span class="kwrd">&lt;/</span><span class="html">span</span><span class="kwrd">&gt;</span><span class="attr">&amp;nbsp;</span><span class="kwrd">&lt;</span><span class="html">span</span> <span class="attr">class</span><span class="kwrd">=&quot;letter&quot;</span>
            <span class="attr">data-win-bind</span><span class="kwrd">=&quot;innerText: lastname&quot;</span><span class="kwrd">&gt;</span>
         <span class="kwrd">&lt;/</span><span class="html">span</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">h3</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span></pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style><style type="text/css">



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>

<p>Remembering that any style that begins with data- is ignored by html and can be handled by the program for doing template type stuff, you see here that we have a windows control declared which is based in the WinRT runtime (WinJS.UI.ListView).&#160; We also have options set declaratively here in the data-win-options.&#160; All those can be set in the default.js file which is often easier because the intellisense helps us.</p>

<p>Explaining the options is as follows:</p>

<ol>
  <ol>
    <li>datasource:&#160; defined in the default.js and is what we refer to this listview’s data source with </li>

    <li>itemRenderer: next, I’ll explain this. It points at the div that has the actual rendered template </li>

    <li>layout: just says what kind of layout. in our case, GridLayout. </li>

    <li>style: should really be set in a class but I got a little lazy since I’m not so good at the CSS stuff </li>
  </ol>
</ol>

<p>And, don’t forget to update your depencies (namespaces for all your c# folks out there).&#160; Here are the ones you need to replace in your html file.</p>

<pre class="csharpcode">    <span class="kwrd">&lt;</span><span class="html">script</span> <span class="attr">type</span><span class="kwrd">=&quot;text/javascript&quot;</span> <span class="attr">src</span><span class="kwrd">=&quot;WinJS/js/base.js&quot;</span><span class="kwrd">&gt;&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span>
    &lt;script type=<span class="str">&quot;text/javascript&quot;</span> src=<span class="str">&quot;WinJS/js/ui.js&quot;</span>&gt;&lt;/script&gt;
    &lt;script type=<span class="str">&quot;text/javascript&quot;</span> src=<span class="str">&quot;WinJS/js/binding.js&quot;</span>&gt;&lt;/script&gt;
    &lt;script type=<span class="str">&quot;text/javascript&quot;</span> src=<span class="str">&quot;WinJS/js/controls.js&quot;</span>&gt;&lt;/script&gt;
    &lt;script type=<span class="str">&quot;text/javascript&quot;</span> src=<span class="str">&quot;WinJS/js/res.js&quot;</span>&gt;&lt;/script&gt;
    &lt;script type=<span class="str">&quot;text/javascript&quot;</span> src=<span class="str">&quot;WinJS/js/animations.js&quot;</span>&gt;&lt;/script&gt;
    &lt;script type=<span class="str">&quot;text/javascript&quot;</span> src=<span class="str">&quot;WinJS/js/uicollections.js&quot;</span>&gt;&lt;/script&gt;
    &lt;script type=<span class="str">&quot;text/javascript&quot;</span> src=<span class="str">&quot;WinJS/js/wwaapp.js&quot;</span>&gt;<span class="kwrd">&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span></pre>

<p>&#160;</p>
<style type="text/css">



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>

<p>&#160;</p>

<h3>JavaScript File Update</h3>

<p>Finally, let’s update the JavaScript file.&#160; First, we need to create a simple array that we will databind to.&#160; Then, we need to associate that array with the itemDataSource and finally execute.&#160; The only thing tricky we have here is a Converter that takes an Id and build an image src tag for the image control itself.&#160; Notice that the converter is called convertGovTrackIdToImgTag.&#160; It takes in a govTrackId and returns the full blown URL to tick in the image url.</p>

<p>All the source is below.</p>

<p>Hope this helps!</p>

<p>&#160;</p>

<p>&#160;</p>

<pre class="csharpcode">convertGovTrackIdToImgTag = WinJS.Binding.converter(<span class="kwrd">function</span> (govTrackId) {
    <span class="kwrd">var</span> retUrl = <span class="str">'http://www.govtrack.us/data/photos/'</span> + govTrackId + <span class="str">'-50px.jpeg'</span>;
    <span class="kwrd">return</span> retUrl;
});


<span class="kwrd">var</span> itemDataSource = {};

(<span class="kwrd">function</span> () {
    <span class="str">'use strict'</span>;
    <span class="rem">// Uncomment the following line to enable first chance exceptions.</span>
    Debug.enableFirstChanceException(<span class="kwrd">true</span>);

    <span class="rem">//allLegislatorsCreateFile();</span>


    WinJS.Application.onmainwindowactivated = <span class="kwrd">function</span> (e) {
        <span class="kwrd">if</span> (e.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) {

            <span class="kwrd">var</span> items = [];
            <span class="kwrd">var</span> itemsFresh = [{
                firstname: <span class="str">&quot;Barack&quot;</span>,
                lastname: <span class="str">&quot;Obama&quot;</span>,
                govtrack_id: <span class="str">&quot;400629&quot;</span>
            },
            {
                firstname: <span class="str">&quot;Adam&quot;</span>,
                lastname: <span class="str">&quot;Smith&quot;</span>,
                govtrack_id: <span class="str">&quot;400379&quot;</span>
            },
            {
                firstname: <span class="str">&quot;Adrian&quot;</span>,
                lastname: <span class="str">&quot;Smith&quot;</span>,
                govtrack_id: <span class="str">&quot;412217&quot;</span>
            }];
            items.push(itemsFresh[0]);
            items.push(itemsFresh[1]);
            items.push(itemsFresh[2]);

            itemDataSource = <span class="kwrd">new</span> WinJS.UI.ArrayDataSource(items);
            WinJS.UI.processAll();
        }
    }
    WinJS.Application.start();
})();</pre>
<style type="text/css">



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style><style type="text/css">



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/k4256StmeYE" height="1" width="1"/>]]></content:encoded><description>&amp;#160;  Background  The new Windows 8 Developer environment is seriously under documented at this point in it’s product life.&amp;#160; Microsoft released a “Developer Preview” at the Build Conference in September, than has not done any noticeable updates or improvement on those bits.&amp;#160; The Video’s online from build are very helpful because you can [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2011/12/27/building-a-windows-8-metro-style-javascript-html5-css3-app-using-listview/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://peterkellner.net/2011/12/27/building-a-windows-8-metro-style-javascript-html5-css3-app-using-listview/</feedburner:origLink></item><item><title>Installing the BUILD Windows 8 Preview Bits on My Lenovo W520 Plus 2 External Monitors</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/C2plaZ8zkYE/</link><category>Lenovo</category><category>Windows 8 Metro</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Sun, 25 Dec 2011 19:46:38 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2011/12/25/installing-the-build-windows-8-preview-bits-on-my-lenovo-w520-plus-2-external-monitors/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Lots of trial and error, however I think I finally have a repeatable process to install <a href="http://msdn.microsoft.com/en-us/windows">Windows 8 Preview</a> on my Lenovo W520 Laptop Computer.&#160; First, some things that <strong>don’t work</strong>.</p>  <ol>   <li>Use the NVidia drivers included with Windows Update</li>    <li>Use the NVidia drivers on the <a href="http://www.nvidia.com/content/global/global.php">NVidia</a> site</li>    <li>Use the Lenovo ThinkVantage System Update</li> </ol>  <p>And, for what does work.</p>  <ol>   <li>Set the bios mode to Discreet Mode</li>    <li>Boot from the USB key provided at BUILD</li>    <li>Make sure to skip installing the NVidia drivers on Windows Update</li>    <li>ReBoot a lot.&#160; After every possible prompt and update install</li>    <li>Download Just the NVidia Video driver from the <a href="http://support.lenovo.com/en_US/">Lenovo Web site</a></li>    <li>Don’t accept the second choice for more installation stuff when the NVidia driver prompts after about 15 minutes</li> </ol>  <p>What I Have:</p>  <ol>   <li>Display Port Attached to Dell 3007 (2560&#215;1600)</li>    <li>VGA Port Attached to Dell 20” monitor (1600&#215;1200)</li>    <li>Built In Video on W520 (1920&#215;1200)</li> </ol>  <p>And, yes, all three at the same time (see below picture.</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/3mon.jpg"><img title="3mon" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="3mon" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/3mon_thumb.jpg" width="343" height="265" /></a></p>  <p>&#160;</p>  <p>I’m still trying to find some kind of touch device that will let me do Metro type stuff.</p>  <p>Hope this helps!</p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/C2plaZ8zkYE" height="1" width="1"/>]]></content:encoded><description>Lots of trial and error, however I think I finally have a repeatable process to install Windows 8 Preview on my Lenovo W520 Laptop Computer.&amp;#160; First, some things that don’t work.     Use the NVidia drivers included with Windows Update    Use the NVidia drivers on the NVidia site  [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2011/12/25/installing-the-build-windows-8-preview-bits-on-my-lenovo-w520-plus-2-external-monitors/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><feedburner:origLink>http://peterkellner.net/2011/12/25/installing-the-build-windows-8-preview-bits-on-my-lenovo-w520-plus-2-external-monitors/</feedburner:origLink></item><item><title>Testing Help From the Twitter Sphere, Anyone have an IPad1 Handy?</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/KhTAY207cmY/</link><category>ASP.NET 2.0</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Thu, 22 Dec 2011 17:13:09 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2011/12/22/testing-help-from-the-twitter-sphere-anyone-have-an-ipad1-handy/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>I’ve been working on an HTML5/CSS3 <a href="http://sencha.com">SenchaTouch</a> project for many months now and near the end we our finding that we have problems on an IPad1 only and all I have is an IPad2.</p>  <p>My 700+ <a href="http://twitter.com">twitter</a> buddies to the rescue.</p>  <p>I tweet:&#160; </p>  <p><a href="http://twitter.com/pkellner"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image7.png" width="364" height="134" /></a></p>  <p>And, within about 5 minutes comes back:</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image8.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb7.png" width="368" height="369" /></a></p>  <p>&#160;</p>  <p>Not to mention from <a href="http://www.facebook.com/">Facebook</a>, another one because my tweets go to Facebook also.</p>  <p>&#160;</p>  <p><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image9.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb8.png" width="469" height="207" /></a></p>  <p>&#160;</p>  <p>At any rate, I had 3 different people testing my app on an Ipad1 within 15 minutes.</p>  <p>Totally awesome and thank you social buddies!</p><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/KhTAY207cmY" height="1" width="1"/>]]></content:encoded><description>I’ve been working on an HTML5/CSS3 SenchaTouch project for many months now and near the end we our finding that we have problems on an IPad1 only and all I have is an IPad2.  My 700+ twitter buddies to the rescue.  I tweet:&amp;#160;     And, within about 5 minutes comes [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2011/12/22/testing-help-from-the-twitter-sphere-anyone-have-an-ipad1-handy/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://peterkellner.net/2011/12/22/testing-help-from-the-twitter-sphere-anyone-have-an-ipad1-handy/</feedburner:origLink></item><item><title>I Love the Validation Error Messages I Get From EntityFramework CodeFirst 4.1!</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/GjLvkj4_bR0/</link><category>CodeFirst</category><category>Entity Framework</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Tue, 13 Dec 2011 21:20:22 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2011/12/13/i-love-the-validation-error-messages-i-get-from-entityframework-codefirst-4-1/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>I’ve been using <a href="http://msdn.microsoft.com/en-us/data/aa937723">EntityFramework’s</a> <a href="http://msdn.microsoft.com/en-us/data/gg685467">CodeFirst</a> 4.1 on a new project I’ve been working.&#160; I plan to blog quite&#160; bit about it, but in the mean time I just felt the need to share.&#160; I’ve got some fairly complex code where I add an object tree to the database context (which turns into SqlServer data).&#160; When I call db.SaveChanges(), I get an awesome error (see below) telling me exactly why it failed.</p>  <p>I’m currently on the honey moon with <a href="http://msdn.microsoft.com/en-us/data/hh134816">EF CodeFirst</a>.&#160; I only have about 10 tables (4 deep at most).&#160; Life is good.</p>&#160;&#160; <blockquote style="margin-right: 0px" dir="ltr"><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image6.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb6.png" width="616" height="302" /></a></blockquote><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/GjLvkj4_bR0" height="1" width="1"/>]]></content:encoded><description>I’ve been using EntityFramework’s CodeFirst 4.1 on a new project I’ve been working.&amp;#160; I plan to blog quite&amp;#160; bit about it, but in the mean time I just felt the need to share.&amp;#160; I’ve got some fairly complex code where I add an object tree to the database context (which turns into SqlServer data).&amp;#160; When [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2011/12/13/i-love-the-validation-error-messages-i-get-from-entityframework-codefirst-4-1/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><feedburner:origLink>http://peterkellner.net/2011/12/13/i-love-the-validation-error-messages-i-get-from-entityframework-codefirst-4-1/</feedburner:origLink></item><item><title>Gingerbread Update for my Verizon Samsung DROID Charge</title><link>http://feedproxy.google.com/~r/Peterkellnernet/~3/mbhtEYlMxkE/</link><category>Gingerbread</category><category>Verizon</category><category>android</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Peter Kellner</dc:creator><pubDate>Sun, 04 Dec 2011 10:41:45 PST</pubDate><guid isPermaLink="false">http://peterkellner.net/2011/12/04/gingerbread-update-for-my-verizon-samsung-droid-charge/</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Yesterday, I turned my Samsung DROID CHARGE 4G from Verizon on and it asked me if I wanted to update.&#160; Always wanting that, I said yes.&#160; After two days, here are the nice things I’ve found (nothing bad so far).&#160; I was surprised when it finished, it did not offer me any idea of what it did though.&#160; I’m pretty sure it’s the Gingerbread update.&#160; My Phone Info now says 2.3.6 Firmware Version</p>  <p>So, here are the features (and screen shots)</p>  <p>&#160;</p>  <table border="1" cellspacing="5" cellpadding="2" width="574"><tbody>     <tr>       <td valign="top" width="382">New Version numbers on main screen.</td>        <td valign="top" width="175"><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb.png" width="143" height="244" /></a></td>     </tr>      <tr>       <td valign="top" width="382">Nice transitions for top toggles (wifi,bluetooth, etc).&#160; Before, it was hard to tell if bluetooth was on, coming on, off or going off.</td>        <td valign="top" width="175"><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image1.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb1.png" width="244" height="153" /></a></td>     </tr>      <tr>       <td valign="top" width="382">Shows top in green when phone is active.&#160; That is, it reminds me I have a phone call going while I’m doing something else.</td>        <td valign="top" width="175"><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image2.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb2.png" width="157" height="244" /></a></td>     </tr>      <tr>       <td valign="top" width="382">pinch gives up to 4 browser sessions in carousel mode</td>        <td valign="top" width="175"><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image3.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb3.png" width="155" height="244" /></a></td>     </tr>      <tr>       <td valign="top" width="382">breadcrumb icons showing which screen I’m on. Note at the top. I also has a button next to the screen numbers which brings up the screens all together like in the next screen shot.&#160; Also, when scrolling through the carousel, it now wraps from last to first instead of hitting a wall.</td>        <td valign="top" width="175"><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image4.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb4.png" width="146" height="244" /></a></td>     </tr>      <tr>       <td valign="top" width="382">Allow me to set any screen as home screen.</td>        <td valign="top" width="175"><a href="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image5.png"><img style="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" title="image" border="0" alt="image" src="http://peterkellner.net/wp/wp/wp-content/uploads/2011/12/image_thumb5.png" width="149" height="244" /></a></td>     </tr>   </tbody></table>  <p>&#160;</p>  <p>Feel free to add comments below about other things.</p>  <p>&#160;</p> <iframe style="width: 133px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=petkelsblo-20&amp;o=1&amp;p=8&amp;l=as1&amp;m=amazon&amp;f=ifr&amp;ref=qf_sp_asin_til&amp;asins=B004XD1S4M" frameborder="0" marginwidth="0" scrolling="no"></iframe><img src="http://feeds.feedburner.com/~r/Peterkellnernet/~4/mbhtEYlMxkE" height="1" width="1"/>]]></content:encoded><description>Yesterday, I turned my Samsung DROID CHARGE 4G from Verizon on and it asked me if I wanted to update.&amp;#160; Always wanting that, I said yes.&amp;#160; After two days, here are the nice things I’ve found (nothing bad so far).&amp;#160; I was surprised when it finished, it did not offer me any idea of what [...]</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://peterkellner.net/2011/12/04/gingerbread-update-for-my-verizon-samsung-droid-charge/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><feedburner:origLink>http://peterkellner.net/2011/12/04/gingerbread-update-for-my-verizon-samsung-droid-charge/</feedburner:origLink></item></channel></rss>

