<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-27571866</atom:id><lastBuildDate>Fri, 30 Aug 2024 10:33:34 +0000</lastBuildDate><category>Programming</category><category>Software</category><category>Web</category><category>Hardware</category><category>Microsoft</category><category>Google</category><category>Silverlight</category><category>Embedded</category><category>.net</category><category>Apple</category><category>Firefox</category><category>IE7</category><category>Windows CE 6.0</category><category>eBox2300</category><category>link</category><category>/.</category><category>Adobe</category><category>C#</category><category>Holiday</category><category>IPhone</category><category>XAML</category><category>Yahoo</category><category>free</category><category>how it was meant to be..</category><category>wii</category><title>Coder`s Daily News</title><description>ASP.net C# VB.net and other programming languages...new software and other tech-related articles...with the good and the bad...</description><link>http://code-news.blogspot.com/</link><managingEditor>noreply@blogger.com (Vlad)</managingEditor><generator>Blogger</generator><openSearch:totalResults>138</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-5654911159028645616</guid><pubDate>Thu, 06 Dec 2007 06:53:00 +0000</pubDate><atom:updated>2008-12-10T00:12:44.108+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Google</category><category domain="http://www.blogger.com/atom/ns#">Software</category><category domain="http://www.blogger.com/atom/ns#">web</category><title>GTalk + AIM = a kind of love</title><description>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK0m0KJqi73ex2j5TEO7ZQ2j1I9gOOvwbaFFNCyX39XSsPna_oHQjMhUE9sblZqFA0RY9MsZ60ZTYz-6YVv0_DRsrl9KqR4h7-S6nag2IwjW9sWhMuMVybuxcawDD-yhRRN1cH8Q/s1600-h/AddAIM.bmp&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK0m0KJqi73ex2j5TEO7ZQ2j1I9gOOvwbaFFNCyX39XSsPna_oHQjMhUE9sblZqFA0RY9MsZ60ZTYz-6YVv0_DRsrl9KqR4h7-S6nag2IwjW9sWhMuMVybuxcawDD-yhRRN1cH8Q/s320/AddAIM.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5140752282757646754&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;  A new feature for Google Talk popped out today. You can now chat withAIM friends..What? From GTalk? So now you can talk with AIMfriends from Google`s browser interface which is quite good too...butthere are already a lot of other &lt;a href=&quot;http://www.aim.com/aimexpress.adp&quot;&gt;web interfaces for AIM&lt;/a&gt; Google? ...why use this one? When will the same features be integrated in the Google Talk program? And another big question...why did Google choose AIM?</description><link>http://code-news.blogspot.com/2007/12/gtalk-aim-kind-of-love.html</link><author>noreply@blogger.com (Vlad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK0m0KJqi73ex2j5TEO7ZQ2j1I9gOOvwbaFFNCyX39XSsPna_oHQjMhUE9sblZqFA0RY9MsZ60ZTYz-6YVv0_DRsrl9KqR4h7-S6nag2IwjW9sWhMuMVybuxcawDD-yhRRN1cH8Q/s72-c/AddAIM.bmp" height="72" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-8667208999985296844</guid><pubDate>Tue, 20 Nov 2007 09:37:00 +0000</pubDate><atom:updated>2007-11-20T11:41:11.775+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">Microsoft</category><category domain="http://www.blogger.com/atom/ns#">Programming</category><category domain="http://www.blogger.com/atom/ns#">Software</category><title>.Net 3.5 Training kit</title><description>Microsoft just launched the &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&amp;amp;displaylang=en&quot;&gt;.net 3.5 framework&lt;/a&gt; and announced the launch of Visual Studio 2008 RTM that is available to developers that are subscribed to MSDN. In order to help developers they have also shipped out a &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?FamilyID=8bdaa836-0bba-4393-94db-6c3c4a0c98a1&amp;amp;DisplayLang=en&quot;&gt;training kit&lt;/a&gt; that contains materials that should get most developers up to speed on .net 3.5 .&lt;br /&gt;Have fun!</description><link>http://code-news.blogspot.com/2007/11/net-35-training-kit.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-8837776391719120002</guid><pubDate>Sat, 17 Nov 2007 08:02:00 +0000</pubDate><atom:updated>2007-11-17T10:03:47.850+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">web</category><title>Are you an IT consultant?</title><description>Have fun watching this :)&lt;br /&gt;&lt;br /&gt;&lt;embed class=&#39;player&#39; id=&#39;id001&#39; name=&#39;id001&#39; width=&#39;400&#39; height=&#39;333&#39; src=&#39;http://www.theitroom.com/video/Webisode_1.flv&#39; type=&#39;application/x-shockwave-flash&#39;&gt;&lt;/embed&gt;</description><link>http://code-news.blogspot.com/2007/11/are-you-it-consultant.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-1823993246710915985</guid><pubDate>Sun, 14 Oct 2007 14:47:00 +0000</pubDate><atom:updated>2007-10-14T18:06:29.862+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.net</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Microsoft</category><category domain="http://www.blogger.com/atom/ns#">Programming</category><category domain="http://www.blogger.com/atom/ns#">Software</category><title>Serializable dictionary in C#</title><description>Did you ever need to serialize a generic key-value dictionary like the Dictionary&lt;t,t&gt; class? Well in .Net that class is not serializable, in fact the interface IDictionary&lt;t,t&gt; is not serializable for some unknown reason so all the classes that implement the IDictionary&lt;t,t&gt; interface (SortedDictionary , Dictionary ) can not be serialized unless you specify some custom code.&lt;br /&gt;The best code I have found online is written by &lt;a style=&quot;color: rgb(0, 0, 0);&quot; href=&quot;http://weblogs.asp.net/pwelter34/default.aspx&quot;&gt;Paul Welter&lt;/a&gt; and you can see it &lt;a style=&quot;color: rgb(0, 0, 0);&quot; href=&quot;http://weblogs.asp.net/pwelter34/archive/2006/05/03/444961.aspx&quot;&gt;here&lt;/a&gt;. I needed to implement a SortedDictionary so the only change I made to that code is implement the SortedDictionary&lt;t,t&gt; instead of the Dictionary&lt;t,t&gt;.&lt;/t,t&gt;&lt;/t,t&gt;&lt;/t,t&gt;&lt;/t,t&gt;&lt;/t,t&gt;</description><link>http://code-news.blogspot.com/2007/10/serializable-dictionary-in-c.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-2668903827858333907</guid><pubDate>Thu, 13 Sep 2007 08:34:00 +0000</pubDate><atom:updated>2008-12-10T00:12:44.314+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Google</category><category domain="http://www.blogger.com/atom/ns#">Microsoft</category><category domain="http://www.blogger.com/atom/ns#">Yahoo</category><title>Yahoo! in ads by Google?</title><description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb21rU9VgMu_to-kvgI5aQ_oQeFW_W_EnSo2jHAcG-VF2UO-RvWuvyGswiRSACs7kQTIpVuCfjuWrhTrwfv0wLVqF2u8lALSPjyrFtdkf6FjcB5umUN9S6hmUOAypWGx0RM9t0LQ/s1600-h/yahooAdsByGoogle.bmp&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb21rU9VgMu_to-kvgI5aQ_oQeFW_W_EnSo2jHAcG-VF2UO-RvWuvyGswiRSACs7kQTIpVuCfjuWrhTrwfv0wLVqF2u8lALSPjyrFtdkf6FjcB5umUN9S6hmUOAypWGx0RM9t0LQ/s320/yahooAdsByGoogle.bmp&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5109604592721998082&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Microsoft is next?&lt;br /&gt;&lt;/div&gt;</description><link>http://code-news.blogspot.com/2007/09/yahoo-in-ads-by-google.html</link><author>noreply@blogger.com (Vlad)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb21rU9VgMu_to-kvgI5aQ_oQeFW_W_EnSo2jHAcG-VF2UO-RvWuvyGswiRSACs7kQTIpVuCfjuWrhTrwfv0wLVqF2u8lALSPjyrFtdkf6FjcB5umUN9S6hmUOAypWGx0RM9t0LQ/s72-c/yahooAdsByGoogle.bmp" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-2649187146592115091</guid><pubDate>Sat, 08 Sep 2007 12:04:00 +0000</pubDate><atom:updated>2007-09-08T15:06:46.445+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">web</category><title>www.audi.com vs audi.com</title><description>So...why the difference? Did the webmaster never think that someone might waht to see &lt;a href=&quot;http://audi.com&quot;&gt;audi.com&lt;/a&gt; and not &lt;a href=&quot;http://www.audi.com&quot;&gt;www.adudi.com&lt;/a&gt;</description><link>http://code-news.blogspot.com/2007/09/wwwaudicom-vs-audicom.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-4222834018432706265</guid><pubDate>Fri, 24 Aug 2007 17:29:00 +0000</pubDate><atom:updated>2007-08-24T20:32:20.409+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Google</category><category domain="http://www.blogger.com/atom/ns#">web</category><title>The sky is not the limit</title><description>Google added a new feature to their Google Earth project. Now you can explore the sky using the old tool that used to explore &quot;only&quot; the Earth and the Moon.&lt;br /&gt;Happy Exploring!&lt;br /&gt;&lt;object width=&quot;425&quot; height=&quot;350&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/eMhGpzyFdhE&quot;&gt;&lt;/param&gt;&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/eMhGpzyFdhE&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; width=&quot;425&quot; height=&quot;350&quot;&gt;&lt;/embed&gt;&lt;/object&gt;</description><link>http://code-news.blogspot.com/2007/08/sky-is-not-limmit.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-3249761436760126557</guid><pubDate>Sat, 28 Jul 2007 06:26:00 +0000</pubDate><atom:updated>2007-07-28T09:29:11.538+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Microsoft</category><category domain="http://www.blogger.com/atom/ns#">Software</category><title>VS 2008 Beta 2 is out!</title><description>I`ve been using the beta for a while and it behaved very well(a big improvement over the VS2005 beta 1 which was not polished at all). The &lt;a href=&quot;http://weblogs.asp.net/scottgu/archive/2007/07/26/vs-2008-and-net-3-5-beta-2-released.aspx&quot;&gt;beta 2&lt;/a&gt; also has a Go Live! license that you can use. Can`t wait for the final edition :).</description><link>http://code-news.blogspot.com/2007/07/vs-2008-beta-2-is-out.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-4563533683739918320</guid><pubDate>Mon, 23 Jul 2007 18:34:00 +0000</pubDate><atom:updated>2007-07-23T21:50:49.754+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">how it was meant to be..</category><title>What if?</title><description>What if you were in the year 1995 a year when the internet was just about to start the big bang...what if you had to plan it all again...what would you keep...what would you do to keep the internet an entertaining yet full of information place? Would you still build MIRC and stay on the chat all night long? Would you still think that instant messaging in the future? Would you still but a copy of Windows 95? Would you still encourage the creation of Google(and if so would you let it change the way the web works forever). Would you still put Google`s adsense on your web page just to get that 5C/click?&lt;br /&gt;Or would you just keep it clean...the old fashion way..with a few tables here and there but with no real disrespect to the user...with real information on a page and not with lots and lots of ads about the searched topic...&lt;br /&gt;In real life we have the garbage man to take the garbage to the garbage container...in the virtual world there has never been someone to do some cleaning...&lt;br /&gt;What if?</description><link>http://code-news.blogspot.com/2007/07/what-if.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-8110115731927670089</guid><pubDate>Thu, 19 Jul 2007 13:36:00 +0000</pubDate><atom:updated>2007-07-19T16:37:20.223+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><title>Designer -&gt; Developer -&gt; User ?</title><description>&lt;object width=&quot;400&quot; height=&quot;330&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.zdnet.com.au/video/embed/22173533&quot;&gt;&lt;/param&gt;&lt;/param&gt;&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.zdnet.com.au/video/embed/22173533&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot; width=&quot;400&quot; height=&quot;330&quot;&gt;&lt;/embed&gt;&lt;/object&gt;</description><link>http://code-news.blogspot.com/2007/07/designer-developer-user.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-3105387727751715339</guid><pubDate>Tue, 17 Jul 2007 08:51:00 +0000</pubDate><atom:updated>2007-07-17T11:53:48.326+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Firefox</category><category domain="http://www.blogger.com/atom/ns#">IE7</category><category domain="http://www.blogger.com/atom/ns#">Programming</category><category domain="http://www.blogger.com/atom/ns#">web</category><title>3D rendering using javascript, dom and CSS</title><description>UselessPickles.com offers a &lt;a href=&quot;http://www.uselesspickles.com/triangles/demo.html&quot;&gt;nice example&lt;/a&gt; of building 3D models in using javascript and dom which is kind of cool. Also has a nice way of creating triangles using just plain html.</description><link>http://code-news.blogspot.com/2007/07/3d-rendering-using-javascript-dom-and.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-4479585752120265536</guid><pubDate>Tue, 17 Jul 2007 07:43:00 +0000</pubDate><atom:updated>2007-07-17T12:05:03.568+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><title>When LINQ meets the UI</title><description>Scott Guthrie has a nice set of tutorials on his page and the &lt;a href=&quot;http://weblogs.asp.net/scottgu/archive/2007/07/16/linq-to-sql-part-5-binding-ui-using-the-asp-linqdatasource-control.aspx&quot;&gt;latest tutorial&lt;/a&gt; explains the link between linq and the User Interface. Nice reading.</description><link>http://code-news.blogspot.com/2007/07/when-linq-meets-ui.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-3406026498638873593</guid><pubDate>Sun, 15 Jul 2007 18:35:00 +0000</pubDate><atom:updated>2007-07-15T21:52:46.932+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><category domain="http://www.blogger.com/atom/ns#">web</category><title>Learn Silverlight and Blend</title><description>&lt;a href=&quot;http://www.nibblestutorials.net/&quot;&gt;Nibbles&lt;/a&gt; offers some quick tutorials for Silverlight and Blend. Quite a nice reading.</description><link>http://code-news.blogspot.com/2007/07/learn-silverlight-and-blend.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-7458437034614410098</guid><pubDate>Sun, 15 Jul 2007 17:37:00 +0000</pubDate><atom:updated>2007-07-15T20:40:41.030+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Software</category><title>Always on top</title><description>I&#39;ve always wanted to be able to control which window is on top but as most programs do not have this option getting one window to stay on top can prove difficult. I&#39;ve now found a nice tool that lets you do just that. It just adds a pushpin to the window and it will stay on top. Quite a nice &lt;a href=&quot;http://users.forthnet.gr/pat/efotinis/programs/deskpins.html&quot;&gt;tool&lt;/a&gt;.</description><link>http://code-news.blogspot.com/2007/07/always-on-top.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-5096776050749511685</guid><pubDate>Sat, 14 Jul 2007 17:53:00 +0000</pubDate><atom:updated>2007-07-14T20:55:05.906+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">web</category><title>Saving the planet comedy central style</title><description>&lt;embed FlashVars=&#39;config=http://www.comedycentral.com/motherload/xml/data_synd.jhtml?vid=89819%26myspace=false&#39; src=&#39;http://www.comedycentral.com/motherload/syndicated_player/index.jhtml&#39; quality=&#39;high&#39; bgcolor=&#39;#006699&#39; width=&#39;340&#39; height=&#39;325&#39; name=&#39;comedy_player&#39; align=&#39;middle&#39; allowScriptAccess=&#39;always&#39; allownetworking=&#39;external&#39; type=&#39;application/x-shockwave-flash&#39; pluginspage=&#39;http://www.macromedia.com/go/getflashplayer&#39;&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;Let`s grab some icecream...So true...</description><link>http://code-news.blogspot.com/2007/07/saving-planet-comedy-central-style.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-8128018550954162445</guid><pubDate>Sat, 14 Jul 2007 15:30:00 +0000</pubDate><atom:updated>2007-07-14T18:31:18.053+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">web</category><title>Read a book</title><description>Probably the most educative hip-hop out there..&lt;br /&gt;&lt;object width=&quot;425&quot; height=&quot;350&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/MdzchIMi43Y&quot;&gt;&lt;/param&gt;&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/MdzchIMi43Y&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; width=&quot;425&quot; height=&quot;350&quot;&gt;&lt;/embed&gt;&lt;/object&gt;</description><link>http://code-news.blogspot.com/2007/07/read-book.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-4993801715753410290</guid><pubDate>Sat, 14 Jul 2007 14:51:00 +0000</pubDate><atom:updated>2007-07-14T17:53:08.447+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Google</category><category domain="http://www.blogger.com/atom/ns#">Microsoft</category><category domain="http://www.blogger.com/atom/ns#">Software</category><category domain="http://www.blogger.com/atom/ns#">web</category><title>Microsoft vs Google</title><description>Did you know that you could download the Google toolbar for IE from a Microsoft &lt;a href=&quot;http://windowsmarketplace.com/category.aspx?bcatid=846&amp;amp;tabid=1&quot;&gt;site&lt;/a&gt;?</description><link>http://code-news.blogspot.com/2007/07/microsoft-vs-google.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-4427530323370171591</guid><pubDate>Sun, 01 Jul 2007 09:56:00 +0000</pubDate><atom:updated>2007-07-01T13:02:50.778+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><category domain="http://www.blogger.com/atom/ns#">Software</category><category domain="http://www.blogger.com/atom/ns#">web</category><title>Silverlight vs Flash</title><description>&lt;a href=&quot;http://notdoppler.com/orboxb.php&quot;&gt;This game&lt;/a&gt; got famous today on &lt;a href=&quot;http://www.digg.com&quot;&gt;digg.com&lt;/a&gt;. It`s a really nice flash game which requires logic. Loved the game but..when I read a MS blog I got to another &lt;a href=&quot;http://www.silverlight.net&quot;&gt;Silverlight&lt;/a&gt; &lt;a href=&quot;http://www.ltbennett.com/&quot;&gt;sample game&lt;/a&gt;. If you take a closer look at things you can see that the concept of the game is the same. I wonder how much time was needed to create the game in Flash and Silverlight. Until we find that out..enjoy the games.</description><link>http://code-news.blogspot.com/2007/07/silverlight-vs-flash.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-3068992034690759520</guid><pubDate>Sun, 01 Jul 2007 09:12:00 +0000</pubDate><atom:updated>2007-07-01T12:23:40.110+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><title>Silverlight samples and code</title><description>If you enjoyed Richard Zadorozny`s &lt;a href=&quot;http://joestegman.members.winisp.net/Jelly/Bar.htm&quot;&gt;bar chart&lt;/a&gt;, &lt;a href=&quot;http://joestegman.members.winisp.net/Jelly/Pie.htm&quot;&gt;pie char &lt;/a&gt;or the &lt;a href=&quot;http://joestegman.members.winisp.net/Jelly/Graph.htm&quot;&gt;graph&lt;/a&gt; you can now &lt;a href=&quot;http://joestegman.members.winisp.net/Jelly/Jelly.zip&quot;&gt;download&lt;/a&gt; the source code. This is the best way you can learn Silverlight programming.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://blogs.msdn.com/jstegman/default.aspx&quot;&gt;(source)&lt;/a&gt;</description><link>http://code-news.blogspot.com/2007/07/silverlight-samples-and-code.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-6669630847787028237</guid><pubDate>Sun, 01 Jul 2007 08:46:00 +0000</pubDate><atom:updated>2007-07-01T11:52:23.246+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Embedded</category><category domain="http://www.blogger.com/atom/ns#">Software</category><title>Old News</title><description>I know it`s old but it`s a &lt;a href=&quot;http://www.operamini.com/beta/features/&quot;&gt;new&lt;/a&gt; &lt;a href=&quot;http://www.operamini.com/&quot;&gt;Opera Mini&lt;/a&gt;. And I love it. It even features a mouse which is really great when navigating(you can see a video of all the features &lt;a href=&quot;http://www.operamini.com/beta/demo/&quot;&gt;here&lt;/a&gt;). I have had some problems with it when the EDGE connection was bit slow(actually the app crashed) but overall it`s superb.&lt;br /&gt;I also enjoyed the &lt;a href=&quot;http://www.operamini.com/beta/video/&quot;&gt;Opera Mini vs IPhone video&lt;/a&gt;</description><link>http://code-news.blogspot.com/2007/07/old-news.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-972598534408319614</guid><pubDate>Fri, 29 Jun 2007 08:50:00 +0000</pubDate><atom:updated>2007-06-29T11:52:11.812+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><title>ReSharper</title><description>If you are using &lt;a href=&quot;http://www.jetbrains.com/resharper/&quot;&gt;ReSharper&lt;/a&gt; then you have to check out &lt;a href=&quot;http://excastle.com/blog/archive/2007/01/31/13141.aspx&quot;&gt;this&lt;/a&gt; tutorials. Will be worth your time.</description><link>http://code-news.blogspot.com/2007/06/resharper.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-7732966432764432758</guid><pubDate>Sun, 24 Jun 2007 08:46:00 +0000</pubDate><atom:updated>2007-06-24T11:50:58.583+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><title>Are you a good programmer?</title><description>&lt;blockquote style=&quot;font-style: italic;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;A language that doesn&#39;t affect the way you think about programming, is not worth knowing&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.norvig.com/21-days.html&quot;&gt;Learning programming in 10 years&lt;/a&gt;..just so so true..</description><link>http://code-news.blogspot.com/2007/06/are-you-good-programmer.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-7039731433881899380</guid><pubDate>Mon, 11 Jun 2007 06:03:00 +0000</pubDate><atom:updated>2007-06-11T09:06:03.899+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">web</category><title>Draw it like you mean it...</title><description>It`s been a long time since the first FREDO&amp;PID`JIN comic and now it`s your turn to draw...and win stuff..&lt;a href=&quot;http://www.pidjin.net/2007/06/03/2years&quot;&gt;Click here&lt;/a&gt; for more details</description><link>http://code-news.blogspot.com/2007/06/draw-it-like-you-mean-it.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-5231888640855899088</guid><pubDate>Sun, 10 Jun 2007 15:58:00 +0000</pubDate><atom:updated>2007-06-10T22:54:57.913+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><title>The Start Function(Part 4)</title><description>This is part of a series of articles that shows the creation of a Silverlight game. Please read &lt;a href=&quot;http://code-news.blogspot.com/2007/06/creating-simple-game-in-silverlight-11.html&quot;&gt;part 1&lt;/a&gt;,&lt;a href=&quot;http://code-news.blogspot.com/2007/06/xaml-code-for-silverlight-game.html&quot;&gt;part 2&lt;/a&gt; or &lt;a href=&quot;http://code-news.blogspot.com/2007/06/starting-c-codepart-3.html&quot;&gt;part 3&lt;/a&gt; if you haven`t done so yet.&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; Start(&lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; size,&lt;span class=&quot;kwrd&quot;&gt;double&lt;/span&gt; blockProbability,Point StartPosition,Point EndPosition)&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The Start function receives 4 parameters:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;size&lt;/strong&gt; - the width and the height of the board.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;blockProbability&lt;/strong&gt; - the probability of a blocking block to appear. Should increase as the level gets higher.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;StartPosition&lt;/strong&gt; - the point of origin for the red rectangle&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;EndPosition&lt;/strong&gt; - the point where the red rectangle needs to get(yellow rectangle)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;        {&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;            startPoint = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Point(StartPosition.X * multiplier, StartPosition.Y * multiplier);&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;            endPoint = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Point(EndPosition.X * multiplier, EndPosition.Y * multiplier);&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;We use the multiplier in order to transform from logical points to real pixels and we initialize the startPoint and the endPoint variable.&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;            NextLevel.Visibility = Visibility.Collapsed;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   7:  &lt;/span&gt;            NextLevelText.Visibility = Visibility.Collapsed;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   8:  &lt;/span&gt;            Congratulations.Visibility = Visibility.Collapsed;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Here we just hide the Congratulations text(should only be visible when the user wins), the next level button which should also be visible only when the user wins and the text on top of the next level button.&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   9:  &lt;/span&gt;            steps = 0;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  10:  &lt;/span&gt;            isMoving = &lt;span class=&quot;kwrd&quot;&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  11:  &lt;/span&gt;            map = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt;[size, size];&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  12:  &lt;/span&gt;            &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; unpassable = 0;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Here we initialize some counters. First the number of steps that the user has made must be 0. Then we say that the red rectangle is not moving. Also we initialize the map that will be composed of 0s and 1s and we initialize the variable that counts the number of unpassable regions.&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  13:  &lt;/span&gt;            &lt;span class=&quot;kwrd&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; i = 0; i &amp;lt; size; i++)&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  14:  &lt;/span&gt;            {&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  15:  &lt;/span&gt;                &lt;span class=&quot;kwrd&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; j = 0; j &amp;lt; size; j++)&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  16:  &lt;/span&gt;                {&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  17:  &lt;/span&gt;                    map[i, j] = (r.NextDouble() &amp;lt; blockProbability) ? 1 : 0;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  18:  &lt;/span&gt;                    map[(&lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt;)StartPosition.X, (&lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt;)StartPosition.Y] = 0;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  19:  &lt;/span&gt;                    map[(&lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt;)EndPosition.X, (&lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt;)EndPosition.Y] = 0;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  20:  &lt;/span&gt;                    &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (map[i, j] == 0)&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  21:  &lt;/span&gt;                    {&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  22:  &lt;/span&gt;                        AddNewRectangle(&lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Point(i , j ), Colors.Green);&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  23:  &lt;/span&gt;                    }&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  24:  &lt;/span&gt;                    &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (map[i, j] == 1)&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  25:  &lt;/span&gt;                    {&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  26:  &lt;/span&gt;                        unpassable++;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  27:  &lt;/span&gt;                        AddNewRectangle(&lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Point(i , j ), Colors.Black);&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  28:  &lt;/span&gt;                    }&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  29:  &lt;/span&gt;                }&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  30:  &lt;/span&gt;            }&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Setups the map that will be displayed. The map will be completely random and will display in avarage (blockProbability*100)% unpassable blocks. We also increase the counter of unpassable blocks each time we generate one. The function AddNewRectangle just adds a new rectangle to the board and will be discussed later.&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  31:  &lt;/span&gt;            Unpassable.Text = unpassable.ToString();&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  32:  &lt;/span&gt;            CurrentLevel.Text = level.ToString();&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;We display the number of unpassable blocks and the current level on the screen.&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  33:  &lt;/span&gt;            &lt;span class=&quot;rem&quot;&gt;//setup visibility and location of helper objects&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  34:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  35:  &lt;/span&gt;            Congratulations.SetValue(Canvas.TopProperty, size * multiplier + 5);&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  36:  &lt;/span&gt;            NumberOfSteps.SetValue(Canvas.TopProperty, size * multiplier + 5);&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  37:  &lt;/span&gt;            NumberOfStepsText.SetValue(Canvas.TopProperty, size * multiplier + 5);&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  38:  &lt;/span&gt;            NextLevelText.SetValue(Canvas.LeftProperty, size * multiplier + 40);&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  39:  &lt;/span&gt;            NextLevel.SetValue(Canvas.LeftProperty, size * multiplier + 5);&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  40:  &lt;/span&gt;            Restart.SetValue(Canvas.LeftProperty, size * multiplier + 5);&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  41:  &lt;/span&gt;            RestartText.SetValue(Canvas.LeftProperty, size * multiplier + 30);&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  42:  &lt;/span&gt;            UnpassableText.SetValue(Canvas.LeftProperty, size * multiplier + 19);&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  43:  &lt;/span&gt;            Unpassable.SetValue(Canvas.LeftProperty, size * multiplier + 107);&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  44:  &lt;/span&gt;            CurrentLevelText.SetValue(Canvas.LeftProperty, size * multiplier + 5);&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  45:  &lt;/span&gt;            CurrentLevel.SetValue(Canvas.LeftProperty, size * multiplier + 107);&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  46:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  47:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Because the board of the game si expandable we need to keep the buttons out of the board region so we move them dinamically.&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  48:  &lt;/span&gt;            &lt;span class=&quot;rem&quot;&gt;//setup the main objects:the start and the end(start is the moving object)&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  49:  &lt;/span&gt;            end = CreateSpecialRectangle(EndPosition, Colors.Yellow);&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  50:  &lt;/span&gt;            start = CreateSpecialRectangle(StartPosition, Colors.Red);&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  51:  &lt;/span&gt;            &lt;span class=&quot;rem&quot;&gt;//setup event handler for the end object&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  52:  &lt;/span&gt;            end.MouseLeftButtonDown += &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; MouseEventHandler(r_MouseLeftButtonDown);&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  53:  &lt;/span&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;We then create the special rectangles that will move and will represent the end point. We also wire up an event that fires when the yellow rectangle is pressed.&lt;br /&gt;&lt;br /&gt;The rest of the functions will be discussed in part 5.&lt;/br&gt;&lt;br /&gt;To download the entire project just &lt;a href=&quot;http://students.info.uaic.ro/~vlad.balan/PathFinder.rar&quot;&gt;click here&lt;/a&gt;</description><link>http://code-news.blogspot.com/2007/06/start-functionpart-4.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-27571866.post-6176660570374053507</guid><pubDate>Sun, 10 Jun 2007 15:14:00 +0000</pubDate><atom:updated>2007-06-10T22:52:56.718+03:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Programming</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><title>Starting the C# code(Part 3)</title><description>So with the static part in place we need to get the game moving...But first we need some class variables that will help within the project:&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//the level&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; level = 1;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//the number of times that the user moved the rectangle in this round&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; steps = 0;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//the probability that the block generated is a blocking block(cannot pass through it)&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;double&lt;/span&gt; blockingProbability = 0.03;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   7:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//the current destination point of the moving rectangle&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   8:  &lt;/span&gt;        Point toMove;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   9:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//the start point of the round&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  10:  &lt;/span&gt;        Point startPoint;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  11:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//the end point of the round&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  12:  &lt;/span&gt;        Point endPoint;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  13:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//true if the user rectangle is moving&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  14:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;bool&lt;/span&gt; isMoving;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  15:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//keeps the map&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  16:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt;[,] map;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  17:  &lt;/span&gt;        Random r;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  18:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//the height of the generated rectangles&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  19:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; height = 19;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  20:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//the width of the generated rectangles&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  21:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;const&lt;/span&gt;  &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; width = 19;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  22:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//the multiplier by which the matrix location is multiplied (Ex if multiplier is &lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  23:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//20 than the location (1,2) on the map will actually be shown at&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  24:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//(20,40)&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  25:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; multiplier = 20;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  26:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//the start rectangle&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  27:  &lt;/span&gt;        Rectangle start;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  28:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//the end rectangle&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  29:  &lt;/span&gt;        Rectangle end;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  30:  &lt;/span&gt;        &lt;span class=&quot;rem&quot;&gt;//the board size&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  31:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; boardSize = 10;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This variables are all straight forward and are explained through comments. They will be explained in more detail later on when we get to the functions implemented.&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;Now that we have the variables in place we need something to initialize them. This is where the Page_Loaded function comes into place:&lt;br /&gt;&lt;div class=&quot;csharpcode&quot;&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; Page_Loaded(&lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt; o, EventArgs e)&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;        {&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;            &lt;span class=&quot;rem&quot;&gt;// Required to initialize variables&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;            InitializeComponent();&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;            r = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Random();&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;            timer.Completed += &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; EventHandler(timer_Completed);&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   7:  &lt;/span&gt;            Restart.MouseLeftButtonDown += &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; MouseEventHandler(Restart_MouseLeftButtonDown);&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   8:  &lt;/span&gt;            RestartText.MouseLeftButtonDown += &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; MouseEventHandler(Restart_MouseLeftButtonDown);&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   9:  &lt;/span&gt;            NextLevel.MouseLeftButtonDown += &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; MouseEventHandler(NextLevel_MouseLeftButtonDown);&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  10:  &lt;/span&gt;            NextLevelText.MouseLeftButtonDown += &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; MouseEventHandler(NextLevel_MouseLeftButtonDown);&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  11:  &lt;/span&gt;            &lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  12:  &lt;/span&gt;            Start(boardSize, blockingProbability, &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Point(r.Next() % boardSize, r.Next() % boardSize), &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Point(r.Next() % boardSize, r.Next() % boardSize));&lt;/pre&gt;&lt;br /&gt;&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  13:  &lt;/span&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This function initializes the random number generator on line 6. Then we use some event-handlers. The objects timer,Restart,RestartText,NextLevel,NextLevelText are all decalred in the XAML file. &lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;The timer is a storyboard variable that is used in order to create the animation for the movement of the red rectangle.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The restart object is a rectangle used as a button.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The RestartText object is just the text that is displayed on the Restart rectangle.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The NextLevel object is a rectangle used as a button.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The NextLevelText object is the text displayed on the NextLevel rectangle. &lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;All the events that were wired here will be explained later on.&lt;br/&gt;&lt;br /&gt;Next we call the Start function that is the core function of the game as it creates a new level and initializes the gameplay. It will be explained in the next post.&lt;br /&gt;&lt;br /&gt;(See &lt;a href=&quot;http://code-news.blogspot.com/2007/06/start-functionpart-4.html&quot;&gt;part 4&lt;/a&gt;)</description><link>http://code-news.blogspot.com/2007/06/starting-c-codepart-3.html</link><author>noreply@blogger.com (Vlad)</author><thr:total>0</thr:total></item></channel></rss>