WPF-Blogger.com [Complete Feed] http://www.wpf-blogger.com All news and information about Windows Presentation Foundation and Silverlight at one place. Freitag, 18. Mai 2012 Listbox, Why Art Thou Blanking? <p>One of the biggest performance changes for developers using Silverlight in Mango (WP 7.5) is off-thread input for ListBox. In a nutshell this basically means that all any flick or pan a user makes on a ListBox is handled by a dedicated thread, the Direct Manipulation (DM) thread, instead of the UI thread. By connecting the DM thread to the Compositor thread (that’s the one that does all the drawing to the screen independent of the UI thread) we have a ListBox that moves smoothly even when the UI thread is completely blocked.</p> <p>Unfortunately this also comes with a price – the ListBox is now so responsive and moves so fast that the Listbox can run out of content to display to the user as the user is flicking, and blank – basically drawing nothing except for an updated ScrollBar (so the user knows he’s still moving in the ListBox, but it doesn’t help much) and the background while the UI thread scrambles to bring in new items to fill up the holes.</p> <p><b>My ListBox isn’t blanking, why do I care about this blog post?</b></p> <p>You care because you care about your users. You’re the kind of dev who knows that even though he’s got a great, powerful phone, not everyone does. You care because you are proud to call yourself a developer. You care because… ok, back to reality. </p> <p>With the release of Tango, Windows Phone is now supported on lower powered machines which often have slower hardware and less memory, so even though your device shows no blanking, others may see blanking, especially if they’re rocking a new, lower powered, Tango phone. This post will help give you the tools that let your app run smooth, with hardly any blanks, even on those phones.</p> <p><b>My ListBox is not blanking, but it’s really jerky during scroll</b></p> <p>Holy Smokes Batman! Jerky scrolling is all but eliminated in the new ListBox, even for WP7 apps – are you sure you’re using it? There’s a good chance you’re using the original LongListSelector (LLS) from the <a href="http://silverlight.codeplex.com/">toolkit</a>, which doesn’t auto-update when you move your project to Mango. To take full advantage of the new ListBox improvements you need to download the latest toolkit from <a href="http://silverlight.codeplex.com">http://silverlight.codeplex.com</a> and update to the new LLS which is based on the platform’s ListBox.</p> <p><b>Why does blanking occur: the nitty gritty</b></p> <p>There are a couple of common code / design reasons that cause a ListBox to blank, but in general it all boils down to the amount of time it takes to bring in a new item. The ListBox maintains a one screen buffer of items in each direction which moves with the user’s viewport as they scroll around. If the ListBox can’t fill that buffer in the direction of the scroll fast enough, you get blanking.</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/0333.clip_5F00_image002_5F00_7C463585.png"><img title="clip_image002" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="clip_image002" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3487.clip_5F00_image002_5F00_thumb_5F00_25BD0777.png" width="78" height="292" /></a></p> <p align="center"><b><i>Diagram 1: </i></b>In a stationary world, when there is no scrolling going on, the user will be looking at the center screen and there will be buffered items waiting to be shown in both directions</p> <p>Filling the buffer takes a few steps, namely creating an Item Container (if a suitable one from the excess buffer in the other direction doesn’t already exist) and Data Binding the new item’s content (which kicks off the Measure pass). All of these updates occur on the UI thread and they all happen at once (not item by item) so if a flick is fast and the ListBox realizes that it needs to draw a full screen worth’s of items it will block the UI thread while it does just that. </p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2313.clip_5F00_image004_5F00_6586EDFC.png"><img title="clip_image004" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="clip_image004" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2728.clip_5F00_image004_5F00_thumb_5F00_13080DC0.png" width="154" height="319" /></a></p> <p align="center"><b><i>Diagram 2:</i></b> As the user moves downwards we balance the buffers by transferring the excess buffer from the top buffer (red) to the bottom buffer and re-databind it to the new data, maintaining 1 screen of buffer in each direction.</p> <p>But if the user flicks again while the UI thread is blocked bringing in buffer items, we’ll get even more out of sync and move completely out of our buffer space – since there is nothing in the Control to draw (remember, the ListBox is still scrambling on the UI thread to bring the new items in, it’s just too slow) you just get the background, i.e blankness.</p> <p><b>If there’s nothing to draw, why is the ListBox still moving? Or, look at it from another angle:</b></p> <p>As we mentioned earlier, scrolling is now off-thread, so from the Compositor’s point of view it’s moving the ListBox and everything in it, the problem is that the UI thread hasn’t stuck anything in it (at that position) yet, so we blank.</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5140.clip_5F00_image006_5F00_40892D83.png"><img title="clip_image006" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="clip_image006" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3326.clip_5F00_image006_5F00_thumb_5F00_02FBCFBA.png" width="144" height="356" /></a></p> <p align="center"><b><i>Diagram 3:</i></b> Fast flicking a few times get you into this situation, where we have excess buffer above which we are trying to move downwards, but because there is so much of it and the UI thread is blocked trying to bring these items in we don’t finish in time and the user sees blankness (black) until the items are ready, at which time they simply appear.</p> <p><b>So why is *my* ListBox blanking? And how do I fix it?</b></p> <p>Let’s run through a couple of common reasons why ListBoxes blank, with some proposed solutions to each one.</p> <p>1. <b>Using ValueConverters in your template <br /></b> <br />ValueConverters are great – they allow you to transform your data on the fly as they are being DataBound into your items. Unfortunately they incur a UI thread cost – we need to transition from Silverlight into User Code, run your converter and then return. If your converter is heavy or you’re using lots of them in your template, then this will introduce blanking. <br /> <br />Question to ask yourself: does this code look like it can run in a trivial amount of time across all of the elements being brought in for a given frame? If not, you probably should explore a different way of doing the DataBinding. For example,you can have the object translate the values on population / property get time instead of using a converter - even though this may break your Data Model this can significantly reduce the DataBinding cost (and you could always wrap your object in a ViewModel).</p> <p><b>2. </b><b>Complex DataTemplates</b></p> <p>When an item is moved from one buffer to another during a scroll, ListBox is usually smart enough to determine that this is the same kind of item and just update the data in the item. While this might sound cheap this dirties the item causing it to be remeasured. If your template is complex you will find that a lot of your time is wasted in Measure – remeasuring the layout of the control now that the data has been updated. <br /> <br />Fixing this is very per-scenario. Some general guidelines are to make sure to only use a container if you really need the options it provides – do you have a Grid within a Grid? Could you replace all of your Grids with a simple Canvas or maybe a StackPanel?</p> <p><b>3. </b><b>Decoding images on the UI thread</b></p> <p>By default all images are decoded synchronously on the UI thread, so if you have something like this:</p> <p><font face="Consolas">&lt;Image Source=”{Binding ImageUrl}”/&gt;</font></p> <p>you're going to block the UI thread for however long it takes to decode your image. Luckily there’s an easy fix for this, change your template to read as follows:</p> <p><font face="Consolas">&lt;Image&gt; <br />&#160; &lt;Image.Source&gt; <br />&#160;&#160;&#160; &lt;BitmapImage UriSource=&quot;{Binding ImgUrl}&quot; CreateOptions=&quot;BackgroundCreation&quot;/&gt; <br /></font><font face="Consolas">&#160; &lt;/Image.Source&gt; <br />&lt;/Image&gt;</font></p> <p>Note that this does come with some caveats – older images will still show up until the new ones are loaded and the user may see a visual pop-in of the image when it is done loading, but these can all be worked around and massaged into a nice user experience that is not harmed by excessive image decode.</p> <p>For further details see <a href="http://blogs.msdn.com/b/slmperf/archive/2011/06/13/off-thread-decoding-of-images-on-mango-how-it-impacts-you-application.aspx">this blog post</a>.</p> <p><b>4. </b><b>Using </b><a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol.preparecontainerforitemoverride(v=vs.95).aspx"><b>PrepareItemForContainerOverride</b></a><b> to dynamically select a template</b></p> <p>A simple list item is often times just not good enough – your app has an image item, a text item, a video item, a link item etc. etc. and you have a different template for each one of them. A common pattern is to use the ListBox’s PrepareItemForContainerOverride callback to dynamically change the container’s template based on what item is being databound. </p> <p>Unfortunately, doing this can completely throw off the ListBox’s buffering technique – the ListBox sees that the container that it had in its buffer is not the type that you need and junks it, wasting even more time on the march to blankness.</p> <p><strong>So how do I solve this?</strong> Surprisingly enough, it is often cheaper to have all of your template parts in one large template (yes, yes, I know about point 2 above – keep reading!) with each mini-template collapsed if it does not apply. Since collapsed template items incur next to no cost during layout, they have next to no impact on run time (though there is a slightly larger memory cost).</p> <p>And how do I get my different items to display on the different templates? Simple – databind to a new property on your classes which either has a type enumeration that runs through a value converter (ItemTypeToVisibility), these kinds of converters are often cheap, or wrap your class in a UI view model so that it has a property that returns the Visibility type directly. </p> <p><strong>5. Pulling data from [favorite heavy source] as part of your binding <br /></strong> <br />The properties you bind to should have simple getters (setters is a different story) – always. If you have logic like this: <br /></p> <p><font face="Consolas">public int Rating <br />{ <br />&#160; get <br />&#160; { <br />&#160;&#160;&#160; &lt;read from database&gt;&#160;&#160;&#160; <br />&#160;&#160;&#160; - or - <br />&#160;&#160;&#160; &lt;read from IsoStore&gt; <br />&#160;&#160;&#160; - or - <br />&#160;&#160;&#160; &lt;parse out some XML&gt; <br />&#160;&#160;&#160; - etc -&#160;&#160;&#160; <br />&#160; </font><font face="Consolas">} <br />}</font></p> <p> <br />then you’re doing something wrong. This kind of logic is fine for a property that you know is only read very rarely, if at all, but if it’s in a ListBox then it most likely is going to be seen and you should be initializing the data up front. <br /> <br />Don’t get me wrong – you don’t need to load everything as you are pulling in 1000 items to your list, but you can certainly do it on a background thread as a deferred task kicked off in the constructor of your object. If your objects are really heavy and memory is becoming an issue then you have a few possible routes:</p> <ul> <li>Implement a completely delayed load by hooking into the ListBox’s scroll amount or compression states and only loading more items when you get to the end of the list <br /></li> <li>Implement a DoubleLinkedObservableCollection, where each item in the collection knows about the next node (in each direction) and when it gets databound (based on one of the properties) it notifies X number of nodes on each side to make sure they all have their data ready to go. This should be done on a background thread, just don’t forget to Dispatch back to update any properties that raise a PropertyChanged event.</li> </ul> <p>6. <b>Cut down background work <br /></b> <br />With only one core any background thread can interfere with the smoothness of the UI thread. Although background threads get a much smaller time slice compared to the UI thread, enough of them vying for time will effectively starve the UI thread. <br /><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/0118.clip_5F00_image008_5F00_1B8B6D0A.png"><img title="clip_image008" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="clip_image008" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/8228.clip_5F00_image008_5F00_thumb_5F00_3010BC88.png" width="567" height="137" /></a></p> <p align="center"><em>Diagram 4:</em> Fictional time slice showing the effects of more background threads (not to scale)</p> <p><i></i></p> <p>Across any given slice of time, the UI thread will be allowed to run longer than any other thread, but is effectively running at the same priority, hence it is forced to yield to the background threads when its time is up. The more background threads, the longer it is before you get back to the UI thread so that it can complete its task.</p> <p><b>Moral of the story?</b> Be wise about the number of active background, especially in high stress scenarios. Stick to using a thread pool so that you can queue up your work without it all trying to run at the same time.</p> <p><b>I’ve tried all the above, it’s still blanking and I only have a couple of screens of data – help!</b></p> <p>If you find yourself blanking on a relative small set of data (approximately 3-5 screens), then it might be time for drastic measures. As mentioned above the cause for blanking is the amount of time it takes to bring in new items with new data as the user is scrolling, i.e. the virtualization overhead is the culprit. If you disable virtualization on your list, you’ll generate of all your items up front and scrolling will be blankless. To do this, add the following to your XAML:</p> <pre><code><font face="Consolas">&lt;ListBox.ItemsPanel&gt;<br /> &lt;ItemsPanelTemplate&gt;<br /> &lt;StackPanel&gt;<br /> &lt;/StackPanel&gt;<br /> &lt;/ItemsPanelTemplate&gt;<br />&lt;/ListBox.ItemsPanel&gt;</font></code></pre> <font size="2" face="Consolas"></font> <p>While making this change is relatively simple, the impact can be drastic – no more blanking, but it comes at a cost:</p> <ol> <li>Startup time for the Page increases – we now have to realize more items, so it’s going to take longer <br /></li> <li>Memory – same as above, more items hanging around, larger memory cost</li> </ol> <p>If you give it a try on a low end device and startup and memory look acceptable – then this is your magic bullet!</p> <p><b>So what are we left with?</b></p> <p>Hopefully at this point you have a non to minimally blanking list, which scrolls smoothly and generally delights your users! Have you run into any other pitfalls that you think others should be warned of? Let us know below!</p> <p>Running into other, unrelated performance issues? Drop us a line and we'll see if we can focus on them in a future blog post (stay tuned for a &quot;memory&quot; series coming soon).</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=581658" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/05/16/listbox-why-art-thou-blanking.aspx Windows Phone Dev Blog 3760 2012-05-17T02:53:58 Programming Windows 6th Edition Preview Ebook Is Here! <p> The long-awaited 6th edition of <i>Programming Windows</i> is scheduled to be published by Microsoft Press in November 2012, but you can purchase the ebook direct from the O'Reilly website today: </p><p>... more ...</p> http://www.charlespetzold.com/blog/2012/05/Programming-Windows-6th-Edition-Preview-Ebook-Is-Here.html Charles Petzold 3759 2012-05-17T15:53:34 La “locura” de las optimizaciones en los juegos. ¿A quien no le preocupa que su código no sea óptimo? Eso de "funcionar funciona ... pero tarda mucho" no es escusa para no preocuparse por optimizar las partes optimizables. Una de las mejores formas de evitarse problemas desagradables cuando el sistema &#8230; <a href="http://speakingin.net/2012/05/16/la-locura-de-las-optimizaciones-en-los-juegos/">Continue reading <span class="meta-nav">&#8594;</span></a> http://speakingin.net/2012/05/16/la-locura-de-las-optimizaciones-en-los-juegos/?utm_source=rss&utm_medium=rss&utm_campaign=la-locura-de-las-optimizaciones-en-los-juegos Juan María Laó Ramos 3758 2012-05-16T22:58:37 Primer camino para alcanzar el Nirvana del Garbage Colector En este post vamos a ver una de las técnicas usadas para evitar que el recolector de basura se ejecute en mitad de la partida de un juego, teniendo como consecuencia una pérdida de rendimiento. <a href="http://speakingin.net/2012/05/16/primer-camino-para-alcanzar-el-nirvana-del-garbage-colector/">Continue reading <span class="meta-nav">&#8594;</span></a> http://speakingin.net/2012/05/16/primer-camino-para-alcanzar-el-nirvana-del-garbage-colector/?utm_source=rss&utm_medium=rss&utm_campaign=primer-camino-para-alcanzar-el-nirvana-del-garbage-colector Juan María Laó Ramos 3757 2012-05-16T23:00:20 ¿Veremos en The Windows Phone Developer Conference a WP Apollo? Dentro de unos meses se cumplen dos años de la salida de Windows Phone 7 y un año de la de  Mango. Como no deja de ser una ciencia, la estadística nos dice que en Octubre estará disponible Windows Phone &#8230; <a href="http://speakingin.net/2012/05/14/veremos-en-the-windows-phone-developer-conference-a-wp-apollo/">Continue reading <span class="meta-nav">&#8594;</span></a> http://speakingin.net/2012/05/14/veremos-en-the-windows-phone-developer-conference-a-wp-apollo/?utm_source=rss&utm_medium=rss&utm_campaign=veremos-en-the-windows-phone-developer-conference-a-wp-apollo Juan María Laó Ramos 3756 2012-05-14T01:00:23 MSDN Webcast series on building Metro style apps <p>A few colleague evangelists are doing a series on MSDN Webcasts on building Windows 8 Metro style apps..&#160;&#160; <br />Catch the whole series and get a very concise, yet comprehensive introduction to building Metro style apps..&#160;&#160; <br />See below for abstracts and presenter for each session, click on the title for each session to visit the registration page for that session <br />Each session is one hour.&#160; </p> <p>&#160;</p> <p><strong>Monday May 14th, 2012&#160; 8:30 AM PST <br /></strong><strong><font size="3"><a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513506&amp;Culture=en-US" target="_blank">Introduction to the Windows 8 platform and the Windows store</a> <br /></font><a href="http://blogs.msdn.com/b/jennifer/" target="_blank">Jennifer Marsman</a> <br /></strong>Windows 8 is Windows re-imagined!&#160; Join this session to learn about the new platform for building Metro-style applications.&#160; Get an understanding of the platform design tenets, the programming language choices, and the integration points with the operating system and across Metro-style apps.&#160; We will also discuss the enormous opportunity for developers to make crazy money with the Windows Store.&#160; You will walk away with the resources to begin writing Metro applications for Windows 8. <br /></p> <p><strong>Wednesday, May 16th, 2012&#160;&#160;&#160; 8:30 AM PST <br /><a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513509&amp;Culture=en-US" target="_blank"><font size="3">Designing apps with Metro style principles and the Windows personality</font></a> <br /><a href="http://21stcenturystory.com/" target="_blank">Chris Bernard</a> <br /></strong>Metro style design has a set of five guiding principles to help you make the best choices when designing your app. These principles are the foundation for building great Metro style apps. Consider these principles as you plan your app, and always ensure your design and development choices live up to these principles.</p> <p>&#160;</p> <p> <br>Monday, May 21, 2012&#160;&#160;&#160; 8:30 AM PSTJohn WieseMonday, May 21, 2012&#160;&#160;&#160; 8:30 AM PST</br> <strong>Monday, May 21, 2012&#160;&#160;&#160; 8:30 AM PST <br /></strong><a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513518&amp;Culture=en-US" target="_blank"><font size="3">Building Metro style apps with XAML: What .NET developers need to know</font></a><font size="3">&#160;&#160;&#160; <br /></font><strong>John Wiese</strong></p> <p>If you are experienced with .NET or Silverlight and are already familiar with XAML, this session will teach you everything you need to know to create a Metro style app for Windows 8. This session will cover updates to familiar features and explore concepts that are new for Windows 8. We’ll talk about building reusable Windows Runtime Components in C#, Async programming in Windows 8 and both the Visual Studio and Expression designers. This session will show you how to turn your XAML skills into money-making Metro style apps.</p> <p> <br /><strong>Wednesday May 23, 2012&#160;&#160;&#160; 8:30 AM PST <br /><a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513647&amp;Culture=en-US" target="_blank"><font size="3">What HTML developers need to know about coding Windows 8 Metro style apps</font></a> <br /><a href="http://palermo4.com/" target="_blank">Michael Palermo</a> <br /></strong>This session is perfect for any web developer wanting to leverage his/her skillset to develop Windows 8 Metro style apps. The session begins by proving how much web developers already know about building apps for Windows 8. The focus then turns to how to write JavaScript code with WinJS. Key points for Metro style app development will be highlighted by implementing popular feature requests using HTML5, CSS3, and JavaScript.</p> <p><strong>Thursday, May 31, 2012&#160;&#160;&#160; 8:30 AM PST <br /><a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513520&amp;Culture=en-US" target="_blank"><font size="3">Win as One: How Contracts in Windows 8 Help You Build a Killer Metro App</font></a> <br /><a href="http://www.devhammer.net/" target="_blank">G. Andrew Duthie</a> <br /></strong>Contracts are agreements between Windows and your Metro style app that allow you to integrate Windows 8 features into your app. For example, Windows 8 lets users share content from one application to another by using the Share contract. </p> <p>In this session, you'll learn how contracts work and how to implement the built-in contracts such as Search, Share, Settings, and More. With Contracts, you can help users get more out of your app, and in a way that is consistent and intuitive, and they will reward you by coming back to your app again and again. <br /></p> <p><strong>Monday, June 4th, 2012&#160;&#160;&#160;&#160; 8:30 AM PST <br /></strong><a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513524&amp;Culture=en-US" target="_blank"><font size="3">Bring Your Windows 8 Metro Style Apps to Life with Tiles and Notifications</font></a> <br /><strong><a href="http://blogs.msdn.com/b/cbowen/" target="_blank">Chris Bowen</a></strong></p> <p>Tiles and Notifications are important ways to draw attention to your app and improve your users' experiences.&#160; Tiles can draw users back into your app when your tile comes to life on Start screen.&#160; They can also let users personalize their Start screen by creating deep links to specific places within your app.&#160; Notifications, delivered through the Windows Push Notification Service, can inform and draw your users back into your app even when it's not running.&#160; <br />In this session, you will learn how to effectively implement Tiles and Notifications to help your apps shine.</p> <p>&#160;</p> <p><strong>Wednesday, June 6th, 2012&#160;&#160;&#160; 8:30:00 AM PST <br /></strong><a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032513534&amp;Culture=en-US" target="_blank"><font size="3">Building Windows 8 Metro style casual games using HTML 5</font></a> <br /><a href="http://blogs.msdn.com/b/davedev/" target="_blank">David Isbitski</a></p> <p>The intent of this session is to help HTML5/JavaScript developers with writing their first Metro Style App in a fun, immersive way. We will cover the basics of HTML5 Canvas gaming and how we can easily bring it to Windows 8.&#160; We will then add additional game functionality as we introduce HTML5 Audio,&#160; CSS3 styling and web fonts, implementing a game loop with JavaScript, 3rd party frameworks, touch, camera, accelerometer, and WInJS controls.&#160; </p> <p>&#160;</p> <p>&#160;</p> <p>I will be watching. I hope you join us. </p> <p>Happy WIndows 8 coding! </p><div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10304119" width="1" height="1"> http://blogs.msdn.com/b/jaimer/archive/2012/05/10/msdn-webcast-series-on-building-metro-style-apps.aspx Jaime Rodriguez [MS] 3755 2012-05-11T08:50:11 Programming Windows 6th Edition Preview Ebook Coming! <p> If all goes according to plan, in one week, on May 17, 2012, you will be able to purchase a preview ebook of <i>Programming Windows</i>, 6th edition, for just $10. For that one-time payment of $10, you will also get the second preview ebook a couple months from now, and the final ebook later this fall. </p><p>... more ...</p> http://www.charlespetzold.com/blog/2012/05/Programming-Windows-6th-Edition-Preview-Ebook-Coming.html Charles Petzold 3754 2012-05-10T18:40:13 Memory Profiling - The Heap Summary View <p>In an <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/19/memory-profiling-launching-graphs-and-markers.aspx">earlier post</a> we looked at how we can gain broad insight into an application scenario’s memory characteristics and how the graph and markers drew our attention to ranges of execution for further analyses. Recall that in the <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/02/01/memory-profiling-for-application-performance.aspx">memory leak diagnosis case</a> we chose to analyze only the time range over which we observed the increase in memory usage. Indeed, that is a key first step to the analysis: filtering the memory activity data by a time range. The <b>Heap Summary </b>view is the result of such filtering, and represents the population of the heap during the chosen time range.</p> <h1>Heap Summary View</h1> <p>The Heap Summary view presents, in tabular form, a demographic analysis of the population of the heap.</p> <p>In human population demographics, data collection happens through a census as well as through a continuous update to registries that track births, deaths, migration of place of residence and the like. The data collection in the case of heap population demographics is no different. “Births” map to allocations, “deaths” map to objects’ memory collected by the GC, and “migration of place of residence” maps to the migration of objects between the Gen0 region of the heap and the Gen1 region. A census of the heap at the start of time range identifies all incumbent objects (i.e. that were in existence). Births, deaths, and migrations are updated continuously, and a final census at the end of the time range identifies all the objects that were retained. In order to have a consistent terminology, we refer to the incumbent objects at the start as objects that were “retained” at the start.</p> <p>Managed Silverlight Visual elements (i.e. objects that go into the Silverlight visual tree) are not just plain old managed objects. These might be facades with backing native-implementations holding native memory and during the course of execution might create and hold on to texture memory. Casual use of such elements in code can even lead to subtle leaks. From this perspective, subsequent analysis can be made easier if Silverlight Visual elements were tracked and reported separately from plain old managed objects. And this is precisely how they are tracked and reported through the Heap Summary view. Continuing with the demographic analogy, such classification has precedent in social demographics where human populations have been classified on ethnicity.</p> <p>Armed with this context, let us study the following Heap Summary view from the <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/02/01/memory-profiling-for-application-performance.aspx">memory leak diagnosis case</a>:</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/1055.image_5F00_797B31D3.png"><img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/7536.image_5F00_thumb_5F00_086260EE.png" width="508" height="365" /></a></p> <p>The shaded region across the graph and markers indicates the time range used as the filer.</p> <p>The census at the start reports 5576 instances of managed type objects accounting for about 283 KB and 26 instances of Silverlight Visual elements accounting for about 13 KB. In terms of incumbency the plain old managed objects dominate.</p> <p>The churn happening within the selected time range is reported as 10615 instances allocated (births) and 11590 instances collected (deaths), accounting for about 23 MB each. The counts and sizes are somewhat balanced and cancel each other out to an extent. And this is borne out by the census at the end for the managed objects; the census at the end reports 4601 instances of managed type objects accounting for about 223 KB, which is just a little lower than what we had at the start. However, it also reports 69 instances of Silverlight Visual elements accounting for about 4 MB now (up from 13KB at the start).</p> <p>When we correlate this table with the graph, our suspicion is drawn towards the Silverlight visuals. Why did their count go up, and why are they accounting for so much more memory? Within the filtered time range, memory usage has been steadily increasing too. Could we be leaking memory? Could we be leaking some part of visual tree itself? And there even seem to be images being loaded along the way; might we be leaking their texture memory too? We wonder.</p> <p>Clearly, the next lead to follow is to get more visibility into what are those “Retained Silverlight Visuals at End”.</p> <h1>Summary</h1> <p>The Heap Summary view presents, in tabular form, a demographic analysis of the population of the heap. Interpreting the data in the table and correlating it with the graph and markers by itself can be used to make educated guesses at what could potentially be the problem, but equally importantly it serves to inform the next step in the performance investigation, as we shall see.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=581472" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/05/10/memory-profiling-the-heap-summary-view.aspx Windows Phone Dev Blog 3753 2012-05-10T18:24:11 Silverlight 5.1.10411.0 Released Today <p>Today we released a minor update to Silverlight 5. The 32 and 64 bit update version number is 5.1.10411.0. (The documentation said 5.2 at first, but this has been fixed.)</p> <p><em>This will be rolled out to everyone. We throttle large updates of products at the start, so for some folks it was not automatically downloaded this morning.</em></p> <p>This is primarily an important security update addressing an <a href="http://technet.microsoft.com/en-us/security/bulletin/ms12-034" target="_blank">TrueType security issue that was reported across a large number of products</a>. Some folks (like me) have reported issues seeing the TechNet page which has the information about the security issue, so I've repeated it here:</p> <blockquote> <p>Executive Summary</p> <p>This security update resolves three publicly disclosed vulnerabilities and seven privately reported vulnerabilities in Microsoft Office, Microsoft Windows, the Microsoft .NET Framework, and Microsoft Silverlight. The most severe of these vulnerabilities could allow remote code execution if a user opens a specially crafted document or visits a malicious webpage that embeds TrueType font files. An attacker would have no way to force users to visit a malicious website. Instead, an attacker would have to convince users to visit the website, typically by getting them to click a link in an email message or Instant Messenger message that takes them to the attacker's website.</p> <p>This security update is rated Critical for all supported releases of Microsoft Windows; for Microsoft .NET Framework 4, except when installed on Itanium-based editions of Microsoft Windows; and for Microsoft Silverlight 4 and Microsoft Silverlight 5. This security update is rated Important for Microsoft Office 2003, Microsoft Office 2007, and Microsoft Office 2010. For more information, see the subsection, Affected and Non-Affected Software, in this section.</p> <p>The security update addresses the most severe of these vulnerabilities by correcting the manner in which affected components handle specially crafted TrueType font files and by correcting the manner in which GDI+ validates specially crafted EMF record types and specially crafted EMF images embedded within Microsoft Office files. For more information about the vulnerabilities, see the Frequently Asked Questions (FAQ) subsection for the specific vulnerability entry under the next section, Vulnerability Information.</p> <p>Recommendation. The majority of customers have automatic updating enabled and will not need to take any action because this security update will be downloaded and installed automatically. Customers who have not enabled automatic updating need to check for updates and install this update manually. For information about specific configuration options in automatic updating, see <a href="http://support.microsoft.com/kb/294871">Microsoft Knowledge Base Article 294871</a>.</p> <p>For administrators and enterprise installations, or end users who want to install this security update manually, Microsoft recommends that customers apply the update immediately using update management software, or by checking for updates using the <a href="http://go.microsoft.com/fwlink/?LinkID=40747">Microsoft Update</a> service.</p> <p>See also the section, Detection and Deployment Tools and Guidance, later in this bulletin.</p> </blockquote> <p>This is more of a GDR level release, but we needed to follow a new version number scheme. The version number doesn't indicate major functionality change or enhancement, but is actually a product of the build process. I'm reading the pages of discussion in our bug database covering this versioning numbering and the reasons why it went to 5.1. It really only makes sense if you're using our internal build tools :)</p> <p><strong>Note also, that as was the case in the Silverlight 4.0 to 4.1 updates, we reset the build number.</strong> This shouldn't be a problem unless you have code that is checking a build number without looking at the version number as a whole.</p> <p>Release history from <a href="http://www.microsoft.com/getsilverlight/locale/en-us/html/Microsoft%20Silverlight%20Release%20History.htm"> http://www.microsoft.com/getsilverlight/locale/en-us/html/Microsoft%20Silverlight%20Release%20History.htm</a></p> <blockquote> <p>Silverlight 5 Build 5.1.10411.0 Released May 8, 2012&nbsp;</p> <p>All updates to Microsoft Silverlight include functional, performance, reliability and security improvements and are backward compatible with web applications built using previous versions of Silverlight.</p> <ul> <li>Fixes Security issue described in the following Microsoft Knowledge Base article:&nbsp; <a href="http://support.microsoft.com/kb/2636927" target="_blank">2636927 MS12-034</a>: Description of the security update for Microsoft Silverlight: May 8, 2012</li> <li>Fixes an issue where "Best Effort" Silverlight Digital Rights Management Output Protection levels failed on some machines.</li> <li>Fixed a failure to update OOB applications that are configured to use elevated trust when in browser.</li> <li>Fixes an issue where persistent license acquisition would fail when a customer upgrades from Silverlight 4 to Silverlight 5.</li> <li>Fixes an issue where certain character combinations can cause Silverlight application to crash.</li> <li>Fixes an Access Violation described in the following Connect issue <a href="https://connect.microsoft.com/VisualStudio/feedback/details/719572"> https://connect.microsoft.com/VisualStudio/feedback/details/719572</a></li> <li>Fixes an issue where the SL5 plugin displays blank window after installing a font with a font name that starts with "&amp;".</li> <li>Fixes an issue where moving a focus to TextBox or RichTextBox after moving a focus to ItemsControl causes IME to be disabled.</li> <li>Fixes an issue where Silverlight would not play content which required Output Protection.</li> <li>Fixes a Silverlight DRM issue where some customers encounter hardware ID mismatch errors which can only be resolved by re-individualization.</li> </ul> </blockquote> <p>Be sure to let us know if you run into any issues with this release.</p> <p><a href="http://feedads.g.doubleclick.net/~a/AknP-TuPvWx30uIDlhwLgsS2NzM/0/da"><img src="http://feedads.g.doubleclick.net/~a/AknP-TuPvWx30uIDlhwLgsS2NzM/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/AknP-TuPvWx30uIDlhwLgsS2NzM/1/da"><img src="http://feedads.g.doubleclick.net/~a/AknP-TuPvWx30uIDlhwLgsS2NzM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=0daURBXmLgQ:u9dItO9xqxc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=0daURBXmLgQ:u9dItO9xqxc:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=0daURBXmLgQ:u9dItO9xqxc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=0daURBXmLgQ:u9dItO9xqxc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=0daURBXmLgQ:u9dItO9xqxc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=0daURBXmLgQ:u9dItO9xqxc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=0daURBXmLgQ:u9dItO9xqxc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=0daURBXmLgQ:u9dItO9xqxc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=0daURBXmLgQ:u9dItO9xqxc:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/0daURBXmLgQ" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/0daURBXmLgQ/silverlight-51104110-released-today Pete Brown 3752 2012-05-09T21:54:33 Más tiempo para Cell·APP Awards Las plegarias han sido oídas y  hemos ampliado el plazo para presentar juegos y aplicaciones a Cell·APP Awards: Desarrolla tu app usando CELL·SDK. Debes rellenar este formulario para participar y enviarnos el formulario de suscripción. Fin de Inscripción: 31/05/2012 Último &#8230; <a href="http://speakingin.net/2012/05/08/mas-tiempo-para-cell%c2%b7app-awards/">Continue reading <span class="meta-nav">&#8594;</span></a> http://speakingin.net/2012/05/08/mas-tiempo-para-cell·app-awards/?utm_source=rss&utm_medium=rss&utm_campaign=mas-tiempo-para-cell%25c2%25b7app-awards Juan María Laó Ramos 3751 2012-05-08T00:05:43 Building Metro style apps with C++ event is now a live webcast <p>Two weeks ago, we announced an <a href="http://blogs.msdn.com/b/jaimer/archive/2012/04/23/announcing-the-building-windows-8-apps-with-c-windows-camp.aspx">all day training for those Building metro style apps with C++</a>..</p> <p>Event sold out&nbsp;within a few days, and we got a lot of requests for it to be recorded (or broadcasted live)..&nbsp;&nbsp;</p> <p>I am happy to announce that the event will now be live.&nbsp; Please pencil us in in your calendar. Event will be live on Friday May 18th, from 9 AM PST to 5 PM PST. <br /><br />We will share details (the link) and the agenda later this week.&nbsp;&nbsp; <br />We will aim to have two live Q&amp;As (one around noon PST) and one around 4 PM PST, we will take your questions via twitter.. Just follow the <span style="text-decoration: line-through;">#win8C++Camp</span> <span style="color: #ff0000;">(Updated on 5/10) #ch9live</span> hash on the day of the event..</p> <p>&nbsp;</p> <p>Please help us spread the word!! Hope you can join us on the 18th.</p> <p>Happy Windows 8 coding!!</p> <p>&nbsp;</p><div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10301727" width="1" height="1"> http://blogs.msdn.com/b/jaimer/archive/2012/05/07/building-metro-style-apps-with-c-event-is-now-a-live-webcast.aspx Jaime Rodriguez [MS] 3750 2012-05-07T11:09:00 Teaching kids electronics, electricity, and logic using littleBits <p>We homeschool our two children. Ben, is kindergarten age, Abby is pre-school age. My wife does, by far, most of the work there, including trucking them to specialized classes (art, music, gymnastics, karate, our homeschool group single day school, etc.) plus all the playdates with the other kids, and special events. Melissa even teaches several of the classes at the home school group. I generally deal with reading, since I'm in charge of story time with my son. Lately, we've split our time between him reading stories to me (I'm proud to say he's at about a 2nd grade level - you have to love personal tutoring) and me reading The Hobbit to him in preparation for the movie this Christmas. (JRR Tolkien is far wordier than I remember.)</p> <p>Melissa and I also split science duties. I've brought Ben to the <a href="http://www.ccbcmd.edu/catonsvilleplanetarium/index.html" target="_blank">Banneker planetarium</a> for a customized class arranged for our homeschool group in concert with one of the astronomy professors. I often bring Ben to <a href="http://serc.si.edu/" target="_blank">SERC</a> (Smithsonian Environmental Research Center) for their bi-weekly homeschool science class. It's nice to leave close to centers like that. Even in the 5-7 year old group, they do serious science. They worked with Microscopes to analyze feathers to explain what holds them together, learned about the scientific method, dissected something (unfortunately we missed that one), searched through oysters shells on the bay looking for shrimp, jellies, and fish, and much more.</p> <p><a href="http://10rem.net/media/84934/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_2.png" target="_blank"><img src="http://10rem.net/media/84939/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb.png" width="650" height="268" alt="image" border="0" 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"/></a></p> <p>There are certain things that I allow the kids pretty much as much as I can afford (within reason): decent books and LEGO. The educational value of them both is apparent the minute the child starts interacting with them. Unlike TV, the computer (the kids share my old netbook), or Leapster (or Nintendo DS in the case of Ben), we don't limit the children's time on either of these. In addition, we keep a cabinet full of paper, markers, glue, paints, stickers, and other craft supplies which the kids can play with pretty much whenever they want. We like to keep things around that encourage creativity. We're not perfect by any means, but we've found that making this stuff easily accessible encourages experimentation (and large paint and glue stains on our kitchen table, and random things stuck together that you may not actually want stuck together).</p> <p>I tell you all this just to give you an idea of where we are with education in my family, and how important I consider it.</p> <p><em>Of course, none of these things are exclusive to homeschooling or to us. I'm proud of what we've done so far, but we just happen to be fortunate enough to live in an area with lots of free museums and programs geared towards home school students. Many others take advantage of these museums and programs as well, they just have to do it on the crowded weekends :).</em></p> <p><em>Note also that we generally teach both children the same things, although they follow their own interests. I tend to focus on Ben in this article not because we're teaching only him electronics and science, but because his age makes these things more appropriate right now.</em></p> <h3>Electronics and programming</h3> <p>One thing I've been <strong>trying to find a good way to teach is electrical/electronics basics and boolean logic</strong>. Not only is this an area of interest for me, but boolean logic forms the foundation of everything you do on a computer. I want my kids to have an understanding of this to complement their ability to use the computer (yes, both kids can use a mouse or track pad, Ben can type, albeit not quickly, as well). I've also found boolean logic just about the simplest math/logic you can get. I have no idea why I wasn't exposed to it formally until college (the only math class I've ever aced, besides 10th grade Geometry).</p> <p>Programming is great, but I <a href="http://10rem.net/blog/2012/05/01/symposium-session-gadgeteering-and-the-net-micro-framework" target="_blank">know from my own experience</a>, that making something happen *outside* a computer is far more impactful and memorable.</p> <p>One day, I had Ben in my home office and together we stuck a resistor and an LED in a little breadboard. Ben then touched the wire leads to a 3v battery pack I had around. <strong>He thought it was awesome that he could make an LED blink (again with the <a href="http://10rem.net/blog/2010/09/02/first-experiences-with-netduino-and-the-net-micro-framework" target="_blank">blinking LED</a>, the gateway drug of electronics &lt;g&gt;).</strong> I thought this was great too. However, this type of approach won't go far with a 6yo or 3yo, as it's too easy to let out the magic blue smoke. <strong>It doesn't encourage experimentation at their level.</strong></p> <p>For my two kids, I found the snap circuits kits a little too fine grained in what they do. It's much easier to connect the components compared to discrete leaded components and a breadboard, but you can still connect them incorrectly. The snaps are also bit difficult for the kids to work with, and you're really working with just an easier form factor for discrete components. <strong>Getting from empty to blinking LED is just as much work as it is with discrete components.</strong> There's still lots of value to these, however, so the set Santa brought for Christmas will simply stay around for a few years until the kids grow into it.</p> <p>As much as the kids like LEGO, the engineering and programming involved in the Mindstorms kits is also well above them right now. It's marked "10+" as a recall, so we still have time :)</p> <p>I'm not trying to turn my kids into computer programmers, although <strong>I think basic programming is as necessary a skill as any other for their generation</strong>. Recently, I ran across a project that started on Kickstarter, and then became its own company.</p> <h3>littleBits</h3> <p><a href="http://littlebits.cc" target="_blank">littleBits</a> is a company and a collection of kid-friendly hardware modules ("bits", do a mental substitution ever time I say "modules") that can be connected together to form simple electrical circuits. The starter kit comes with a number of bits including a power module, button, potentiometer, LED bar graph, and more. Shown below is the little bits kit along with seven additional modules I purchased. I <a href="http://www.makershed.com/littleBits_Starter_Kit_V_2_p/mklb2.htm" target="_blank">ordered the kit from makershed</a>, and the additional bits directly from littleBits.</p> <p><a href="http://10rem.net/media/84944/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_10.png" target="_blank"><img src="http://10rem.net/media/84949/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_4.png" width="650" height="390" alt="image" border="0" 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"/></a></p> <p>The overall design is <a href="http://10rem.net/blog/2012/02/24/open-source-hardware-and-why-you-should-care" target="_blank">Open Source Hardware</a>, with the <a href="https://github.com/littlebitselectronics/eagle-files" target="_blank">schematics available on github</a>.</p> <p>The connectors are custom fabricated modules which each contain three pins (or three pads) and a set of magnets. The pins are the typical Ground, Voltage, and Signal trio, with +5V as the standard high level. The polarization of the magnets prevents the modules from being connected incorrectly. Modules can be easily pulled apart, but the magnets are generally strong enough to stay connected during use (more on the connectors after I describe a few more things).</p> <p><a href="http://10rem.net/media/84954/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_25.png" target="_blank"><img src="http://10rem.net/media/84959/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_11.png" width="650" height="256" alt="image" border="0" 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"/></a></p> <p>Each module is classified as either Input, Output, Power or Wire, and color-coded by its type (input: pink, output: green, power: blue, wire (and logic gates/routing): orange). Each is also supplied with Ground, +5V and the signal through the pins on those colored connectors. Three wires may not seem like much in the way of control, but there's a <a href="https://community.littlebits.cc/" target="_blank">thriving community doing cool things</a> with this simple standard.</p> <p>With perhaps the exception of the buzzing motor module (which has the vibrating motor attached with a few thin wires), everything is extremely robust and able to stand up to the use of kids of various ages. Both my son and daughter enjoyed playing with them.</p> <p><a href="http://10rem.net/media/84964/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_12.png" target="_blank"><img src="http://10rem.net/media/84969/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_5.png" width="218" height="164" alt="image" border="0" 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"/></a> <a href="http://10rem.net/media/84974/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_14.png" target="_blank"><img src="http://10rem.net/media/84979/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_6.png" width="129" height="164" alt="image" border="0" 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"/></a> <a href="http://10rem.net/media/84984/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_32.png" target="_blank"><img src="http://10rem.net/media/84989/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_14.png" width="151" height="164" alt="image" border="0" 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"/></a> <a href="http://10rem.net/media/84994/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_18.png" target="_blank"><img src="http://10rem.net/media/84999/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_8.png" width="144" height="164" alt="image" border="0" 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"/></a></p> <p><em>(the photos aren't instagrammed, they just have poor lighting)</em></p> <p>Obviously the children each got something a little different from the process. Both enjoyed connecting them up and making something happen. Ben was able to understand the basic flow of electricity, and even a little about "AND" and "OR" logic gates. Abby enjoyed connecting all the pieces in a long chain, but also liked when she was able to test her strength against the pressure sensor (power + pressure sensor + LED bar graph == strength tester).</p> <p>Ben also liked trying to connect every possible module to make something giant. However, after playing with it a third time, <strong>he started to understand a very important aspect of software and hardware design: build in small steps and test after each step</strong>. I can think of a number of professional developers who could benefit from this :)</p> <p><a href="http://10rem.net/media/85004/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_8.png" target="_blank"><img src="http://10rem.net/media/85009/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_3.png" width="650" height="296" alt="image" border="0" 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"/></a></p> <p>My son's attention span is about the same as mine: 20 minutes. After that, he tends to get pretty antsy. (This is why you generally don't find me attending sessions by other speakers, or you see me sitting in the back and bailing when the session is half over. Nothing personal!) The littleBits did keep him engaged that entire time. <strong>More importantly, in the two days I've had these, he has played with them three times.</strong> Over time, they will likely only hold his attention if we add on newer modules that do different things. Kids are all about doing, not learning. The way to get them to learn is to get them to do, and the way to get them to do, is to find something that makes it dead simple to do something right off the bat. The littleBits definitely fit the bill here.</p> <p>During the third time playing with the bits, Ben really started to grasp the concept of the flow of electricity. He wanted to know what exactly it was. I found the water analogy good enough for our discussion here, especially since it helps explain the potentiometer and buttons very well. He even figured out, on his own, how the pressure sensor conceptually works.</p> <h4>Logic</h4> <p>Once you have the basics of electricity down, you can start messing with logic. I had ordered both an AND and an OR module. Each module takes two inputs and has a single output. As you would expect, both inputs must be powered for AND to produce output, and only one in the case of OR.</p> <p>Here's a simple AND gate made using: Power module, branch module, button and wire modules on top, button and wire modules on the bottom, and then the AND module and an LED module on the other ends of the wires. It demonstrates a logical "AND". That is, the LED will light only if both buttons are pressed.</p> <p><a href="http://10rem.net/media/85014/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_6.png" target="_blank"><img src="http://10rem.net/media/85019/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_2.png" width="650" height="263" alt="image" border="0" 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"/></a></p> <p>The other circuits shown have been built by Ben or Abby. In this case, I built this circuit for Ben to show logic. I wouldn't necessarily expect him to come up with it on his own, although he was able to grok the concept of AND very easily from this. <strong>This is far more interactive, visual, and intuitive when compared to a truth table</strong>.</p> <h3>One issue with littleBits</h3> <p>littleBits isn't without issues, however. <strong>There's one design issue which, to me, prevents this from being the perfect learning tool.</strong> Their pin design doesn't have much compensation for poorly aligned connectors. Sprung, semi-pointed pins on one side contact flat pads on another. The pins are sprung, but the tolerance for a good connection is still pretty tight, as I found that even a slight amount of deviation from square on multiple modules can lead to connection issues for the circuit.</p> <p>This very slight deviation from square, as shown here, is enough to cause those connection issues:</p> <p><a href="http://10rem.net/media/85024/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_22.png" target="_blank"><img src="http://10rem.net/media/85029/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_10.png" width="450" height="341" alt="image" border="0" 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"/></a></p> <p>Unfortunately, these connectors are rigidly connected to the boards, presumably in some sort of mass manufacturing process. As anyone who has <a href="http://10rem.net/blog/2012/03/31/midi-module-assembly-instructions" target="_blank">ever developed boards with connectors</a> knows, not all these connectors will be perpendicular to the boards once assembled. In the worst case (which happens to be in the set I have), you end up with a situation that looks like this:</p> <p><a href="http://10rem.net/media/85034/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_4.png" target="_blank"><img src="http://10rem.net/media/85039/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_thumb_1.png" width="650" height="358" alt="image" border="0" 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"/></a></p> <p>Notice how the boards sit off above the table, arched like a bridge. Right to left, there's the power module, a button module, the RGB LED module, another button module and (off picture) a regular LED module. If you press either of those two button modules, it causes the module to flatten to the table top, and disconnects the connection at the RGB module. Either I got a particularly bad batch, or this is a common issue. Like <a href="http://msgboard.snopes.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=80;t=000015;p=0" target="_blank">bank rounding errors famously making a crook rich</a>, the problem compounds based on the alignment of the modules in a given circuit and the number of modules with this problem.</p> <p><strong>Generally, the impact here is really only with the button modules, and a little with the potentiometer module, and only when you have a few offending modules in a chain. It's the downward pressure required for the button that causes the problem.</strong> You can still have lots of fun without the buttons, or perhaps even put a folded bit of paper under the high module. You can also, for smaller circuits, simply pick it up and squeeze the button between your thumb and finger.</p> <p>With modules this small size, the main issue isn't any warpage on the PCB itself, but the mounting of the plastic connector to the PCB base. The connectors aren't really deep enough to keep square during factory assembly.</p> <p>If these modules were some inexpensive chinese thing from ebay (they're not. They're designed and assembled in the USA), I'd have expected this. However, at the prices of these modules (I'm in about $230 right now), this is an unexpected and surprising flaw. My RGB module, in particular, is really sensitive to this.</p> <p><strong>For the ones that are particularly bad, I'm going to request replacements. It may be that some slipped through production in the batch I have. Or it could simply be early production issues from a startup company trying to meet higher than expected demand. I would expect littleBits to make it right for any that are like this; they seem like an upstanding type of company.</strong></p> <p>Note that the littleBits site seems to show this issue with what I assume is a prototype kit in the slide show on the main page:</p> <p><a href="http://littlebits.cc/" target="_blank"><img src="http://10rem.net/media/85044/Windows-Live-Writer_Teaching-kids-electronics-electricity-an_DBA5_image_28.png" width="594" height="239" alt="image" border="0" 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"/></a></p> <p>If you tried to connect something else downstream from that LED bargraph, you'd run into alignment issues. (In this case, the LED bargraph appears to have a connector incorrectly alignment, but leaning inward instead of outward as mine do).</p> <p><strong>Caveats of the connectors aside, I still think this is a great kit to get for you and your children, and I do not hesitate to recommend it as a way to teach the things I've mentioned here.</strong> My recommendation is to simply check alignment when you get the kit, and ask for replacement of any bits that are particularly out of tolerance. Sometimes you can only tell once you connect them up a few different ways and get the compounded issue of multiple misaligned parts.</p> <h3>Building your own bits</h3> <p>Little bits has been taking ideas on their <a href="http://littlebits.cc/dreambits" target="_blank">dreamBits page</a> for some time now. The list sometimes gets overtaken by joke entries (they seem to clean those up regularly), but there are also some good ideas there. But what do you do if you want to just build the bits yourself?</p> <p>littleBits has been saying for a bit (haha! I crack me up) that they will have their connectors available for sale soon. I have no idea how much they cost, but I'm pretty sure I'll pick up at least a few to try creating my own modules/bits. There are lots of interesting components you could build out, including interfaces to microcontrollers to kick things up to the next level, should you wish.</p> <p>Once they release the connectors, I'll probably give a few ideas a shot, and not just to show the kids how you can create your own stuff. Why not? <strong>The grown-ups can have fun (and learn) too :)</strong></p> <p><a href="http://feedads.g.doubleclick.net/~a/qeMle2aBJfKLUXZUsKjbaYrbsMc/0/da"><img src="http://feedads.g.doubleclick.net/~a/qeMle2aBJfKLUXZUsKjbaYrbsMc/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/qeMle2aBJfKLUXZUsKjbaYrbsMc/1/da"><img src="http://feedads.g.doubleclick.net/~a/qeMle2aBJfKLUXZUsKjbaYrbsMc/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=_J1x-sP2UDw:fmL0OLpG5Dg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=_J1x-sP2UDw:fmL0OLpG5Dg:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=_J1x-sP2UDw:fmL0OLpG5Dg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=_J1x-sP2UDw:fmL0OLpG5Dg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=_J1x-sP2UDw:fmL0OLpG5Dg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=_J1x-sP2UDw:fmL0OLpG5Dg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=_J1x-sP2UDw:fmL0OLpG5Dg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=_J1x-sP2UDw:fmL0OLpG5Dg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=_J1x-sP2UDw:fmL0OLpG5Dg:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/_J1x-sP2UDw" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/_J1x-sP2UDw/teaching-kids-electronics-electricity-and-logic-using-littlebits Pete Brown 3749 2012-05-06T02:57:39 Yet Another Podcast #64–John Papa & Javascript http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/9a90IWHY32k/ Jesse Liberty [MS] 3748 2012-05-03T19:44:03 Jugando con el ApplicationBar en los elementos de una App Panorama <p>Publicado por LucioMSP en abril 28, 2012 Hola amigos, el día de hoy les quiero compartir un pequeño tutorial sobre como manipular el ApplicationBar en todos los ítems que agreguemos en una aplicación estilo Panorama, es decir, hacer que se muestre el ApplicationBar solo en ciertos elementos de la Aplicación en Panorama y es que me encontré con varios problemas cuando quise realizar esto, ya que no encontré ningún material que me explicara al 100% lo que quería, además de que varias personas me comentaban que no se podía, o que no sabían, es por eso que quiero darlo a conocer. Parte 1  http://luciomsp.wordpress.com/2012/04/28/jugando-con-el-applicationbar-en-los-elementos-de-una-app-panorama/</p> http://blogs.ligasilverlight.com/2012/05/3725/ La Liga Silverlight 3747 2012-05-02T20:00:53 Delivering Rich Mobile Web Experiences in Windows Phone 7.5 (ESPN.com Case Study) <p>The Windows Phone Browser team has a goal of delivering the best web browsing experience on a smartphone. This goal has many components within our team: from the <a href="http://windowsteamblog.com/windows_phone/b/windowsphone/archive/2011/09/22/designing-ie9-mobile-putting-sites-in-the-spotlight.aspx">UI of the browser</a>, compatibility with a wide array of website layouts, and of course buttery-smooth rendering performance. However, even if we execute flawlessly on our end, we are missing a crucial piece - delivering a great web experience is fundamentally a <i>partnership</i> between our team and web developers. Achieving this goal means working together to ensure that your content and services are delightful for users to consume on Windows Phone. </p> <p>We understand that web development resources are always limited as you keep up with the increasing traffic from mobile devices, and the elusive &quot;write once, run everywhere&quot; promise of web development has not perfectly materialized. However, with IE9 for Windows Phone 7.5, we took a big step in the direction of this promise. By sharing a codebase with IE9 for the PC, we achieved identical <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/09/22/ie9-mobile-developer-overview.aspx">support for new web standards</a> and pushed the envelope on real-world performance with <a href="http://youtu.be/PfYeoR3Ug4E">industry-leading hardware acceleration</a>. We wanted to hear about developing for IE9 on WP7.5 from web developers directly, so we decided to collect some feedback and share it on the blog. </p> <p>ESPN.com recently deployed their premium web experience to Windows Phone, and we thought it would be great to hear what they had to say about developing for IE9 on Windows Phone. As a side note, ESPN started looking into supporting Windows Phone because of a simple request I made on their support page. Lots of folks on my team are sports fans and were asking me about the site's experience on WP7.5, so I just dropped ESPN a note like any user would. The message was quickly routed to the mobile site team; I have immense respect for ESPN’s responsiveness and the system they have place to address user feedback. Here's what Mike Marrone, technical lead, had to say about developing for IE9 on WP7.5:</p> <blockquote> <p>Overall, it was an easy process. We support only WP7.5 and IE9 thanks to its very good CSS3/HTML5 support. We are in a convenient position of having an existing legacy mobile site that older devices can fallback to. Honestly, development for WP7.5 boiled down to a fairly basic process - IE9 on the PC, being nearly the same browser, was a great dev tool to get most of the way there before final QA on actual devices.</p> </blockquote> <blockquote> <p>Some other more specific development notes:</p> <ul> <li>The &quot;display: box&quot; CSS style is not supported on WP7.5. We use this in carousel experiences to transition elements left or right 100% of the viewport without having to programmatically determine the viewport size (which means the browser automatically updates the positioning upon device rotation, etc.). On WP7.5, we actually used a better alternative thanks to it being the only browser that currently supports the CSS &quot;vw&quot; unit (VERY useful). <br /><i>[Amin] See </i><a href="http://www.w3.org/TR/css3-values/#viewport-relative-lengths"><i>here</i></a><i> and </i><a href="http://snook.ca/s/1000"><i>here</i></a><i> for more information on vw units.</i></li> <li>The bulk of our CSS differences between WP7.5 and other supported devices was with gradients. WP7.5 has an easy fallback with filters so it was not a big development issue. <br /><i>[Amin] See </i><a href="file://tkzaw-pro-19/MyDocs4/aminl/My Documents/MSFT/Blog posts/msdn.microsoft.com/en-us/library/ms532997(v=vs.85).aspx"><i>here</i></a><i> for information on using Gradient Filters in IE9.</i></li> <li>JavaScript touch events would be a nice addition. <br /><i>[Amin] We hear you, stay tuned!</i></li> </ul> <p>We look forward to your continued great progress in mobile.</p> </blockquote> <p>As you can imagine, this was music to our ears! We often use IE on the PC to investigate bugs, and it was great to hear that the tools work well for web development outside of our offices too. We appreciate the feedback (it will inform our plans for future releases) and welcome additional feedback through the comments below. </p> <p>IE9 on Windows Phone is set up to support rich web experiences with great performance, and often all it takes is <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/08/29/introducing-the-ie9-on-windows-phone-mango-user-agent-string.aspx">updating user-agent logic</a> and using <a href="http://blogs.msdn.com/b/ie/archive/2010/03/19/the-css-corner-about-css-corners.aspx">standards based (as opposed to vendor prefixed) HTML &amp; CSS</a>. ESPN invested a reasonable level of resources to do that and delivered a delightful experience to its users. I've definitely started to see the site pinned to Start around here, and I wouldn't be surprised if our senior managers are secretly checking ESPN during meetings.</p> <p>Here's a before (left) and after (right) screenshot of the ESPN.com experience on Windows Phone 7.5. We want to say thanks to ESPN, and we look forward to seeing more rich experiences light up!</p> <p align="left"><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5504.image_5F00_1C927520.png"><img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2110.image_5F00_thumb_5F00_6DCCBC7D.png" width="241" height="400" /></a>&#160;&#160;&#160;&#160; <a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/6232.image_5F00_780DBB10.png"><img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3652.image_5F00_thumb_5F00_6C0BCADC.png" width="241" height="400" /></a></p> <p><i>Special thanks to Krys Krycinski, Mike Marrone, and James Ballow at ESPN.</i></p> <p>Amin Lakhani <br />Program Manager, Windows Phone</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=581178" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/05/02/delivering-rich-mobile-web-experiences-in-windows-phone-7-5-espn-com-case-study.aspx Windows Phone Dev Blog 3746 2012-05-02T18:09:42 Neuerdings im Web (April 2012) Einen schönen Round-Up bringt uns NETTUTS über derzeitige Features und neuen nützlichen Javascript/jQuery Libraries für die Webentwicklung. Gut finde ich jQuery Scroll Path &#34;jQuery Scroll Path is a plugin that lets you define your own custom scroll path. What this means exactly is best understood by checking out the demo. The plugin uses canvas flavored [...] http://feedproxy.google.com/~r/BigglesBlog/~3/VH69TCISgV0/neuerdings-im-web-april-2012 Mario Priebe 3745 2012-05-02T08:41:08 Nachlese zur Visual Studio 2011 Beta Roadshow Am 25.April habe ich die Roadshow zu den Neuerungen von Visual Studio 11 in Frankfurt besucht und möchte nun einige der vielen Features, die in der fünfstündigen Veranstaltung erörtert wurden, kurz vorstellen. Auf den ersten Blick fallen die Änderungen am User Interface auf. So wurden alle Icons neu gestylt und die Toolbars aufgeräumt. Beispielsweise wurden die Icons für [...]<img src="http://feeds.feedburner.com/~r/UxDevelopa/~4/HyKOoJ9WRhE" height="1" width="1"/> http://feedproxy.google.com/~r/UxDevelopa/~3/HyKOoJ9WRhE/ Kazim Bahar 3744 2012-05-01T22:01:12 Symposium Session: Gadgeteering and the .NET Micro Framework <p>On April 24th I helped run the patterns &amp; practices Symposium 2012 Online on Channel 9. All of the <a href="http://channel9.msdn.com/Events/Patterns-Practices-Symposium-Online/Patterns-Practices-Symposium-Online-2012" target="_blank">videos are currently up and viewable on-demand</a>.</p> <p>As part of the event, I gave a <a href="http://channel9.msdn.com/Events/Patterns-Practices-Symposium-Online/Patterns-Practices-Symposium-Online-2012/Gadgeteering-and-hte-NET-Micro-Framework" target="_blank">talk on the .NET Micro Framework</a>. I had a ton of fun doing it, and got to show off a lot of great gear. Take a look and let me know what you think.</p> <p><a href="http://channel9.msdn.com/Events/Patterns-Practices-Symposium-Online/Patterns-Practices-Symposium-Online-2012/Gadgeteering-and-hte-NET-Micro-Framework" target="_blank"><img src="http://10rem.net/media/84912/Windows-Live-Writer_ad92dec766e0_D378_image_3.png" width="650" height="368" alt="image" border="0" 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"/></a></p> <p>I'll have the demos and presentation pptx uploaded shortly.</p> <p><a href="http://feedads.g.doubleclick.net/~a/WmCBJMpR_-Yq-8zoSwOkfdxZ1Jk/0/da"><img src="http://feedads.g.doubleclick.net/~a/WmCBJMpR_-Yq-8zoSwOkfdxZ1Jk/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/WmCBJMpR_-Yq-8zoSwOkfdxZ1Jk/1/da"><img src="http://feedads.g.doubleclick.net/~a/WmCBJMpR_-Yq-8zoSwOkfdxZ1Jk/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=aRcLL0_mK28:2WVF0P8ny38:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=aRcLL0_mK28:2WVF0P8ny38:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=aRcLL0_mK28:2WVF0P8ny38:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=aRcLL0_mK28:2WVF0P8ny38:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=aRcLL0_mK28:2WVF0P8ny38:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=aRcLL0_mK28:2WVF0P8ny38:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=aRcLL0_mK28:2WVF0P8ny38:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=aRcLL0_mK28:2WVF0P8ny38:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=aRcLL0_mK28:2WVF0P8ny38:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/aRcLL0_mK28" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/aRcLL0_mK28/symposium-session-gadgeteering-and-the-net-micro-framework Pete Brown 3743 2012-05-01T21:12:13 Visual Studio Achievements For Windows Azure Buzz <p><img style="margin: 0px 5px 0px 0px; display: inline; float: left" align="left" src="http://mschannel9-ht2.dl.msecn.net/vsachievements/azureBadge.png" />Here’s some links to posts and stories about the 15 new Windows Azure achievements added to Visual Studio Achievements:</p> <p><a href="http://www.neowin.net/news/visual-studio-adds-windows-azure-achievements">Visual Studio Adds Windows Azure Achievements</a><strong> <br /></strong>Neowin</p> <p><u><a href="http://www.i-programmer.info/news/99-professional/4123-azure-gamified-more-badges.html">Azure Gamified - More Badges!</a> <br /></u>I Programmer</p> <p><a href="http://blogs.technet.com/b/microsoft_blog/archive/2012/04/26/visual-studio-brings-gamification-to-windows-azure-development.aspx" target="_blank">Visual Studio Achievements Brings Gamification to Windows Azure Development</a> <br />MSFT post</p> <p><a href="http://blogs.msdn.com/b/windowsazure/archive/2012/04/26/announcing-windows-azure-achievements-for-visual-studio.aspx" target="_blank">Announcing Windows Azure Achievements For Visual Studio</a> <br />Windows Azure Post</p> <p><a href="http://channel9.msdn.com/Shows/Cloud+Cover/Episode-78-Security-and-Compliance" target="_blank">Cloud Cover Video</a> <br />Channel9</p> <p><a href="http://channel9.msdn.com/Blogs/C9Team/Announcing-Visual-Studio-Achievements-For-Windows-Azure" target="_blank">Announcing Visual Studio Achievements For Windows Azure</a> <br />Channel9</p> http://rhizohm.net/irhetoric/post/2012/05/01/Visual-Studio-Achievements-For-Windows-Azure-Buzz.aspx Karsten Januszewski [MS] 3742 2012-05-01T19:31:37 Four ways we’re improving Marketplace <p>Today I’ll outline the latest steps we’re taking in our ongoing effort to keep the quality bar high in our rapidly growing Marketplace. I know most of you share our goal of a great shopping experience and already go out of your way to follow our policies and guidance. For others, I hope this insight into a few near-term changes we’re putting in place helps save you time and reduces your risk of having apps pulled from the Marketplace.</p> <p><b>Avoiding trademark trouble</b></p> <p>When a trademark or copyright owner contacts us about a suspected violation, we investigate and pull apps when the complaint is valid. Lately we’ve been doing more of this, especially for trademark misuse. Sometimes the requests come from the owners of big, well-known brands. Other times they come from new brands. Either way, we often find trademark violations are unintentional: some developers just aren’t clear on what constitutes a violation. But these investigations—and the time and money they can cost—can be avoided by doing a little homework before submitting or updating your app.</p> <p>If you’re developing an app, please consult our <a href="http://msdn.microsoft.com/en-us/library/hh184842(v=vs.92).aspx">content policy</a> covering trademarks and this related <a href="http://msdn.microsoft.com/en-us/library/hh347118(v=VS.92).aspx">Q&amp;A</a>. (The <a href="http://www.uspto.gov/trademarks/basics/trade_defin.jsp">U.S. Trademark and Patent Office</a> also has helpful background and a trademark search tool.) Our rules boil down to this: Your registered publisher name and everything about your app—name, logo, description, screenshots—must be unique and free of trademarked content unless (1) you own the trademark, (2) you’ve secured permission from the owner to use it, or (3) you’re using a trademarked name (<i>not</i> a logo) to describe your app’s features or functionality without suggesting that the app is actually published by the trademark owner. </p> <p>For example, using “Microsoft App Co.” as your publisher name would cause problems because “Microsoft” is a trademarked term. By the same logic, you couldn’t call your app “MSN” or “YouTube”. However, you may be able to make an app called “Reader for MSN,” as long as you don’t use the MSN logo or otherwise suggest that the app is published by Microsoft.</p> <p><b>Keeping the quality bar high </b></p> <p>I’ve <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/09/29/taking-a-tougher-stance-on-bulk-app-publishing.aspx" target="_blank">posted before</a> about our efforts to help ensure that apps in Marketplace offer clear value. One of those efforts concerns bulk publishing—developers who send us hundreds of similar apps simultaneously. Today I want to mention two related issues on our radar that could affect developers working on app genres that lend themselves to bulk publishing. </p> <p>First, we’re seeing developers submit the same app to multiple Marketplace categories, a violation of our policies. Instead, you should pick a single category that best reflects the content and function of your app. This not only helps customers find your app but gives all developers an equal opportunity to have their app discovered where people expect. Developers who submit the same app across multiple categories will have it removed from the catalog.</p> <p>Second, when you create multiple closely-related apps—say, a series of quote apps that vary by theme—the Marketplace tile images must reflect the unique features of each individual app. They cannot be duplicates or near duplicates of each other. Your branding also shouldn’t dominate the tile. Here are a few examples of dos and don’ts:</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2845.image_5F00_7B79CB49.png"><img style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2705.image_5F00_thumb_5F00_39FF18F0.png" width="642" height="201" /></a></p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5047.image_5F00_671405BE.png"><img style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/0172.image_5F00_thumb_5F00_0D75E90A.png" width="641" height="209" /></a></p> <p>Creating unique, easily distinguishable app tiles helps customers see at a glance what’s different about the apps you’re publishing, improving the shopping experience and potential for downloads.</p> <p><b>Cleaning up keywords</b></p> <p>Some developers have been violating Marketplace policy by entering more than the five allowed keywords for an app. A keyword is a word or short phrase that describes your app. Entered during the App Hub submission process, these words or phrases are always separated by commas.</p> <p>Starting this week, we’re going to start enforcing the five keyword rule for all current and future Marketplace apps. Any app that exceeds this number will have <i>all</i> its keywords deleted. Affected developers will be notified and can then enter five new keywords in App Hub. We’re taking this action to help ensure that customers are able to find the most relevant set of apps for their search—including yours. </p> <p>We’re also starting to examine app keywords for relevancy. We’ve noticed some developers have been entering keywords that are popular search terms—“Justin Bieber,” “YouTube”—but are totally unrelated to their app and what it does. If we find a keyword that’s not relevant to your app’s function or content, we’ll delete that keyword. Additionally, if you suspect that other developers are using high-impact keywords unrelated to their app— “Skype” for a tic-tac-toe game, for example—email <a href="mailto:reportapp@microsoft.com">reportapp@microsoft.com</a> with the details and we’ll investigate.</p> <p><b>Refining our approach to content policy enforcement </b></p> <p>The final issue I want to discuss is one that affects all major app stores today: the treatment of apps that are “racy” or sexual in nature. We’re committed to offering a diverse selection of safe and quality apps that appeal to a wide range of customer interests. Items that some customers view as entertainment, others may consider inappropriate. This is a challenge for any big retailer, whether they operate online or down the street.</p> <p>We think the right solution is (a) to be transparent about what’s acceptable and (b) to show the right merchandise to the right customer in the right place. Our content policies are <a href="http://msdn.microsoft.com/en-us/library/hh184842(v=vs.92).aspx">clearly spelled out</a>: we don’t allow apps containing “sexually suggestive or provocative” images or content. What we do permit is the kind of content you occasionally see on prime-time TV or the pages of a magazine’s swimsuit issue.</p> <p>Admittedly, it’s tricky catering to such a wide range of people and markets. But we take this responsibility seriously and evaluate and discuss questionable cases. Recently we decided that we could improve the shopping experience for <i>all </i>our customers by a more stringent interpretation and enforcement of our existing content policy.</p> <p>Specifically, we will be paying more attention to the icons, titles, and content of these apps and expect them to be more subtle and modest in the imagery and terms used. Apps that don’t fit our standard will need to be updated to remain in the store. This is about presenting the right content to the right customer and ensuring that apps meet our standards. We will also monitor customer reaction to apps and reserve the right to remove ones that our customers find offensive</p> <p>While this change might require a little extra work on the part of a small number of developers, there are plenty of creative and appropriate ways to comply: showing male or female models in silhouette, for example, is one possible alternative. Here are a few other examples of app tiles that pass muster:</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5481.image_5F00_05EA799D.png"><img style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/7633.image_5F00_thumb_5F00_175ADA75.png" width="483" height="97" /></a></p> <p>If you’re one of the handful of impacted developers, we will be reaching out to you within the next few days with more specific guidance on changes you need to make. If you don’t hear from us, there is no immediate action you need to take. </p> <p>I hope this post has provided some useful tips and helpful insight into our policies, and how they’re evolving to reflect both customer and developer feedback and the growing size and reach of the Windows Phone Marketplace. We’re committed to our developer community and appreciate your feedback on how we can make Marketplace better for you and your customers. I look forward to hearing your thoughts.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=581070" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/30/four-ways-we-re-improving-marketplace.aspx Windows Phone Dev Blog 3741 2012-04-30T23:48:45 Efecto “Gloss” de los iconos en iOS Alguna vez nos ha sido necesario eliminar el "brillito" que iOS introduce en los iconos de nuestras aplicaciones. A ese efecto se le conoce como "Gloss". Tiene este aspecto: Pero imaginad que queremos eliminar ese efecto ya que nuestro diseñador &#8230; <a href="http://speakingin.net/2012/04/30/efecto-gloss-de-los-iconos-en-ios/">Continue reading <span class="meta-nav">&#8594;</span></a> http://speakingin.net/2012/04/30/efecto-gloss-de-los-iconos-en-ios/?utm_source=rss&utm_medium=rss&utm_campaign=efecto-gloss-de-los-iconos-en-ios Juan María Laó Ramos 3740 2012-04-30T01:00:10 CodeFluent Entities. Nunca el DDD fué tan fácil Vamos a ver en este post es un producto que he encontrado y parece muy prometedor. CodeFluent Entities es una herramienta de modelado que nos permite generar y mantener actualizadas todas las layers y capas de nuestra aplicación. Asegurando el &#8230; <a href="http://speakingin.net/2012/04/27/codefluent-entities/">Continue reading <span class="meta-nav">&#8594;</span></a> http://speakingin.net/2012/04/27/codefluent-entities/?utm_source=rss&utm_medium=rss&utm_campaign=codefluent-entities Juan María Laó Ramos 3739 2012-04-27T01:00:54 GridView Control in Windows 8 http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/_vemEh5ePZI/ Jesse Liberty [MS] 3738 2012-04-26T20:09:26 Cell·SDK y el emulador de Android Hace unas semanas se publicó una actualización del emulador de Android que muchos estábamos esperando. Entre otras cosas, la característica fundamental, y una de las más esperadas, es que esta versión del emulador por fin soporta la aceleración de GPU, necesaria &#8230; <a href="http://speakingin.net/2012/04/26/cell%c2%b7sdk-y-el-emulador-de-android/">Continue reading <span class="meta-nav">&#8594;</span></a> http://speakingin.net/2012/04/26/cell·sdk-y-el-emulador-de-android/?utm_source=rss&utm_medium=rss&utm_campaign=cell%25c2%25b7sdk-y-el-emulador-de-android Juan María Laó Ramos 3737 2012-04-26T12:25:59 Two Marketplace changes; An update on 9 new markets <p>I wanted to make sure you saw the Windows Phone consumer blog today, because my colleague Mazhar <a href="http://windowsteamblog.com/windows_phone/b/windowsphone/archive/2012/04/24/two-marketplace-changes-and-how-they-affect-you.aspx">highlights</a> two changes to the Marketplace shopping experience that developers should be aware of.</p> <p>First, we’re removing the option to browse and buy Windows Phone apps from the Zune PC software, a change that started rolling out this afternoon. Second, in the coming weeks we’ll also start requiring that customers have Windows Phone 7.5 installed on their phone to buy, download, update, or review apps in Marketplace. </p> <p>Mazhar’s post has more details and background. But I want to highlight one important way the removal of the Windows Phone store from Zune impacts developers.</p> <p>It’s important to make sure you’re using the correct protocol for direct links to your app in Marketplace. This “deep link,” as it’s also called, makes it easy for customers to pull up your app in the phone and web stores. The correct format is: </p> <p align="center"><em>http://windowsphone.com/s?appId={GUID}</em></p> <p>You’ll find more details on deep links <a href="http://msdn.microsoft.com/en-us/library/ff967553(v=vs.92).aspx">here on MSDN</a>. If you use the older <em>zune://</em><strong> </strong>format for links, customers will see an error message. Just something to keep in mind.</p> <p>One final update for today: We just released the OS software required to bring Marketplace to customers in Bahrain, Israel, Iraq, Kazakhstan, Qatar, Saudi Arabia, Thailand, UAE and Vietnam. These nine markets—which are already open for app submissions—were part of the larger Marketplace&#160; expansion <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/15/app-hub-accepting-submissions-for-new-markets-soon.aspx">I outlined</a> last month. Our hardware partners can now create phones for these markets and begin their final launch preparations. </p> <p>Mazhar will have more to say about these new storefronts in the weeks ahead.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=580787" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/24/two-marketplace-changes-an-update-on-9-new-markets.aspx Windows Phone Dev Blog 3736 2012-04-25T00:49:34 Respond to User Input <p>The fourth of the four principles I mentioned in <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/07/optimizing-apps-for-lower-cost-devices.aspx">Optimizing Apps for Lower Cost Devices</a> is Respond to User Input.</p> <p>A responsive UI is a basic expectation that users have of apps.&nbsp; Failing to respond to user input can frustrate users and can ultimately drive them away to other apps that are more responsive.</p> <p>The basic guidance here is to keep as much activity off of the UI thread as possible until absolutely necessary.&nbsp; The UI thread is what processes user input for you, so any code you execute on that thread will interfere with this processing.&nbsp; Unless you're updating elements of your UI, you generally should not be executing code on the UI thread.</p> <p>A quick way to check whether a block of code is running on the UI thread is to call <a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcher.checkaccess(v=vs.95).aspx">Deployment.Current.Dispatcher.CheckAccess()</a> inside that block of code (Intellisense won't show this method but it is there and useful).&nbsp; This will return true if the code is executing on the UI thread, so if this returns true and you're not updating your UI, then you've found code that could be moved to background threads.</p> <p>An easy way to move code to background threads is to wrap it in a call to <a href="http://msdn.microsoft.com/en-us/library/kbf0f1ct(v=vs.95).aspx">ThreadPool.QueueUserWorkItem()</a>.</p> <pre><code>// Running on the UI thread.<br />...<br /></code></pre> <pre><code></code><code>// Running on a background thread.<br />ThreadPool.QueueUserWorkItem((o) =&gt;<br />{<br />&nbsp;&nbsp;&nbsp; ...<br />}</code></pre> <p>The <a href="http://msdn.microsoft.com/en-us/library/y5htx827(v=vs.95).aspx">ThreadPool</a> is (as its name suggests) a pool of background threads that are waiting to execute work items for you.&nbsp; <a href="http://msdn.microsoft.com/en-us/library/kbf0f1ct(v=vs.95).aspx">QueueUserWorkItem</a> enables you to register blocks of code that will execute on the next available background thread in the ThreadPool.&nbsp; Note that use of ThreadPools is common and encouraged across many platforms (including <a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.system.threading.aspx">Windows 8</a>) so familiarizing yourself with them will serve you well in future projects.</p> <p>When you are ready to update your UI, you will need to return to the UI thread.&nbsp; You can return to the UI thread at any time from a background thread by wrapping your code in a call to <a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcher(v=vs.95).aspx">Deployment.Current.Dispatcher.BeginInvoke()</a>.</p> <pre><code>// Running on a background thread.<br />ThreadPool.QueueUserWorkItem((o) =&gt;<br />{<br />&nbsp;&nbsp;&nbsp; ...<br /><br />&nbsp;&nbsp;&nbsp; // Running on the UI thread.<br />&nbsp;&nbsp;&nbsp; Deployment.Current.Dispatcher.BeginInvoke(() =&gt;<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp; }<br />}</code></pre> <p>If you try to update your UI from a background thread, you will receive an UnauthorizedAccessException with the message "Invalid cross-thread access."&nbsp; In these cases, wrap the offending code in a call to <a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcher(v=vs.95).aspx">Deployment.Current.Dispatcher.BeginInvoke()</a> as shown above to execute it on the UI thread as required.</p> <p>In addition to being able to control whether your code executes on the UI thread or on background threads, you also have options to do the same with framework code in several places.</p> <p>Image decoding is an expensive operation that can harm interactivity significantly if executed on the UI thread, particularly if you're loading many images at a time.&nbsp; The framework allows you to specify <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapcreateoptions(v=vs.95).aspx">BitmapCreateOptions</a> to control whether image decoding executes on the UI thread or on background threads.&nbsp; Be sure to use the <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapcreateoptions(v=vs.95).aspx">BackgroundCreation</a> option to move image decoding to background threads.</p> <p>The built-in ProgressBar control has <a href="http://www.jeff.wilcox.name/2010/08/performanceprogressbar/">known performance problems</a> that can harm UI performance as a result of its animations executing on the UI thread.&nbsp; Use the SystemTray <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx">ProgressIndicator</a> for the best performance as the <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx">ProgressIndicator</a> is a shell component that will not interfere with your UI thread.&nbsp; A bonus to using the <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx">ProgressIndicator</a> is that your UX will more closely match the UX of the built-in experiences.</p> <p>If you're using animations in your app, use <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.animation.storyboard(v=vs.95).aspx">Storyboards</a> wherever possible as these run on an important background thread known as the compositor thread and will not interfere with your UI thread.&nbsp; If you're familiar with <a href="http://msdn.microsoft.com/en-us/library/cc295346(v=expression.40).aspx">Expression Blend</a>, it can be particularly useful for generating Storyboards.</p> <p>With code now running off of the UI thread for a given page, you should also focus on optimizing navigation between pages.</p> <p>To keep page load times and in-app navigation responsive, defer loading activities until the first frame is rendered. The guidance for <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/03/optimize-startup-time.aspx">optimizing startup time of your MainPage</a> applies to optimizing the startup time of subsequent page loads as well. Enabling the <a href="http://msdn.microsoft.com/en-us/library/ff941094(v=VS.92).aspx">TiltEffect</a> is a great way to acknowledge user input and indicate that navigation is in progress. This will make your app look and feel more like the first party experiences as well.</p> <p>Many apps add page transition animations to add style to in-app navigations. While this is a great practice to make your apps more dynamic, excessive use of transition animations can delay load times, particularly when the generation/execution of the animations result in spikes in memory/CPU usage.&nbsp; If transition animations are causing performance problems in your app, disabling them completely, or at least <a href="http://msdn.microsoft.com/en-us/library/hh855083(v=vs.92).aspx">on low-memory devices only</a>, can significantly improve in-app navigation performance.</p> <p>Maintaining a responsive UI is important regardless of the platform you are targeting.&nbsp; By offloading work to background threads and keeping in-app navigation fast, you'll provide the best possible experience to your users.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=580771" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/24/respond-to-user-input.aspx Windows Phone Dev Blog 3735 2012-04-24T17:53:00 Insidious ByRef Legacy Code Issue The ByRef in the title should give you a hint that this is about legacy VB.NET code. One of my duties at my new job is to maintain our legacy VB.NET codebase until we deploy our WPF software. When I use the term legacy it should not be taken in a negative manner. Our legacy [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karlshifflett.wordpress.com&#038;blog=1204518&#038;post=1786&#038;subd=karlshifflett&#038;ref=&#038;feed=1" width="1" height="1" /> http://karlshifflett.wordpress.com/2012/04/24/insidious-byref-legacy-code-issue/ Karl Shifflett [MS] 3734 2012-04-24T15:22:30 Announcing the Building Windows 8 apps with C++ Windows camp <p>Join the Microsoft Visual C++ and Windows teams <span style="color: #333333;" color="#333333"><strong>in Redmond on</strong></span> <strong>May 18, 2012</strong> for a free, all-day event focused on <strong>building Windows 8 Metro style apps with C++</strong>.</p> <p>&nbsp;</p> <p>Whether you are a new C++ developer ready to learn about the writing Metro style apps, an intermediate developer who wants to hone your code and skills, or an experienced C++ developer eager to squeeze every ounce of performance out of your Metro style app and/or push the boundaries of Windows 8, <em>then</em> <em>this event is for you</em>. <strong>We will have pragmatic advice for every developer writing Metro style apps and games with XAML or DirectX and C++.</strong></p> <h4>Agenda:</h4> <ul> <li>C++ for Windows 8, Keynote by Herb Sutter</li> <li>Building Windows 8 apps with XAML and C++</li> <li>Building Windows 8 games with DirectX and C++</li> <li>Introduction to the Windows Runtime Library (WRL)</li> <li>Writing Connected apps: Writing networking code with C++</li> <li>Combining XAML &amp; Direct X in a Metro style apps</li> <li>Writing WinRT components to be consumed from any language</li> <li>VC11 compiler flags for getting the most out of C++</li> </ul> <p><strong>Registration: <br /></strong><span style="color: #ff0000; font-size: small;" color="#ff0000" size="3">Register for this event </span><a href="https://win8.msregistration.com/default.aspx?ID=559a9ac4-96a6-46a1-b359-598e345d25be" target="_blank"><span style="color: #ff0000; font-size: small;" color="#ff0000" size="3">here</span></a><span style="color: #ff0000;" color="#ff0000">.&nbsp; </span>If is first-come, first-serve, and we are limited in space, so register soon. <br />If you want to learn more about other Windows 8 camps check the <a href="http://www.devcamps.ms/windows" target="_blank">camps site</a>.&nbsp;&nbsp;</p> <p><strong>Details: <br />Location: </strong>Redmond WA, Microsoft campus, bldg 92. <br /><strong>Date:&nbsp; </strong>May 18th, 2012 <br /><strong>Time:&nbsp; </strong>9 AM to 5 PM for sessions,&nbsp; Q&amp;A and a small social event afterwards. <br /><strong>Speakers:&nbsp; </strong>We will update the list of speakers early next week, we are still negotiating session times &amp; speakers to cram as much as we can into a single day.&nbsp; <br />Rest assured most of them are from the product team and yes, Herb Sutter will do the opening keynote and the first session. <br /><strong>Meals:&nbsp; </strong>We will have some light breakfast, lunch, snacks and appetizers + drinks at the end of the day.</p> <p><strong>My personal pitch on this event: <br /></strong>Even if you are already coding your Metro style app, you don&rsquo;t want to miss this event. All the speakers are product team people, and we will have a very strong pragmatic angle during our sessions; we are aiming to answer a lot of the questions and help you avoid the common pit-falls that we have seen our early partners building Metro style apps with C++ have ran into.&nbsp; There will also be ample Q&amp;A time through out the day. <br /> <br />Happy Windows 8 coding.&nbsp; Please help us spread the word on this event we are really excited to connect with C++ community.</p><div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10296762" width="1" height="1"> http://blogs.msdn.com/b/jaimer/archive/2012/04/23/announcing-the-building-windows-8-apps-with-c-windows-camp.aspx Jaime Rodriguez [MS] 3733 2012-04-23T21:13:00 Buch: Perry Rhodan Neo 1 - Sternenstaub - Frank Borsch <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 10px 10px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top: 0px; border-right: 0px; padding-top: 0px" title="Perry Rhodan Neo 1 - Sternenstaub - Frank Borsch" border="0" alt="Perry Rhodan Neo 1 - Sternenstaub - Frank Borsch" align="left" src="http://devtyr.norberteder.com/image.axd?picture=image_167.png" width="113" height="164" /></p> <p><em>Das Jahr 2036: Überbevölkerung, Klimawandel und Terrorismus - die Menschheit steht kurz vor dem Untergang. Zudem steigen die Spannungen zwischen den Machtblöcken. In dieser Lage startet der amerikanische Astronaut Perry Rhodan mit drei Kameraden zum Mond - denn dort geschieht Unheimliches. Mit einer uralten Rakete brechen die vier Astronauten ins Abenteuer ihres Lebens auf. Auf dem Mond treffen sie auf die menschenähnlichen Arkoniden. Rhodan erkennt die Schwäche der Aliens - und er schlägt ihnen einen gewagten Handel vor. Sein Ziel: Er will Frieden für die Menschheit. Sein Preis: Er muss sich gegen alle Regierungen der Welt stellen.</em></p> <p>Bis jetzt hatte ich immer einen Bogen um Perry Rhodan gemacht. Warum kann ich nicht genau sagen, unterschwellig müssen wohl dennoch Gründe vorhanden gewesen sein. Mit der Anschaffung eines Kindle habe ich dann aber dann doch den Sprung gewagt und mich via Neo an den Neustart von Perry Rhodan gemacht. Ohne also irgendeiner Altlast aufzusitzen, ohne Vorurteile, ohne den ständigen Vergleich, konnte ich mich daher auf den Inhalt und die Erzählung konzentrieren. Und ich muss sagen: Ich bin begeistert. Die einzelnen Charaktere sind gut herausgearbeitet, die Story selbst ist interessant und modern. Für mich ein gelungener Einstieg und ganz klar empfehlenswert!</p> <p><strong>Bewertung</strong>: 5/5</p> <blockquote> <p>Weitere von mir gelesene und bewertete Bücher finden sich unter <a href="http://devtyr.norberteder.com/page/books.aspx">Lesestoff</a>.</p></blockquote> http://devtyr.norberteder.com/post/Buch-Perry-Rhodan-Neo-1-Sternenstaub-Frank-Borsch.aspx Norbert Eder [MVP] 3732 2012-04-23T14:13:51 2-4-6-8-10 <p> If you've been following my blog, you know that for the past few months I've been working on the 6th edition of <i>Programming Windows</i>, which focuses on writing Metro style applications for Windows 8 using C# and XAML. </p><p>... more ...</p> http://www.charlespetzold.com/blog/2012/04/2-4-6-8-10.html Charles Petzold 3731 2012-04-23T14:00:00 Interaction Event-Trigger als Style auslagern In einem Caliburn.Micro Projekt setze ich den EventTrigger ein, um meine Commands an einem ViewModel zu binden. Nun möchte ich gerne immer den selben EventTrigger an mehreren Stellen einsetzen und verhindern, dass der Code an “tausend” Stellen redundant eingesetzt wird. Aus diesem Grund, soll diese Interaktion als Style zu Verfügung gestellt werden. Der folgende Code [...] http://feedproxy.google.com/~r/BigglesBlog/~3/pEBiI19Veec/interaction-event-trigger-als-style-auslagern Mario Priebe 3730 2012-04-23T12:26:31 Maker Geek Roundup 011 for 4/21/2012 <p>The Maker Geek Roundup aggregates information of interest to makers everywhere. Topics include .NET Micro Framework, Arduino, AVR and other MCUs, CNC, 3d Printing, Robotics, Microsoft Robotics Studio, Electronics, General Maker stuff, and more. If you have something interesting you've done or have run across, or you blog regularly on the topics included here, please send me the URL and brief description via the <a href="http://10rem.net/contact">contact link</a>.</p> <h3>3d Printing, Laser Cutting, and CAD/CAM/CNC</h3> <ul> <li><a href="http://www.protoparadigm.com/2012/02/comparing-3d-printers/">Comparing Entry Level 3D Printers</a> (ProtoParadigm)</li> <li><a href="http://www.grassrootsengineering.com/blog/2012/04/21/damn-right/"> The third industrial revolution</a> (Grass Roots Engineering)</li> <li><a href="http://www.makerbot.com/blog/2012/04/17/makerbot-thing-o-matics-where-we-are-now/"> MakerBot Thing-O-Matics: Where We Are Now</a> (MakerBot Industries)</li> <li><a href="http://richrap.blogspot.com/2012/04/universal-paste-extruder-ceramic-food.html"> Universal Paste extruder - Ceramic, Food and Real Chocolate 3D Printing...</a> (Reprep dev and DIY 3d)</li> <li><a href="http://ifeelbeta.de/index.php/production/beta-casted-wallace-3d-printer"> Beta casted Wallace 3D printer</a> (2PrintBeta)</li> <li><a href="http://www.protoparadigm.com/2012/04/thing-o-matic-mk7-pla-set-up-and-troubleshooting-mk8/"> Thing-O-Matic MK7 PLA Set-Up and Troubleshooting (Likely MK8)</a> (ProtoParadigm)</li> <li><a href="http://blog.makezine.com/2012/04/21/costume-piece-molded-from-3d-printed-parts/"> Costume Piece Molded from 3D-Printed Parts</a> (Make)</li> </ul> <h3>.NET Gadgeteer and Netduino GO</h3> <ul> <li><a href="http://mikedodaro.net/2012/04/18/mind-control-of-net-gadgeteer-device-via-neurosky-eeg-sensor/"> Mind Control of .NET Gadgeteer Device via Neurosky EEG Sensor</a> (Michael Dodaro)</li> <li><a href="http://fabienroyer.wordpress.com/2012/04/04/nwazet-modules-for-netduino-go/"> [nwazet modules for Netduino GO!</a> (Fabien's Bit Bucket)</li> <li><a href="http://mikedodaro.net/2012/04/21/controlling-a-gadgeteer-device-using-bluetooth-module-and-32feet-net-library/"> Controlling a Gadgeteer device using Bluetooth Module and 32feet.NET library</a> (Marco Minerva)</li> <li><a href="http://forums.netduino.com/index.php?/topic/4003-gadgeteer-light/"> Gadgeteer Light</a> (Stefan - Netduino Forums)</li> <li><a href="http://blog.ianlee.info/2012/04/getting-started-with-hydra-basic-kit.html"> Software &amp; Sawdust: Getting Started With a FEZ Hydra Basic Kit</a> (Richard Ian Lee Sr)</li> <li><a href="http://fabienroyer.wordpress.com/2012/04/06/nwazet-go-modules-source-code-and-eagle-schematics-on-bitbucket/"> [nwazet GO! Modules Source Code and Eagle Schematics on BitBucket</a> (Fabien's Bit Bucket)</li> <li><a href="http://fabienroyer.wordpress.com/2012/04/08/netduino-go-hacking-breaking-out-sockets/"> Netduino GO! Hacking - Breaking out sockets</a> (Fabien's Bit Bucket)</li> <li><a href="http://forums.netduino.com/index.php?/topic/4048-netduino-go-rgb-umbrella/"> Netduino Go! RGB Umbrella</a> (Stefan - Netduino Forums)</li> </ul> <h3>Other .NET Micro Framework General (Netduino Classic, GHI FEZ, etc.)</h3> <ul> <li><a href="http://blogs.msdn.com/b/laurelle/archive/2012/04/07/using-netduino-and-net-microframework-to-pilot-any-lego-power-function-thru-infrared-part-1.aspx"> Using netduino and .NET Microframework to pilot any Lego Power Function thru Infrared (part 1)</a> (Laurent Ellerbach)</li> <li style="list-style: none"> <ul> <li><a href="http://blogs.msdn.com/b/laurelle/archive/2012/04/17/using-netduino-and-net-microframework-to-pilot-any-lego-power-function-thru-infrared-part-2.aspx"> Using netduino and .NET Microframework to pilot any Lego Power Function thru Infrared (part 2)</a></li> </ul> </li> <li><a href="http://forums.netduino.com/index.php?/topic/3924-netduino-plus-physical-gmail-notifier/"> Netduino Plus Physical Gmail Notifier</a> (smarcus3 - Netduino Forums)</li> </ul> <h3>Arduino</h3> <ul> <li><a href="http://www.howmuchsnow.com/arduino/airquality/">Monitoring your Air Quality</a> (Chris Nafis)</li> <li><a href="http://tronixstuff.wordpress.com/2012/04/09/arduino-and-tm1640-led-display-modules/"> Arduino and TM1640 LED Display Modules</a> (tronixstuff)</li> <li><a href="http://arduino.cc/blog/2012/04/18/arduino-flamethrower-guitarhero-rockstar/"> Arduino + Flamethrower + Guitarhero = Rockstar</a> (Arduino Blog)</li> <li><a href="http://dangerousprototypes.com/2012/04/20/arduino-lie-detector/"> Arduino lie detector</a> (Dangerous Prototypes)</li> <li><a href="http://arduino.cc/blog/2012/04/20/cubicle-fun-just-levelled-up-with-arduino/"> 'Cubicle fun' just levelled up with Arduino</a> (Arduino Blog)</li> <li><a href="http://tronixstuff.wordpress.com/2012/04/07/hewlett-packard-5082-7415-led-display-from-1976/"> Hewlett-Packard 5082-7415 LED Display from 1976</a> (tronixstuff)</li> </ul> <h3>Other Microcontrollers (PIC, AVR, ARM, BeagleBoard, and more)</h3> <ul> <li><a href="http://www.bot-thoughts.com/2012/04/road-testing-arm-lpc2101-part-2.html"> Bot Thoughts: Road Testing an ARM LPC2101</a> (Bot Thoughts)</li> </ul> <h3>General Electronics and Hardware Hacking</h3> <ul> <li><a href="http://blog.makezine.com/2012/04/20/converting-an-inkjet-printer-to-print-pcbs/"> Converting An Inkjet Printer To Print PCBs</a> (Make)</li> <li><a href="http://www.electronics-lab.com/blog/?p=18160">New Weller WX 2 Soldering Station</a> (Electronics-Lab.com)</li> <li><a href="http://circuit-zone.com/index.php?electronic_project=671">Hybrid Headphone Amplifier</a> (Circuit Zone)</li> <li><a href="http://this8bitlife.com/this-8-bit-life/2012/4/16/this-homemade-headphone-amplifier-is-a-work-of-art.html"> This Homemade Headphone Amplifier is a Work of Art</a> (this 8-bit life)</li> <li><a href="http://dangerousprototypes.com/2012/04/21/app-note-op-amp-based-diy-regulators/"> App note: Op-amp based DIY linear voltage regulators</a> (Dangerous Prototypes)</li> <li><a href="http://circuit-zone.com/index.php?electronic_project=670">Portable Headphone Amplifier</a> (Circuit Zone)</li> </ul> <h3>Robots and Robotics Studio and *Copters</h3> <ul> <li><a href="http://www.rcexplorer.se/files/CNCTricopterSale.html#unique-entry-id-342"> CNC cut Tricopter frames for sale</a> (RCExplorer)</li> <li><a href="http://www.rcexplorer.se/projects/550x/FPVMTri.html">Gaui 500X</a> (RCExplorer)</li> </ul> <h3>Synthesizers, Music, and MIDI</h3> <ul> <li><a href="http://mutable-instruments.net/shruthi1/build/4pm">Shruthi-1 4-pole mission filter board</a> (Mutable Instruments)</li> <li><a href="http://arduino.cc/blog/2012/04/18/beatbearing-using-arduino/"> Beatbearing using Arduino</a> (Arduino Blog)</li> <li style="list-style: none"> <ul> <li>also <a href="http://www.youtube.com/watch?v=MJe0nsLt1H4&amp;feature=relmfu"> BeatBearing 45-second demo</a></li> </ul> </li> <li><a href="http://m.matrixsynth.com/2012/04/folktek-impossible-box-preliminaria.html"> Folktek Impossible Box preliminaria</a> (Matrixsynth)</li> <li><a href="http://mutable-instruments.net/node/11713">MIDIpal kit, now with pre-programmed chips</a> (Mutable Instruments)</li> <li><a href="http://www.youtube.com/watch?v=EC402wIhqvc&amp;feature=player_embedded"> Zira Demonstration</a> (VacolocoSynth)</li> </ul> <h3>Photography</h3> <ul> <li><a href="http://www.diyphotography.net/sometimes-its-easier-to-flag-your-camera"> Sometimes It's Just Easier To Flag Your Camera</a> (DIY Photography)</li> <li><a href="http://www.diyphotography.net/vintage-color-cross-processing-in-lightroom-4"> Vintage Color Cross Processing in Lightroom 4</a> (Getting the Instagram look using an SLR) (DIY Photography) (DIY Photography)</li> </ul> <h3>General Maker</h3> <ul> <li><a href="http://hackaday.com/2012/04/21/an-easy-to-build-cat-feeder-driven-by-a-diy-linear-actuator/"> An easy to build cat feeder driven by a DIY linear actuator</a> (Hack a Day)</li> <li><a href="http://www.makermasters.com/diy-cnc-project-dust-deputy-cyclone-separator-cart"> Dust Deputy Cyclone Shop Vacuum Cart CNC</a> (Maker Masters)</li> </ul> <h3>Retro Computing and Commodore!</h3> <ul> <li><a href="http://www.mos6502.com/friday-commodore/happy-35th-birthday-commodore-pet/"> Happy 35th birthday, Commodore PET!</a> (MOS6502)</li> <li><a href="http://www.starryexpanse.com/2012/04/12/camera_matching/">Camera Matching</a> (The Starry Expanse - Rebuilding Riven)</li> <li><a href="http://this8bitlife.com/this-8-bit-life/2012/4/3/this-doctor-who-rpg-makes-me-wish-it-were-real.html"> This Doctor Who RPG Makes Me Wish it Were Real.</a> (this 8-bit life)</li> <li><a href="http://www.rgcd.co.uk/2012/04/soulless-preview-c64.html">Soulless (Preview) (C64)</a> (RGCD)</li> <li><a href="http://www.rgcd.co.uk/2012/04/c64-16kb-cartridge-game-development.html"> C64 16KB Cartridge Game Development Competition!</a> (RGCD)</li> <li><a href="http://www.jeffsgames.com/2012/04/20/site-31-of-lon-mcdonalds-joust-tour/"> Site 31 of Lon McDonald's Joust Tour</a> (Jeff's Classic Arcade)</li> <li><a href="http://www.mos6502.com/friday-commodore/hooking-an-ipod-to-a-c64/"> Hooking an iPod to a C64</a> (MOS6502)</li> <li><a href="http://www.retrothing.com/2012/04/kickstarter-a-brilliant-34-scale-arcade-machine.html"> Retro Thing: Kickstart A 3/4 Scale Arcade Machine Project!</a> (Retro Thing)</li> <li><a href="http://www.rgcd.co.uk/2012/04/knight-n-grail-c64-2009.html">Knight 'n' Grail (C64)</a> (RGCD)</li> <li><a href="http://www.mos6502.com/commodore-legends/a-small-tribute-to-a-great-man/"> A small tribute to a great man</a> (MOS6502)</li> </ul> <p><a href="http://feedads.g.doubleclick.net/~a/pdrvoaiUbiHwhiynjqSk1q48Xy4/0/da"><img src="http://feedads.g.doubleclick.net/~a/pdrvoaiUbiHwhiynjqSk1q48Xy4/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/pdrvoaiUbiHwhiynjqSk1q48Xy4/1/da"><img src="http://feedads.g.doubleclick.net/~a/pdrvoaiUbiHwhiynjqSk1q48Xy4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=L4_akVZrkTo:MUsB464jvS8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=L4_akVZrkTo:MUsB464jvS8:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=L4_akVZrkTo:MUsB464jvS8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=L4_akVZrkTo:MUsB464jvS8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=L4_akVZrkTo:MUsB464jvS8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=L4_akVZrkTo:MUsB464jvS8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=L4_akVZrkTo:MUsB464jvS8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=L4_akVZrkTo:MUsB464jvS8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=L4_akVZrkTo:MUsB464jvS8:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/L4_akVZrkTo" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/L4_akVZrkTo/maker-geek-roundup-011-for-4-21-2012 Pete Brown 3729 2012-04-22T02:55:58 Wanted!! Great Windows 8 Metro style apps <p>Tuesday, the Windows Store blog <a href="http://blogs.msdn.com/b/windowsstore/archive/2012/04/18/windows-store-expanding-to-new-markets.aspx" target="_blank">announced</a> that in the next significant Windows 8 preview release they will be expanding <br />their global coverage with 33 additional app submission locales for developers.&nbsp; <a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-44-19-metablogapi/4745.AppHereTile_5F00_3BCCE249.png"><img width="185" height="272" title="AppHereTile" align="right" style="margin: 17px 12px 0px 28px; float: right; display: inline; background-image: none;" alt="AppHereTile" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-44-19-metablogapi/2766.AppHereTile_5F00_thumb_5F00_3037250A.png" border="0" /></a></p> <p>As Antoine Leblond alluded to in the post, our store services are ramping up as planned--and of course the plan includes ramping up developer registrations to enable app submissions to the Windows store. Today, you need an invite &ldquo;token&rdquo; to register. This begs the question&nbsp; - <strong>How can YOU get a token?</strong></p> <p>It&rsquo;s easy! If your app is ready and you want to be among those developers who get to submit to the store early, simply attend one of the 100s of free Application Excellence Labs that DPE and Windows are holding around the world.</p> <p>Follow these steps to get invited to an App Excellence lab:</p> <ol> <li>Create a really great Windows 8 Metro style app (or game) immediately.&nbsp; Get it as ready as if you were submitting to the store.</li> <li>If you know your local DPE evangelists (maybe because you attended a <a href="http://www.devcamps.ms/windows" target="_blank">Windows camp</a> training), get in touch with them and ask them to nominate your app for a lab.</li> <li>If you don&rsquo;t know your local evangelist, then email the following information to <a href="mailto:win8aefb@microsoft.com" target="_blank">win8aefb@microsoft.com</a>:<ol> <li>Your name</li> <li>City &amp; country where you are located</li> <li>Brief description for your app (no binary,&nbsp; screenshot is optional, but only send if the screenshot is public, non-confidential stuff )</li> <li>Your pledge that you&rsquo;ve spent at least 8 hours devouring all the great <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465424" target="_blank">UX guidelines</a> we have at the <a href="http://design.windows.com" target="_blank">design section in the Windows Dev Center</a><sup>1</sup>&nbsp;</li> <li>Wait for our response letting you know where the closest app excellence lab will be and how to get in touch with the right evangelist to nominate you.</li> </ol></li> </ol> <p>Hopefully, there will be a lab near you.&nbsp; Right now, we have labs in 40+ countries and we may be adding more.</p> <p>Of course, coming to the lab is not all you have to do.&nbsp; I have to go back to step #1: You need to have a compelling, functional app that follows our <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465424" target="_blank">UX guidelines</a>, our <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh750312.aspx" target="_blank">performance best practices</a>, and our store <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh694083.aspx" target="_top">certification requirements</a><sup>2</sup></p> <p>The lab is a 4-hour engagement with a trained Microsoft Services Engineer.&nbsp; This person will run your app through a series of tests based on a quality checklist to ensure your app is (or will be) in top-notch shape when you submit. You will also get a chance discuss ways to make your app even better and you will get answers to any questions you might have. <br />If your app meets the criteria, then booyah! You get a token to register your developer account and (once you have been verified and all that) you will be able to submit your app to the Windows store. <br />If your app does not meet the criteria, nothing is lost. You will still end up with a much better app<sup>3</sup> and you will be able to submit it when registration opens for all developers.</p> <p>Good luck. We are looking forward to seeing your apps and helping you to make them great!<br />Happy Windows 8 coding!! </p> <p>&nbsp;</p> <div> <p><sup>1</sup> Kidding about the pledge but not kidding about highly recommending you review the guidelines and get your app very polished.<br /><sup>2</sup> Note: The lab is not a replacement for certification process; that still happens when you submit to the store.<br /><sup>3</sup> Really, the lab preparation will be worth it, you will have a survey with questions, useful advice, links to guidelines, etc. The survey is (by far) not the only criteria we will use at the labs, but if you follow the preparation from the survey, you will likely have a great app.</p> </div><div style="clear:both;"></div><img src="http://blogs.msdn.com/aggbug.aspx?PostID=10295653" width="1" height="1"> http://blogs.msdn.com/b/jaimer/archive/2012/04/19/wanted-great-windows-8-metro-style-apps.aspx Jaime Rodriguez [MS] 3728 2012-04-20T07:46:00 Using a Style to Simulate TextTrimming on TextBox Synopsis:&#160; The WPF/Silverlight TextBox control lacks the TextTrimming property. Use a control template to add TextTrimming to TextBox. Want more Silverlight tips and tricks? Watch my Silverlight 5 Essential Training course We&#8217;ve all encountered the textbox that is too narrow to hold the text contents.&#160; Here&#8217;s an example from Visual Studio 2010 Figure 01: Visual [...]<!-- Easy AdSense V2.51 --> <!-- Post[count: 2] --> <div class="ezAdsense adsense adsense-leadout" style="float:left;margin:12px; border:#00FFFF solid 1px" onmouseover="this.style.border='#FF0000 solid 1px'" onmouseout="this.style.border='#00FFFF solid 1px'"><script type="text/javascript"><!-- google_ad_client = "pub-7194001785119580"; /* blog.wpfwonderland 300x250, created 6/16/09 */ google_ad_slot = "2567713628"; google_ad_width = 300; google_ad_height = 250; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div> http://blog.wpfwonderland.com/2012/04/19/using-a-style-to-simulate-texttrimming-on-textbox/ Walt Ritscher 3727 2012-04-20T01:06:59 Can this be true? MSDN subscribers ignoring $4K of free Azure services &#160; This statistic, seemed unbelievable. Only one out of ten MSDN subscribers is using their free Azure benefits. According to Microsoft, MSDN subscribers get a boatload of free services each year (~$3700.00 USD)&#160; I&#8217;m not talking about the free trial download.&#160; This is something different. If you have an MSDN subscription you get a lot [...] http://blog.wpfwonderland.com/2012/04/19/can-this-be-true-msdn-subscribers-ignoring-4k-of-free-azure-services/ Walt Ritscher 3726 2012-04-19T22:20:52 Memory Profiling - Launching, Graphs and Markers <p>It is said that “A point of view is worth 80 IQ points”;<i> </i>the meaning perhaps being that if we can look at things in different ways then we might understand them better. The Memory Profiler that ships with the <a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=27570">Windows Phone SDK 7.1</a> provides, in its own way, multiple views into the memory usage of your application, and in an <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/02/01/memory-profiling-for-application-performance.aspx">earlier post</a> we had seen how specific views helped us understand one particular issue with the application better. But even before we got to the specific views, there was a graph and a couple of rows of markers, remember? Let us discuss them briefly.</p> <h1>Launching the Memory Profiler</h1> <p>How do you even know that you need to run your application scenario through the Memory Profiler, especially since there might not be any obvious visual cue? The answer lies in an Execution Profiler warning message. The expectation is that you would run your application scenario through the Execution Profiler for evaluating visual and code performance, and if it suspects any memory related issues it will raise a warning message suggesting running the scenario through the Memory Profiler!</p> <p>Users of the Execution Profiler will find the interaction model of the Memory Profiler familiar. It launches from the same page, with the difference being that you select the <b>Memory (managed object allocations and texture usage)</b> option. The <b>Advanced Settings </b>option can be ignored for the purpose of this discussion. The following is the launch page for the Memory Profiler:</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/8507.image_5F00_3BE8B0AB.png"><img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3124.image_5F00_thumb_5F00_4193A484.png" width="508" height="342" /></a></p> <p>A warning message is issued if the deployment target happens to be the Windows Phone Emulator. The emulator runs on the desktop, and the desktop has a different hardware architecture than the device, with different performance characteristics across the board. The warning therefore alerts you to this lack of performance fidelity. If you are doing Execution profiling beware! The emulator is still a suitable target for doing memory profiling since in that case we are dealing with (memory) allocation profiling. Clicking on the <b>Launch Application </b>link deploys the application to the target and commences the profiling session.</p> <h1>Stop Profiling</h1> <p>There are two ways to gracefully end the profiling session:</p> <ul> <li>By hitting the <b>Stop Profiling</b> link on the Profiler page.</li> <li>By hitting the back button on the target (device or emulator) until you exit the application.</li> </ul> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/4530.image_5F00_1DAACD2A.png"><img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3264.image_5F00_thumb_5F00_0074FF53.png" width="508" height="342" /></a></p> <p>If the connection from Visual Studio to the target is broken for any reason (for example, if the emulator instance is closed, or the device is untethered, or the device shuts down, the connection is broken) the session is aborted.</p> <p>Once the session is gracefully ended, the data gathered during the run is processed and presented graphically for analyses, starting with a <b>Memory Usage</b> graph plotting memory usage over time, and two rows of markers indicating image loads and GC runs as shown below:</p> <p><a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/7701.image_5F00_0AE5ADA6.png"><img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/7282.image_5F00_thumb_5F00_390F8393.png" width="508" height="342" />&#160;</a></p> <h1>Memory usage graph</h1> <p>The memory usage reported is that of private bytes: exclusive bytes allocated by the process being profiled. Some variance in memory usage is normal and not indicative of a problem. However, memory usage that keeps rising bears examination.</p> <h1>Image load markers</h1> <p>A tooltip on the image load marker indicates the encoding format, the ID of the executing thread on which it got loaded, the point in time when it was loaded, and how long it took to load. A spike in memory usage corresponding to an image load marker might indicate a large sized image being loaded (larger than 2000 x 2000 pixels). Windows Phone imposes this limit, and larger images will be sampled at a lower resolution, and will take longer to load. If you must use large images consider displaying only a portion that meets this limit by loading the image into a <a href="http://go.microsoft.com/fwlink/?LinkID=203572">System.Windows.Media.Imaging.WriteableBitmap</a> and using the <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.extensions.loadjpeg(v=vs.92).aspx">LoadJpeg(WriteableBitmap, Stream)</a> extension method as shown below:</p> <p><font size="2" face="Consolas">&#160; int width = (int) this.image1.Width; <br />&#160; int height = (int) this.image1.Height; <br />&#160; Uri uri = new System.Uri(&quot;image.jpg&quot;, UriKind.Relative); <br />&#160; StreamResourceInfo sri = Application.GetResourceStream(uri); <br />&#160; WriteableBitmap wb = new WriteableBitmap(width, height); <br />&#160; System.Windows.Media.Imaging.Extensions.LoadJpeg(wb, sri.Stream); <br />&#160; this.image1.Source = wb;</font></p> <p>The ID of the executing thread can be used to check if the image load computation is happening on the UI thread (the UI thread’s ID can be got from the CPU Usage analysis from the earlier Execution Profiling session). To keep the UI responsive it is essential to keep the UI thread relatively free, and if you notice that the image load computation is indeed happening on the UI thread, consider moving it to a background thread using the <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapcreateoptions(v=vs.95).aspx">BackgroundCreation</a> option. From XAML, this can be done as shown below:</p> <p><font size="2" face="Consolas">&#160; &lt;Image Name=&quot;image1&quot;&gt; <br />&#160;&#160;&#160; &lt;Image.Source&gt; <br />&#160;&#160;&#160;&#160;&#160; &lt;BitmapImage UriSource=&quot;image.jpg&quot; CreateOptions=&quot;BackgroundCreation&quot;/&gt; <br />&#160;&#160;&#160; &lt;/Image.Source&gt; <br />&#160; &lt;/Image&gt;</font></p> <font size="2" face="Consolas"></font> <p>An exercise to try out at this point it to memory-profile an application that loads in a large image; do you see a spike in memory usage corresponding to the image load marker? What was the duration of the image load? On what thread was it getting loaded? Try using the BackgroundCreation option; now what was the thread on which the image got loaded? Did the duration of the image load change? Let us know your experience.</p> <h1>GC markers</h1> <p>Memory is a limited resource on the phone, and although you are programming in a managed environment where the GC takes care of collecting unused memory you still wield control over allocation and referencing, and must monitor them to trim working set. The GC mediates all allocation requests from your code, and operates on a heap that it has partitioned into 2 regions (generations), with allocations happen in the ephemeral “Gen0” region and objects surviving a GC collection possibly promoted to an older “Gen1” region. The GC markers correspond to collections and a tooltip indicates it’s kind (&quot;ephemeral&quot;, &quot;Full&quot;), the point in time when it started, and how long it took to run. An “ephemeral” GC collects only from Gen0 while a “Full” GC collects from both Gen0 and Gen1. Furthermore a “Full” GC can do a “compaction” of the heap if it happens to be significantly fragmented, and even go on to empty the system’s cache of JIT compiled code.</p> <p>A GC is triggered using several heuristics:</p> <ol> <li>When the amount of managed memory allocated since the last GC is deemed significant (1 MB). This is typically an “ephemeral” GC. However it can turn into a “Full” GC under the following circumstances:</li> </ol><ol> <li>When the managed memory held by objects promoted to Gen1 is deemed significant (5 MB).</li> <li>When the application’s total memory usage is deemed significant (i.e. close to the maximum allowed by the OS).</li> <li>When there is significant native-memory pressure - native-memory associated to managed objects (quite common in Silverlight) contributes to total memory usage!</li> </ol> <ul><li>When user code calls <a href="http://msdn.microsoft.com/en-us/library/xe0c2357(v=VS.95).aspx">System.GC.Collect()</a>. This is always a “Full” GC.</li> <li>After any resource allocation failure. This is always a “Full” GC.</li> <li>When the system as whole is running low on free memory. This is always a “Full” GC (that will go all way to emptying the cache of JIT compiled code).</li> </ul><p>The GC’s decision of deeming a threshold “significant” is based on internal heuristics and mentioned here for informational purposes only. The point to note though is that a “Full” GC is much more performance intensive than an “ephemeral” GC.</p> <h1>Insight</h1> <p>Armed with the graph, the markers and your own intuition, you can now get some insight into your scenario’s appetite for memory:</p> <ul> <li>Does memory usage cross the 90 MB <a href="http://msdn.microsoft.com/en-us/library/hh184840(v=VS.92).aspx">technical certification requirement</a> threshold?</li> <li>Is memory usage steadily growing?</li> <li>Do you see a spike in memory usage? Is there a corresponding image load marker? That could be the likely cause (are you using large sized images when a smaller sized image would do?)</li> <li>Are image loads taking long? (Again, this could be due to using large images).</li> <li>Are image loads happening on the UI thread (consider moving that to a background thread).</li> <li>Are there too many GCs? The GC on the Phone is a stop-the-world GC, and therefore the time taken by the GC to run is time taken away from your application! In general strive for little to no GC activity during application startup.</li> <li>The frequency distribution of the GC markers indicates the rate of memory allocation in the scenario, as well as the time ranges when most GC activity happened. If you are writing a game try to concentrate the GC activity during a level change.</li> <li>Are there multiple adjacent “ephemeral” GCs? That indicates short lived and/or temporary objects.</li> <li>Is memory usage not coming down even after one or more “Full” GCs? That is indicative of long lived objects.</li> <li>Are you explicitly causing “Full” GCs by calling <a href="http://msdn.microsoft.com/en-us/library/xe0c2357(v=VS.95).aspx">System.GC.Collect()</a>? That is rarely required, and often a bad idea.</li> </ul> <p>An exercise to try out at this point it to profile an application that has various memory allocations patterns; can you correlate the graph and markers with your own intuition? Let us know your experience.</p> <h1>Summary</h1> <p>The graph and markers provide basic information about your application’s memory usage and when combined with your own intuition of the application scenario, be used to infer several characteristics. Further drill down through the various Views can then be used to understand these characteristics better.</p> <p>Would you like to know more about the Views? Let us know.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=580675" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/19/memory-profiling-launching-graphs-and-markers.aspx Windows Phone Dev Blog 3725 2012-04-19T20:25:04 Crear y manipular un menú contextual en Silverlight <p>Una funcionalidad básica de prácticamente cualquier aplicación de escritorio es el uso del clic derecho para el común despliegue de un menú contextual, una funcionalidad que extraño mucho en las páginas web, afortunadamente en Silverlight podemos aprovechar la posibilidad de usar esta herramienta. Comienza por crear una nueva solución, después, al hacerlo, crea una nueva carpeta llamada Controles, ahí por último crea un nuevo UserControl llamado MenuContextual, al terminar, tu proyecto deberá verse de la siguiente manera. Ahora en ese UserControl llamado Menu Contextual, coloca el siguiente XAML. &#60;usercontrol x:Class=&#34;Menu_Contextual.MenuContextual&#34; xmlns=&#34;http://schemas.microsoft.com/winfx/2006/xaml/presentation&#34; xmlns:x=&#34;http://schemas.microsoft.com/winfx/2006/xaml&#34; Width=&#34;150&#34; Height=&#34;70&#34;&#62; &#60;grid x:Name=&#34;LayoutRoot&#34;&#62; &#60;rectangle Fill=&#34;#FF666666&#34; Margin=&#34;0&#34; Stroke=&#34;Black&#34;/&#62; &#60;textblock x:Name=&#34;txtOpcion1&#34; Height=&#34;20&#34; Margin=&#34;8,8,8,0&#34; TextWrapping=&#34;Wrap&#34; Text=&#34;Opción 1&#34; VerticalAlignment=&#34;Top&#34; Foreground=&#34;White&#34; TextAlignment=&#34;Center&#34; FontSize=&#34;14.667&#34; MouseLeftButtonDown=&#34;txtOpcion_MouseLeftButtonDown&#34;/&#62; &#60;textblock x:Name=&#34;txtOpcion2&#34; Height=&#34;20&#34; Margin=&#34;8,0,8,8&#34; TextWrapping=&#34;Wrap&#34; Text=&#34;Opción 2&#34; VerticalAlignment=&#34;Bottom&#34; Foreground=&#34;White&#34; TextAlignment=&#34;Center&#34; FontSize=&#34;14.667&#34; MouseLeftButtonDown=&#34;txtOpcion_MouseLeftButtonDown&#34;/&#62; &#60;/grid&#62; &#60;/usercontrol&#62;[/sourceode] Nada complejo, simplemente un rectángulo de fondo y dos TextBlock que servirán como opciones. Cada uno de estos últimos tiene un manejador de eventos igual, este evento debes colocarlo en tu code behind. [sourcecode lang=&#039;csharp&#039;]private void txtOpcion_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { this.Visibility = Visibility.Collapsed; } Listo, ese es el menú, ahora solo compila el proyecto para poder hacer reconocible el control que acabas de crear, al haberlo hecho ve a tu MainPage y primero [...]</p> http://blogs.ligasilverlight.com/2012/04/crear-y-manipular-un-men-contextual-en-silverlight/ La Liga Silverlight 3724 2012-04-18T18:20:47 Outlook als GTD Applikation GTD steht für Getting Things Done und beschreibt Methodiken, seinen täglichen Aufgaben produktiv und effizient zu erledigen. Lesenswerte Artikel zum Thema GTD stehen am Ende des Tutorials. Zieldefinition Ziel ist es, im Outlook ein Dashboard bereit zu stellen, welches einem alle Aufgaben, den Posteingang, den Kalender, Notizen und die Kontakte anzeigt. Das Besondere dabei ist, [...] http://feedproxy.google.com/~r/BigglesBlog/~3/2cZWDhVpoWw/outlook-als-gtd-applikation Mario Priebe 3723 2012-04-18T09:05:57 Using Parallel.ForEach To Aggregate Results From JSON Files Stored in Windows Azure Blob Storage <p>I love NoSQL, except when it comes to reporting.&#160; Then I miss those handy SQL aggregation calls. I recently had a situation where I needed to look at a whole bunch of JSON files stored in Windows Azure Blob Storage and aggregate values from within those JSON files. The exact scenario was to get a count of how many people had achieved each achievement as part of the <a href="http://channel9.msdn.com/achievements/visualstudio" target="_blank">Visual Studio Achievements</a> project.</p> <p>Turned out to be an ideal use case for using some of the <a href="http://msdn.microsoft.com/en-us/concurrency/bb964701" target="_blank">parallel programming features in .NET 4.0</a>. Rather than download and process N JSON blobs linearly, I could throw the loop in a <strong>Parallel.ForEach</strong> block and gain speed from the multi-core machine I was using. The code was pretty straightforward, especially once I discovered the <strong>System.Collections.Concurrent</strong> namespace with its handy <strong>ConcurrentDictionary</strong>.</p> <p>And, most significantly, it increased performance by 400 percent!</p> <p>Below is the code in it’s entirety; I’ll walk through it here:</p> <p>For JSON deserialization, I’m using a library provided by the <a href="http://wcf.codeplex.com" target="_blank">WCF team up on CodePlex</a> which is now part of the ASP.NET Web API. It provides some nifty features for turning JSON into <strong>dynamic </strong>objects. </p> <p>The first thing I do is download a JSON file that has all the achievements, which is publically available (line 25).</p> <p>I then put all the achievements in a <strong>ConcurrentDictionary&lt;string, int&gt;</strong> which I’ll use to build my report (line 33).</p> <p>Then, I get the blobs and start my <strong>Parallel.ForEach </strong>loop (line 41). Inside the <strong>Action(TSource)</strong>, I walk the list of the user’s earned achievements, incrementing the count in the <strong>ConcurrentDictionary </strong>of each achievement (line 57).</p> <p>Finally, once I exit the loop, I turn the dictionary into an Excel spreadsheet (line 69) – folks tend to like that format. </p> <p>You’ll notice the remmed out code; that’s the old non-parallelized code if you’d like to compare. </p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:37481f70-5506-49eb-8ba6-098d236a09bc" class="wlWriterEditableSmartContent"><pre style=" width: 656px; height: 1671px;background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: visible;"><div><!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --><span style="color: #008080;"> 1</span> <span style="color: #0000FF;">using</span><span style="color: #000000;"> System; </span><span style="color: #008080;"> 2</span> <span style="color: #000000;"></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.Collections.Concurrent; </span><span style="color: #008080;"> 3</span> <span style="color: #000000;"></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.IO; </span><span style="color: #008080;"> 4</span> <span style="color: #000000;"></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.Json; </span><span style="color: #008080;"> 5</span> <span style="color: #000000;"></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.Net; </span><span style="color: #008080;"> 6</span> <span style="color: #000000;"></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System.Threading.Tasks; </span><span style="color: #008080;"> 7</span> <span style="color: #000000;"></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> Microsoft.WindowsAzure; </span><span style="color: #008080;"> 8</span> <span style="color: #000000;"></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> Microsoft.WindowsAzure.StorageClient; </span><span style="color: #008080;"> 9</span> <span style="color: #000000;"> </span><span style="color: #008080;">10</span> <span style="color: #000000;"></span><span style="color: #0000FF;">namespace</span><span style="color: #000000;"> AchievementsReporting </span><span style="color: #008080;">11</span> <span style="color: #000000;">{ </span><span style="color: #008080;">12</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> Program </span><span style="color: #008080;">13</span> <span style="color: #000000;"> { </span><span style="color: #008080;">14</span> <span style="color: #000000;"> </span><span style="color: #008080;">15</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> Main(</span><span style="color: #0000FF;">string</span><span style="color: #000000;">[] args) </span><span style="color: #008080;">16</span> <span style="color: #000000;"> { </span><span style="color: #008080;">17</span> <span style="color: #000000;"> var cloudBlobClient </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> CloudBlobClient(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Uri(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">https://---.blob.core.windows.net</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, UriKind.Absolute), </span><span style="color: #008080;">18</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> StorageCredentialsAccountAndKey(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">---</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, </span><span style="color: #008080;">19</span> <span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">---</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)); </span><span style="color: #008080;">20</span> <span style="color: #000000;"> var container </span><span style="color: #000000;">=</span><span style="color: #000000;"> cloudBlobClient.GetContainerReference(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">users</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">); </span><span style="color: #008080;">21</span> <span style="color: #000000;"> </span><span style="color: #008080;">22</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> masterJson </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;">.Empty; </span><span style="color: #008080;">23</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">using</span><span style="color: #000000;"> (var webClient </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> WebClient()) </span><span style="color: #008080;">24</span> <span style="color: #000000;"> { </span><span style="color: #008080;">25</span> <span style="color: #000000;"> masterJson </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #008080;">26</span> <span style="color: #000000;"> webClient.DownloadString(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Uri(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">http://channel9.msdn.com/achievements/visualstudio?json=true</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)); </span><span style="color: #008080;">27</span> <span style="color: #000000;"> } </span><span style="color: #008080;">28</span> <span style="color: #000000;"> dynamic masterList </span><span style="color: #000000;">=</span><span style="color: #000000;"> JsonValue.Parse(masterJson); </span><span style="color: #008080;">29</span> <span style="color: #000000;"> var statisticsDictionary </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> ConcurrentDictionary</span><span style="color: #000000;">&lt;</span><span style="color: #0000FF;">string</span><span style="color: #000000;">, </span><span style="color: #0000FF;">int</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">(); </span><span style="color: #008080;">30</span> <span style="color: #000000;"> </span><span style="color: #008000;">//</span><span style="color: #008000;">var statisticsDictionary = new Dictionary&lt;string, int&gt;();</span><span style="color: #008000;"> </span><span style="color: #008080;">31</span> <span style="color: #008000;"></span><span style="color: #000000;"> </span><span style="color: #0000FF;">foreach</span><span style="color: #000000;"> (var achieve </span><span style="color: #0000FF;">in</span><span style="color: #000000;"> masterList.Achievements) </span><span style="color: #008080;">32</span> <span style="color: #000000;"> { </span><span style="color: #008080;">33</span> <span style="color: #000000;"> statisticsDictionary.GetOrAdd(achieve.Name.ToString(), </span><span style="color: #800080;">0</span><span style="color: #000000;">); </span><span style="color: #008080;">34</span> <span style="color: #000000;"> </span><span style="color: #008000;">//</span><span style="color: #008000;">statisticsDictionary.Add(achieve.Name.ToString(), 0);</span><span style="color: #008000;"> </span><span style="color: #008080;">35</span> <span style="color: #008000;"></span><span style="color: #000000;"> } </span><span style="color: #008080;">36</span> <span style="color: #000000;"> BlobRequestOptions options </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> BlobRequestOptions(); </span><span style="color: #008080;">37</span> <span style="color: #000000;"> options.UseFlatBlobListing </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">true</span><span style="color: #000000;">; </span><span style="color: #008080;">38</span> <span style="color: #000000;"> options.BlobListingDetails </span><span style="color: #000000;">=</span><span style="color: #000000;"> BlobListingDetails.Snapshots; </span><span style="color: #008080;">39</span> <span style="color: #000000;"> Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Starting...</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">); </span><span style="color: #008080;">40</span> <span style="color: #000000;"> DateTime start </span><span style="color: #000000;">=</span><span style="color: #000000;"> DateTime.Now; </span><span style="color: #008080;">41</span> <span style="color: #000000;"> Parallel.ForEach(container.ListBlobs(options), blobListItem </span><span style="color: #000000;">=&gt;</span><span style="color: #000000;"> </span><span style="color: #008080;">42</span> <span style="color: #000000;"> </span><span style="color: #008000;">//</span><span style="color: #008000;">foreach (var blobListItem in container.ListBlobs(options))</span><span style="color: #008000;"> </span><span style="color: #008080;">43</span> <span style="color: #008000;"></span><span style="color: #000000;"> { </span><span style="color: #008080;">44</span> <span style="color: #000000;"> CloudBlob blob </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #008080;">45</span> <span style="color: #000000;"> container.GetBlobReference( </span><span style="color: #008080;">46</span> <span style="color: #000000;"> blobListItem.Uri.AbsoluteUri); </span><span style="color: #008080;">47</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> json </span><span style="color: #000000;">=</span><span style="color: #000000;"> blob.DownloadText(); </span><span style="color: #008080;">48</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (</span><span style="color: #000000;">!</span><span style="color: #0000FF;">string</span><span style="color: #000000;">.IsNullOrEmpty(json)) </span><span style="color: #008080;">49</span> <span style="color: #000000;"> { </span><span style="color: #008080;">50</span> <span style="color: #000000;"> dynamic achievementsDynamic </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #008080;">51</span> <span style="color: #000000;"> JsonValue.Parse(json) </span><span style="color: #0000FF;">as</span><span style="color: #000000;"> dynamic; </span><span style="color: #008080;">52</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">foreach</span><span style="color: #000000;"> ( </span><span style="color: #008080;">53</span> <span style="color: #000000;"> var achieve </span><span style="color: #0000FF;">in</span><span style="color: #000000;"> achievementsDynamic.Achievements) </span><span style="color: #008080;">54</span> <span style="color: #000000;"> { </span><span style="color: #008080;">55</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (achieve.DateEarned </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">) </span><span style="color: #008080;">56</span> <span style="color: #000000;"> { </span><span style="color: #008080;">57</span> <span style="color: #000000;"> statisticsDictionary[achieve.Name.ToString()] </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #008080;">58</span> <span style="color: #000000;"> statisticsDictionary[achieve.Name.ToString()] </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800080;">1</span><span style="color: #000000;">; </span><span style="color: #008080;">59</span> <span style="color: #000000;"> } </span><span style="color: #008080;">60</span> <span style="color: #000000;"> } </span><span style="color: #008080;">61</span> <span style="color: #000000;"> } </span><span style="color: #008080;">62</span> <span style="color: #000000;"> } </span><span style="color: #008080;">63</span> <span style="color: #000000;"> ); </span><span style="color: #008080;">64</span> <span style="color: #000000;"> </span><span style="color: #008080;">65</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">using</span><span style="color: #000000;"> (StreamWriter writer </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> StreamWriter(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">report.xls</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)) </span><span style="color: #008080;">66</span> <span style="color: #000000;"> { </span><span style="color: #008080;">67</span> <span style="color: #000000;"> </span><span style="color: #0000FF;">foreach</span><span style="color: #000000;"> (var key </span><span style="color: #0000FF;">in</span><span style="color: #000000;"> statisticsDictionary.Keys) </span><span style="color: #008080;">68</span> <span style="color: #000000;"> { </span><span style="color: #008080;">69</span> <span style="color: #000000;"> writer.WriteLine(key </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">\t</span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> statisticsDictionary[key].ToString()); </span><span style="color: #008080;">70</span> <span style="color: #000000;"> } </span><span style="color: #008080;">71</span> <span style="color: #000000;"> } </span><span style="color: #008080;">72</span> <span style="color: #000000;"> TimeSpan diff </span><span style="color: #000000;">=</span><span style="color: #000000;"> DateTime.Now </span><span style="color: #000000;">-</span><span style="color: #000000;"> start; </span><span style="color: #008080;">73</span> <span style="color: #000000;"> Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">done - took: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;">); </span><span style="color: #008080;">74</span> <span style="color: #000000;"> Console.WriteLine(diff.TotalMinutes); </span><span style="color: #008080;">75</span> <span style="color: #000000;"> } </span><span style="color: #008080;">76</span> <span style="color: #000000;"> } </span><span style="color: #008080;">77</span> <span style="color: #000000;">} </span><span style="color: #008080;">78</span> <span style="color: #000000;"></span></div></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin. http://dunnhq.com --></div> http://rhizohm.net/irhetoric/post/2012/04/17/Using-ParallelForEach-To-Aggregate-Results-From-JSON-Files-Stored-in-Windows-Azure-Blob-Storage.aspx Karsten Januszewski [MS] 3722 2012-04-18T00:24:35 Mobile Web Apps : les bonnes pratiques Encore une bonne session du W3C aujourd'hui au www2012 pour présenter les bonnes pratiques du développement d'applications Web mobiles avec HTML5. D'ailleurs, la variété des formats d'écrans est telle aujourd'hui que ces conseils s'appliquent au développe...<img src="http://blogs.developpeur.org/aggbug.aspx?PostID=52064" width="1" height="1"> http://blogs.developpeur.org/odewit/archive/2012/04/17/MobileWebApps.aspx Olivier Dewit 3721 2012-04-17T21:46:00 Workaround for CA0055 Error with Silverlight Projects in Visual Studio 2010 <p><a href="https://connect.microsoft.com/VisualStudio/feedback/details/713608/ca0055-silverlight5-business-application-project"> This connect bug</a> describes an issue with creating certain types of Silverlight projects in Visual Studio. If you're referencing Silverlight 4 DLLs from a Silverlight 5 project, you may run into this <a href="http://msdn.microsoft.com/en-us/library/y8hcsad3(v=vs.80).aspx"> code analysis/FXCop</a> issue yourself if code analysis is part of your process. The core of the problem is a versioning decision in Silverlight 5 which results in compile-time violation due to loading two different versions of mscorlib in the same project. It manifests as the following error:</p> <ul> <li>Error 2 CA0055 : Could not unify the platforms (mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, mscorlib, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) for 'MyProject.Silverlight\obj\Debug\MyProject.dll'.</li> </ul> <p>More <a href="http://msdn.microsoft.com/en-us/library/ms244741.aspx">information on CA0055 may be found on MSDN</a>.</p> <h3>How to Reproduce the Issue … in theory</h3> <p>In theory, all you need to do to reproduce the issue is reference a SL4-targeted DLL from an SL5 application. However, in practice, there are other factors in play. For example, it may matter which mscorlib version gets loaded first.</p> <p><strong>These steps won't repro the problem on my installation, but I'm putting them out here in case they help you visualize the issue (and also because I had already written them up when I realized they don't repro here -- I don't want all these bits to go to waste).</strong></p> <p>Create a Silverlight 4 class library. Make sure you target Silverlight 4. I named mine SL4ClassLibrary. The actual code is unimportant, but I set it to the following:</p> <pre class="brush: csharp;"> namespace SL4ClassLibrary<br /> {<br /> public class Class1<br /> {<br /> public string Foo = "Bar";<br /> }<br /> }<br /> </pre> <p>Next, add a Silverlight 5 Application project. Make sure it targets Silverlight 5. Here's what my solution looks like:</p> <p><a href="http://10rem.net/media/84844/Windows-Live-Writer_3f6292c37abe_F3BC_image_2.png" target="_blank"><img src="http://10rem.net/media/84849/Windows-Live-Writer_3f6292c37abe_F3BC_image_thumb.png" width="308" height="335" alt="image" border="0" 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"/></a></p> <p>Build the solution.</p> <p>Next, add a File Reference (not a project reference) from the Silverlight 5 client app to the Silverlight 4 DLL.</p> <p><a href="http://10rem.net/media/84854/Windows-Live-Writer_3f6292c37abe_F3BC_image_4.png" target="_blank"><img src="http://10rem.net/media/84859/Windows-Live-Writer_3f6292c37abe_F3BC_image_thumb_1.png" width="500" height="269" alt="image" border="0" 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"/></a></p> <p>If you build it now, everything works fine. The key step here is to add code analysis. Many organizations have code analysis as a required part of their build process, using the compiler command-line arguments. If you don't, you can turn it on via the menu:</p> <p><a href="http://10rem.net/media/84864/Windows-Live-Writer_3f6292c37abe_F3BC_image_8.png" target="_blank"><img src="http://10rem.net/media/84869/Windows-Live-Writer_3f6292c37abe_F3BC_image_thumb_3.png" width="342" height="257" alt="image" border="0" 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"/></a></p> <p>Then check the "Enable Code Analysis on Build" checkbox.</p> <p><a href="http://10rem.net/media/84874/Windows-Live-Writer_3f6292c37abe_F3BC_image_6.png" target="_blank"><img src="http://10rem.net/media/84879/Windows-Live-Writer_3f6292c37abe_F3BC_image_thumb_2.png" width="500" height="339" alt="image" border="0" 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"/></a></p> <p>Now build the solution. In theory, you'll get a CA0055 error, but as I mentioned at the top, that doesn't happen on my install. Most of the people who have reported this issue on the connect bug have mentioned it in the context of the Business Application Template or third party controls.</p> <p><strong>Remember, this is a code analysis compile/build issue, not a runtime issue, so if you get past compiling your application, you're good.</strong></p> <h3>The Workaround</h3> <p>This is already planned to be fixed in Visual Studio 11 RC. However, we do have a manual workaround for this to help you continue working if you're running into this scenario today. This will unblock using FxCop in Visual Studio 2010.</p> <p>A high level walkthrough of how this works from the command line is:</p> <ul> <li>We will tell FxCop which version of the runtime it will be using by pointing it to Silverlight 5's installed mscorlib.dll using the /platform argument</li> <li>Tell FxCop where to find all of the referenced assemblies using /d (short for /directory) arguments: Use as many /d:&lt;folder&gt; arguments as necessary for FxCop to find all of the referenced assemblies.</li> <li>Use either /console to tell FxCop to output the results to the console window, or /out:&lt;file&gt; to tell FxCop to write the results to an .xml file</li> </ul> <p>To run FxCop from the command line for a default Business Application:</p> <ul> <li>Add the %Visual Studio Install Directory%\Team Tools\Static Analysis\FxCop folder to PATH</li> <li>Run "fxcopcmd.exe /file:&lt;SL Business Application binary&gt; /platform:&lt;SL5 Reference Assemblies Directory\mscorlib.dll&gt; /d:&lt;SL4 Reference Assemblies Directory&gt; /d:&lt;SL4 SDK Client Libraries Directory&gt;"</li> </ul> <p>An example of what this looks like on an x64 operating system with all of the default install directories is:</p> <ul> <li>SET PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop</li> <li>fxcopcmd /file:BusinessApplication1.dll /platform:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v5.0\mscorlib.dll" /d:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0" /d:"C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client" /out:results.xml</li> <li>NOTE: If you receive a CA0001 error: "The following error was encountered while reading module 'XXXX.YYYYY' : Assembly reference cannot be resolved…" this means that you need to find where that assembly is installed to on your machine and add an additional /d:&lt;installed directory&gt; argument pointing FxCop to where those assemblies are installed.&nbsp;</li> </ul> <p>My thanks to the Silverlight Team and to Andrew Hall for the information on this workaround.</p> <p>Of course, the easiest and best solution, if you can do it, is to use libraries that specifically target Silverlight 5, and make sure all references from your Silverlight 5 project are to libraries targeting Silverlight 5.&nbsp; We know that's not possible in all cases, including the specific reported business application case, which is why we documented this workaround.</p> <p><a href="http://feedads.g.doubleclick.net/~a/WtwrpLLZaCF59esNJN0BeM4o43g/0/da"><img src="http://feedads.g.doubleclick.net/~a/WtwrpLLZaCF59esNJN0BeM4o43g/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/WtwrpLLZaCF59esNJN0BeM4o43g/1/da"><img src="http://feedads.g.doubleclick.net/~a/WtwrpLLZaCF59esNJN0BeM4o43g/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=bU1_qm2GVuU:7SY3n3pJvYc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=bU1_qm2GVuU:7SY3n3pJvYc:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=bU1_qm2GVuU:7SY3n3pJvYc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=bU1_qm2GVuU:7SY3n3pJvYc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=bU1_qm2GVuU:7SY3n3pJvYc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=bU1_qm2GVuU:7SY3n3pJvYc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=bU1_qm2GVuU:7SY3n3pJvYc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=bU1_qm2GVuU:7SY3n3pJvYc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=bU1_qm2GVuU:7SY3n3pJvYc:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/bU1_qm2GVuU" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/bU1_qm2GVuU/workaround-for-ca0055-error-with-silverlight-projects-in-visual-studio-2010 Pete Brown 3720 2012-04-17T21:07:46 Handle Feature Reductions <p>The third of the four principles I mentioned in <a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/07/optimizing-apps-for-lower-cost-devices.aspx">Optimizing Apps for Lower Cost Devices</a> is Handle Feature Reductions.</p> <p>With the <a href="http://channel9.msdn.com/Shows/Inside+Windows+Phone/Inside-Windows-Phone-33--Windows-Phone-75-Refresh--60-more-Opportunity">Windows Phone 7.5 Refresh</a>, we refactored the OS in several areas to reduce memory usage and free up more RAM for apps. Part of this exercise included assessing the memory usage of features in the developer platform and assessing which, if any, we could afford to live without.</p> <p>To free up the most RAM while also being as minimally disruptive as possible, we disabled generic background agents (<a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler.periodictask(v=VS.92).aspx">PeriodicTasks</a>/<a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler.resourceintensivetask(v=vs.92).aspx">ResourceIntensiveTasks</a>).</p> <p>On today&rsquo;s devices, users can disable background agents for an app manually via the Settings control panel, and the system can disable background agents for an app if the maximum number of supported background agents is exceeded. These conditions are surfaced to the app via an <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler.scheduledactionservice.add(v=VS.92).aspx">InvalidOperationException</a> which the app must handle. On 256MB devices, the app receives the same InvalidOperationException received in the maximum exceeded case above when trying to <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler.scheduledactionservice.add(v=VS.92).aspx">schedule a background agent</a> (since the maximum number of supported background agents is 0). This means if an app is written today to <a href="http://msdn.microsoft.com/en-us/library/hh202944(v=VS.92).aspx">handle the maximum exceeded case</a>, it will continue to work on 256MB devices unchanged. Make sure your apps handle this exception path and degrade gracefully when these features are unavailable. This will benefit your app experience both on today&rsquo;s generation of devices as well as on new lower cost devices. The 256MB emulator introduced in the <a href="http://www.microsoft.com/download/en/details.aspx?id=29233">WPSDK 7.1.1</a> enables you to easily test this code path.</p> <p>If you're using PeriodicTasks today to power your live tiles, there are a few options available to you. The first option is to switch to <a href="http://msdn.microsoft.com/en-us/library/ff402558%28v=VS.92%29.aspx">push notifications</a>. A second option is to create <a href="http://msdn.microsoft.com/en-us/library/ff769548(v=vs.92).aspx">ShellTileSchedules</a> to update your tiles with remote images. A third option is to leverage the <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.shelltile(v=vs.92).aspx">ShellTile API's</a> from your foreground app to update your tiles whenever the app is launched. While technically the tiles wouldn't be live in this last case, the content would be refreshed, which can give the impression of live tiles. If you allow users to flag content, for instance, you could turn your tiles into a permanent reminder space and update them to reflect the most recently flagged content (or toggle through flagged content with every app launch). If these options aren't feasible for you, then you can still always take advantage of <a href="http://msdn.microsoft.com/en-us/library/hh202948(v=VS.92).aspx">secondary tiles</a> to provide convenient access to deeper experiences in your apps.</p> <p>In addition to PeriodicTasks and ResourceIntensiveTasks being disabled, the lower cost 7x27a chipset itself has reduced media playback capabilities that may impact playback of some of your content. Attempting to playback unsupported content on the device will result in either (1) a "Sorry, we can't play this file on your phone" error, if played via the <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.tasks.mediaplayerlauncher(v=VS.92).aspx">MediaPlayerLauncher</a>, (2) a <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.mediafailed(v=vs.95).aspx">MediaFailed</a> event if played via <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement(v=VS.95).aspx">MediaElement</a>, or (3) suboptimal video playback in some cases. While most apps in our testing during the <a href="http://channel9.msdn.com/Shows/Inside+Windows+Phone/Inside-Windows-Phone-33--Windows-Phone-75-Refresh--60-more-Opportunity">Windows Phone 7.5 Refresh</a> were not impacted by these reduced capabilities, you may be impacted if you do exceed them. Be sure to <a href="http://msdn.microsoft.com/en-us/library/ff462087(v=VS.92).aspx">understand the new baseline</a> and encode your content to work well across all Windows Phone devices. To conditionally offer higher quality vs. lower quality content depending on the device, leverage the <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.info.mediacapabilities.ismultiresolutionvideosupported(v=vs.92).aspx#Y0">MediaCapabilities.IsMultiResolutionVideoSupported</a> flag. This flag will be false on devices with reduced media capabilities, so be sure to fall back to the <a href="http://msdn.microsoft.com/en-us/library/ff462087(v=VS.92).aspx">baseline specs</a> in this case.</p> <p>While feature reductions are never ideal, these reductions bring with them an opportunity to reach a large new audience with your apps. Be sure to account for these reductions when targeting lower cost devices to provide the best possible experience to your users.</p><div style="clear:both;"></div><img src="http://windowsteamblog.com/aggbug.aspx?PostID=580503" width="1" height="1"> http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/17/handle-feature-reductions.aspx Windows Phone Dev Blog 3719 2012-04-17T18:28:00 Free Microsoft Azure Trial for your application According to major vendors like Amazon and Microsoft, the cloud is our future. No matter what type of application, it could benefit from cloud storage, cloud DB or cloud services. I believe there is a lot of truth in these ideals. But no technology is perfect for every scenario. That&#8217;s why its cool that you [...] http://blog.wpfwonderland.com/2012/04/16/free-microsoft-azure-trial-for-you-application/ Walt Ritscher 3718 2012-04-17T00:02:00 XAML Snippets and Visual Studio Visual Studio has a long history of supporting Code Snippets on the Toolbox.&#160; You can drag a code chunk to the toolbox, and instantly have a reusable code resource.&#160; So easy. I&#8217;ve found that some XAML developers are not aware that this technique works with XAML blocks.&#160; It does.&#160; Select your XAML in the text [...] http://blog.wpfwonderland.com/2012/04/16/xaml-snippets-and-visual-studio/ Walt Ritscher 3717 2012-04-16T22:25:58 www2012 : atelier HTML5 A la conférence www2012 cet après-midi, Michel Buffa, enseignant à l'université de Nice, a animé avec des étudiants un atelier sur HTML5. Là encore, ce fut très intéressant. Au-delà des caractéristiques de base, l'accent était mis sur des fonctionnalités ...<img src="http://blogs.developpeur.org/aggbug.aspx?PostID=52059" width="1" height="1"> http://blogs.developpeur.org/odewit/archive/2012/04/16/html5.aspx Olivier Dewit 3716 2012-04-16T21:51:00 Where to get .NET Gadgeteer and Netduino GO compatible 10 pin IDC sockets, and how to solder them <p>When creating modules for the <a href="http://www.netmf.com/gadgeteer/">.NET Gadgeteer</a> or <a href="http://netduino.com/">Netduino GO</a>, one of the harder parts to source is the 10 pin IDC socket. This is the tiny 1.27mm pin pitch socket you see on the boards.</p> <p><a href="http://10rem.net/media/84703/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_4.png" target="_blank"><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://10rem.net/media/84708/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_1.png" width="650" height="133" /></a></p> <p>Manufacturers will get those by the reel in most cases, directly from China. There are several places the average hobbyist can get them from:</p> <ul> <li><a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?lang=en&amp;site=us&amp;vendor=0&amp;WT.z_cid=ref_findchips0311_dkc_buynow&amp;mpart=20021521-00010T1LF" target="_blank">Digikey Part 609-4054-ND</a>. Quantities as low as 1.</li> <li><a href="http://www.samtec.com/ProductInformation/TechnicalSpecifications/Overview.aspx?series=SHF" target="_blank">Samtec Part SHF-105-01-L-D-SM</a> (you need to use their <a href="http://www.samtec.com/ProductInformation/TechnicalSpecifications/Build_Part.aspx?series=SHF" target="_blank">part builder tool</a> to specify this number). You can usually get them to ship you a 10pc sample order as well.</li> <li><a href="http://www.mouser.com/search/ProductDetail.aspx?qs=oJs1R%252bxK6kTNcJ8wnslDRg%3d%3d" target="_blank">Through-hole version</a> if you'd rather use it than the SMD version (large quantities only)</li> <li><a href="http://wiki.tinyclr.com/index.php?title=Community_Offers#Gadgeteer_Sockets_and_Cables" target="_blank">Community-provided parts</a> (including sockets and cables). Valentin ordered by the reel and is selling them cheap.</li> <li>GHI Electronics is <a href="http://www.ghielectronics.com/catalog/product/288" target="_blank">selling them individually</a>.</li> <li>GHI is also selling them <a href="http://www.ghielectronics.com/catalog/product/368" target="_blank">by the reel of 800</a>.</li> </ul> <p>All of these sockets are black. The Netduino blue sockets were a custom run by them, and so are not available to us mere mortals :)</p> <p>Sockets may come in tape, tube, or loose. In a section of cut tape, it looks like this (purchased from community member Valentin):</p> <p><a href="http://10rem.net/media/84713/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_24.png" target="_blank"><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://10rem.net/media/84718/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_11.png" width="650" height="213" /></a></p> <p>Samtec tends to ship in tubes, and most sellers selling individual sockets will ship them in bags or loose. It looks like Digikey ships in tubes as well. It takes a fair bit of effort to unzip these and sell them individually, so expect to pay quite a bit more for small quantities.</p> <h3>A comparison of socket implementations</h3> <p>Although they are completely compatible for our purposes, there are some physical differences between the Samtec sockets and the other widely available sockets. The Samtec parts are more expensive, but for hand-soldering, they're friendlier. Why? Because they have a slight undercut or bottom bevel which makes it easier to get a soldering iron in to heat the pad and pin.</p> <p>In the pictures below, the generic part is on the left, the Samtec part on the right.</p> <p><a href="http://10rem.net/media/84723/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_8.png" target="_blank"><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://10rem.net/media/84728/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_3.png" width="283" height="175" /></a><a href="http://10rem.net/media/84733/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_10.png" target="_blank"><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://10rem.net/media/84738/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_4.png" width="350" height="175" /></a></p> <p><a href="http://10rem.net/media/84743/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_14.png" target="_blank"><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="Look! A lens flare! I could edit the next Star Trek now" border="0" alt="Look! A lens flare! I could edit the next Star Trek now" src="http://10rem.net/media/84748/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_6.png" width="650" height="216" /></a></p> <p>You can clearly see the undercut on the Samtec part on the right. You can also see that the sides of the part extend down further than the body, enabling it to sit on the plastic and not just on the pin headers. This second feature is nice, but probably overkill for most modules. IOW, it's quality, but I'm not sure it's worth the price premium. The extra bump/key on the outside is helpful for positioning during assembly, but doesn't serve any mechanical purpose on an assembled Gadgeteer or Netduino GO board. All you need is the notch. Note that every commercial module and main board I've bought all use the more generic chinese parts.</p> <p>The undercut is helpful, though. Just look at how much more of the pin it exposes to your iron.</p> <p>So, if you are new to soldering, I recommend using the more expensive Samtec part. If you have a reasonable amount of soldering experience and/or can make the pad a little longer than the stock footprint (see next section), you can get the inexpensive sockets.</p> <h3>Techniques for designing and soldering the connector</h3> <p>For your own modules, I recommend making the size of the pads a bit longer than the specifications. This will take up a tiny bit more room on the board, but make it easier for you to get your iron. Below are the two profiles: default on left, my current one on the right. Note that I intend to adjust the hand-solder one a bit to make the pads longer so they come into the center a bit better. As they are right now, you can't get a <a href="http://en.wikipedia.org/wiki/Fillet_(mechanics)">fillet</a> on the heel of the pins. That's hard to do anyway, but I want as strong a connection as possible.</p> <p><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://10rem.net/media/84753/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_33.png" width="342" height="231" /></p> <p>When hand-soldering, first apply flux to all the pads. You may also want to apply flux to the pin bases on the socket -- it certainly won't hurt, especially if the pins look a little dirty/oxidized.</p> <p><a href="http://10rem.net/media/84758/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_16.png" target="_blank"><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://10rem.net/media/84763/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_7.png" width="650" height="334" /></a></p> <h4>Step 1: Tin one pad</h4> <p>I recommend then tinning one pad in the corner with a little solder. You don't want a giant blob here. As long as you get the whole pad tinned, less is better.</p> <p><a href="http://10rem.net/media/84768/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_18.png" target="_blank"><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://10rem.net/media/84773/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_8.png" width="650" height="246" /></a></p> <h4>Step 2: Install the socket</h4> <p>Then, holding the socket in place with your fingers (by the plastic), melt the solder to wet the one pin and hold the socket in place while applying downward pressure to make sure it seats flat. I used to tin all the pads, but I've found it much easier to tin a single pad. <strong>You're not looking to make an electrically sound connection here, just something to hold the socket flat</strong>.</p> <p><strong>If you need to adjust the position of the socket, make sure you completely melt the solder on that pad</strong>. If it's only half-melted, the leverage you have with the socket will rip up the pad. I did this once. Not good!</p> <p>Look at the board edge-on and make sure the connector is seated flat and the pin is touching the pad, not suspended above it on a blob of solder.</p> <p><a href="http://10rem.net/media/84778/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_30.png" target="_blank"><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://10rem.net/media/84783/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_14.png" width="650" height="217" /></a></p> <h4>Step 3: Secure the socket at the opposite corner</h4> <p>Then, once the socket is in the correct position and all pins are centered on the pads (or close) and sitting completely flat, solder the opposite pin to firmly hold the connector in place. Don't apply too much pressure, or you'll move the socket and possibly tear up the first pad you soldered. Once you get past this part, all the tricky parts are done.</p> <p><a href="http://10rem.net/media/84788/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_28.png" target="_blank"><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://10rem.net/media/84793/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_13.png" width="650" height="181" /></a></p> <h4>Step 4: Solder the remaining pins (including the first one)</h4> <p>Then, solder each pin, including the first one you tinned. The pins are a bit chunky for <a href="http://www.youtube.com/watch?v=5uiroWBkdFY">drag soldering</a>, so you really need to do one pin at a time.</p> <p>I do this by using a relatively fine chisel tip on my iron. I touch the side of the pin along with the pad at the same time and then add enough solder to ensure a strong connection. Make sure you heat both the pad and the pin. You can see here how the larger pads really help with hand-soldering. If you have a larger tip, you will end up heating more than one pin at a time, but it will be more difficult to get the pads. In that case, apply a bit of downward pressure to try and transfer heat between the pin and the pad.</p> <p><a href="http://10rem.net/media/84798/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_26.png" target="_blank"><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://10rem.net/media/84803/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_12.png" width="650" height="238" /></a></p> <p>The sockets are pretty robust, but try not to touch the plastic with the iron. It's normal for flux to smoke a little, but you don't want that extra special kind of smoke that comes from burning plastic.</p> <h4>Step 5: Inspect and Check</h4> <p>I tend to use a little too much solder on these joints. You can use a bit less than what I have here. Getting a nice fillet with these sockets is hard, though. Even the commercial modules and main boards tend to have a bit too much solder here, so I wouldn't worry too much about it as long as the connection is sound and the solder isn't adhering to the plastic.</p> <p><a href="http://10rem.net/media/84808/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_22.png" target="_blank"><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://10rem.net/media/84813/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_10.png" width="650" height="213" /></a></p> <p><a href="http://10rem.net/media/84818/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_20.png" target="_blank"><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://10rem.net/media/84823/Windows-Live-Writer_Whe.NET-Gadgeteer-and-Netduino-GO-compat_C46E_image_thumb_9.png" width="650" height="211" /></a></p> <p>That's it! Visually inspect the board from a number of angles to make sure everything is soldered correctly and that there are no bridges. Using a multimeter, you can check each pin against some other connected part of the board to ensure continuity.</p> <p><a href="http://feedads.g.doubleclick.net/~a/3HPWvloqtX6Hgq-Wm93CZGsZw-0/0/da"><img src="http://feedads.g.doubleclick.net/~a/3HPWvloqtX6Hgq-Wm93CZGsZw-0/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/3HPWvloqtX6Hgq-Wm93CZGsZw-0/1/da"><img src="http://feedads.g.doubleclick.net/~a/3HPWvloqtX6Hgq-Wm93CZGsZw-0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=DfDbgOYucZs:Nn5U2yl13aQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=DfDbgOYucZs:Nn5U2yl13aQ:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=DfDbgOYucZs:Nn5U2yl13aQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/PeteBrown?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=DfDbgOYucZs:Nn5U2yl13aQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=DfDbgOYucZs:Nn5U2yl13aQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=DfDbgOYucZs:Nn5U2yl13aQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=DfDbgOYucZs:Nn5U2yl13aQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/PeteBrown?a=DfDbgOYucZs:Nn5U2yl13aQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/PeteBrown?i=DfDbgOYucZs:Nn5U2yl13aQ:gIN9vFwOqvQ" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/PeteBrown/~4/DfDbgOYucZs" height="1" width="1"/> http://feedproxy.google.com/~r/PeteBrown/~3/DfDbgOYucZs/where-to-get-net-gadgeteer-and-netduino-go-compatible-10-pin-idc-sockets-and-how-to-solder-them Pete Brown 3715 2012-04-16T21:58:12 Coding Signing Internal Applications and a Gotcha This blog post explains one way to code sign your internal applications along with their installers. Code signing your applications and installers provide a UAC friendly user experience during installation, uninstall, and when your legacy applications may need to run with administrative privileges (more about admin privileges below). UAC Friendly Installation Experience The below image [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=karlshifflett.wordpress.com&#038;blog=1204518&#038;post=1783&#038;subd=karlshifflett&#038;ref=&#038;feed=1" width="1" height="1" /> http://karlshifflett.wordpress.com/2012/04/16/coding-signing-internal-applications-and-a-gotcha/ Karl Shifflett [MS] 3714 2012-04-16T21:25:42 www2012 : tour d'horizon de CSS3 www2012, la conférence internationale du Web, se tient cette année à Lyon . Et le 1er tutoriel W3C, animé par Bert Bos et Eva Kasal, était une réussite (malgré quelques problèmes de forme). Les caractéristiques de CSS3 y ont été présentées de façon dé...<img src="http://blogs.developpeur.org/aggbug.aspx?PostID=52058" width="1" height="1"> http://blogs.developpeur.org/odewit/archive/2012/04/16/css3.aspx Olivier Dewit 3713 2012-04-16T19:36:00 Win 8 Page Navigation http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/XG3wBuwwElg/ Jesse Liberty [MS] 3712 2012-04-16T19:27:21 ¡¡¡Normalízate!!! ¿Porqué respiramos? Respirar es algo normal que hacemos sin pensar. Parpadeamos sin darnos cuenta. Pues lo mismo debería pasar cuando vas a crear una tabla en una base de datos. ¿Cual es el primer campo que se añade a toda tabla? &#8230; <a href="http://speakingin.net/2012/04/16/normalizate/">Continue reading <span class="meta-nav">&#8594;</span></a> http://speakingin.net/2012/04/16/normalizate/?utm_source=rss&utm_medium=rss&utm_campaign=normalizate Juan María Laó Ramos 3711 2012-04-16T01:00:31