<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Den by default</title>
	<atom:link href="http://dennisdel.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://dennisdel.com</link>
	<description>A blog by Dennis Delimarsky</description>
	<lastBuildDate>Thu, 09 Sep 2010 04:56:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Visual C++ CLR Class Library &#8211; where is the DLL?</title>
		<link>http://dennisdel.com/?p=318</link>
		<comments>http://dennisdel.com/?p=318#comments</comments>
		<pubDate>Thu, 09 Sep 2010 04:56:40 +0000</pubDate>
		<dc:creator>Dennis Delimarsky</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[dll]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://dennisdel.com/?p=318</guid>
		<description><![CDATA[I was recently working on a project that interacts with different applications and I created a solution that involved two projects – one is based on C# and the other one is built with C++ (managed). In fact, the second project is nothing more but a class library. When I built the C++ project, I [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently working on a project that interacts with different applications and I created a solution that involved two projects – one is based on C# and the other one is built with C++ (managed). In fact, the second project is nothing more but a class library.</p>
<p>When I built the C++ project, I noticed the fact that the actual DLL was not present in the project folder. I tried compiling under different configurations, but still – no result. The closest file (name-wise) contained <strong>dll.intermediate.manifest</strong> in its filename, but obviously that’s not what I was looking for.</p>
<p> <a href="http://dennisdel.com/wp-content/uploads/2010/09/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dennisdel.com/wp-content/uploads/2010/09/image_thumb.png" width="410" height="233" /></a>
<p>I looked through the project properties and noticed this:</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/09/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dennisdel.com/wp-content/uploads/2010/09/image_thumb1.png" width="410" height="268" /></a> </p>
<p>By default, the DLL was automatically deployed to the solution folder (obviously, in the current configuration subfolder), instead of the project folder. This might not be the best way to keep track of projects since when it is placed inside the solution folder, you are not able to keep track of the actual project that created it, especially if there are more than two projects in the solution.</p>
<p>To fix this, modify the <strong>Output Directory</strong> property to this:</p>
<p><strong>$(SolutionDir)$(ProjectName)\$(Configuration)\</strong></p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/09/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dennisdel.com/wp-content/uploads/2010/09/image_thumb2.png" width="410" height="42" /></a> </p>
<p>You will see the DLL being built in the correct folder now:</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/09/image3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dennisdel.com/wp-content/uploads/2010/09/image_thumb3.png" width="410" height="255" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dennisdel.com/?feed=rss2&amp;p=318</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why there is no single mobile development platform</title>
		<link>http://dennisdel.com/?p=306</link>
		<comments>http://dennisdel.com/?p=306#comments</comments>
		<pubDate>Fri, 03 Sep 2010 09:39:36 +0000</pubDate>
		<dc:creator>Dennis Delimarsky</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cross-platform]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[opinion]]></category>

		<guid isPermaLink="false">http://dennisdel.com/?p=306</guid>
		<description><![CDATA[So there is the question asked by some developers that target mobile platforms – how come there is no single toolkit that will let develop for every single platform out there. After all, wouldn’t it be easier to build the application once and let it run on every single mobile device that is available on [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dennisdel.com/wp-content/uploads/2010/09/article.jpg"><img style="margin: 0px 10px 10px 0px; display: inline; border-width: 0px;" title="article" src="http://dennisdel.com/wp-content/uploads/2010/09/article_thumb.jpg" border="0" alt="article" width="240" height="240" align="left" /></a>So there is the question asked by some developers that target mobile platforms – how come there is no single toolkit that will let develop for every single platform out there. After all, wouldn’t it be easier to build the application once and let it run on every single mobile device that is available on the consumer market? Although this concept sounds pretty easy (well, Java did it on desktop computers)  – &#8220;code once, use everywhere&#8221; is not always possible in the mobile world. I tried to outline some of the reasons for this below.</p>
<p>First, let’s look at the whole idea of cross-platform mobile development. There should be a single framework, accepted by hardware and software manufacturers on the market, that will control how code is executed and passed to the existing hardware. This means that there should be a strong third-parties &#8211; framework developer &#8211; hardware manufacturer relationship, the key player here being the framework developer.</p>
<p>For the mobile world in its current state, it is basically impossible to create a single set of tools to develop for every single platform out there. Mainly because of the strong software-to-hardware ties, but also because of the multitude of mobile devices and their hardware configurations. Of course there was J2ME – an attempt to make a mobile version of Java that would run everywhere. It required the devices to conform to a specific standard in order to support it, and as long as those minimum requirements are met, J2ME applications can successfully run on the device.</p>
<p>What J2ME architects failed to consider is the fact that hardware advances (and today it does this pretty fast), and not a lot of hardware manufacturers will stay behind simply because a software platform doesn’t support new functionality. J2ME didn’t advance fast enough &#8211; and developers wanted to use new hardware capabilities. What hardware makers do in this case? That’s right – look for another software platform. Eventually, today we can see that J2ME is dropped by the majority of smartphone developers due to its outdated nature and lack of capabilities to support new functionality.</p>
<p>That being said, here is a specific scenario. Let’s suppose there is a single framework that is supposed to let developers create applications that will run on a multitude of devices. If a hardware manufacturer decides to change its CPU architecture, for example, they will automatically fail to meet the requirements for that single framework. Even if the framework allowed compilation in a common intermediary language (like .NET and Java), there should be a conversion layer present, that will later on perform the intermediate-to-native compilation. So there are two choices:</p>
<ul>
<li>Keep the hardware outdated in order to support the software platform or wait till a conversion layer is released</li>
<li>Update the hardware and develop a new software platform of their own</li>
</ul>
<p>Chances are, the second option will be chosen. If that’s the case, the hardware manufacturer might hire a software development team and set the task to keep up with their hardware updates by developing updated software for new devices. Fair enough. Here we see the software-manufacturer dependability.</p>
<p>Now there also could be a different situation. The same agreement can be turned the other way around. A team of software developers (a very large team supported by a large corporation) creates a conceptual platform and signs an agreement with hardware manufacturers to create hardware for their software. As they update the software and add new functionality, the hardware manufacturers will release new versions of various hardware elements, like the CPU, higher resolution displays and/or better cameras. This is the case of Apple (iPhone), Google (Android) and Microsoft (Windows Phone 7).</p>
<p>In each of these cases, updates can be easily implemented without much hassle, since there is a one-to-one relationship between the software and hardware manufacturers and generally no software company depends on another one. From the other side, a single framework ties each hardware manufacturer to that set of libraries, each developer &#8211; to a limited set of libraries that expose a limited set of APIs. If a new device is released, providing better performance and new capabilities (for example, GPS support and an accelerometer) but the framework doesn’t support its full functionality, the device manufacturer has to wait until proper updates are released. In the meantime, someone else might release a similar device and then there will be loss of income and market share. If someone would decide to develop a better mobile OS for that matter, they would also have to wait till the framework is updated to support the new system. This is time-consuming and not a lot of major developers will allow themselves to wait.</p>
<p>Yet another important aspect is personal interest. Each company wants to be in control of the platform they are promoting. In case of a single development standard, if a company decides that there should be a change implemented in the framework, all other parties would have to agree with this. If someone doesn’t, that might create additional problems. If a company decides to switch their hardware and promote updated devices, they would have to force others to do the same and update the software layer. Once again, not everyone will be happy about that – what if someone doesn’t like the new device/software concept? While separated, though, each company is able to develop their own tools, with their own functionality set and capabilities.</p>
<p>A separation of platforms and development tools is beneficial – every participant is able to easily implement small changes and release the new product. At the same time, it makes it easier for developers to keep up with these changes, since they are focused on a specific platform only and don’t have to worry about general compatibility. I’m not saying that cross-platform development on mobile devices is impossible. It is, but it is nowhere near efficient.</p>
]]></content:encoded>
			<wfw:commentRss>http://dennisdel.com/?feed=rss2&amp;p=306</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tip: Implement .NET interfaces in Visual Studio</title>
		<link>http://dennisdel.com/?p=300</link>
		<comments>http://dennisdel.com/?p=300#comments</comments>
		<pubDate>Thu, 26 Aug 2010 03:08:50 +0000</pubDate>
		<dc:creator>Dennis Delimarsky</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[visual-studio]]></category>

		<guid isPermaLink="false">http://dennisdel.com/?p=300</guid>
		<description><![CDATA[If you develop .NET applications, then you probably had a couple of classes that implemented one or more .NET interfaces – maybe it was IDataObject or IQueryable, or something else. To correctly implement these interfaces, chances are you were using existing MSDN documentation to get an idea of what methods and functions should be implemented. [...]]]></description>
			<content:encoded><![CDATA[<p>If you develop .NET applications, then you probably had a couple of classes that implemented one or more .NET interfaces – maybe it was <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.idataobject.aspx" target="_blank">IDataObject</a> or <a href="http://msdn.microsoft.com/en-us/library/system.linq.iqueryable.aspx" target="_blank">IQueryable</a>, or something else. To correctly implement these interfaces, chances are you were using existing MSDN documentation to get an idea of what methods and functions should be implemented. Then you’d have to write each method (or function) header and then work on its functionality.</p>
<p>However, if you are working on your application in Visual Studio, you can introduce the interface implementation in the class that inherits it a bit quicker. When you define that a class inherits a specific interface, a small blue rectangle will appear at the beginning of the interface name:</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/08/image7.png"><img style="display: inline; border: 0px;" title="image" src="http://dennisdel.com/wp-content/uploads/2010/08/image_thumb7.png" border="0" alt="image" width="278" height="94" /></a></p>
<p>Point the mouse cursor to that rectangle and click on the icon that will appear:</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/08/image8.png"><img style="display: inline; border: 0px;" title="image" src="http://dennisdel.com/wp-content/uploads/2010/08/image_thumb8.png" border="0" alt="image" width="380" height="94" /></a></p>
<p><span style="color: #ff0000;"><strong>UPDATE:</strong></span> As it was <a href="http://dennisdel.com/?p=300&amp;cpage=1#comment-386">pointed by Curtis Rutland</a>, you can actually open the list by pressing <em><strong>Ctrl + (+)</strong></em>.</p>
<p>Select the<strong> Implement interface &lt;Interface name&gt;</strong> option:</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/08/image9.png"><img style="display: inline; border: 0px;" title="image" src="http://dennisdel.com/wp-content/uploads/2010/08/image_thumb9.png" border="0" alt="image" width="380" height="82" /></a></p>
<p>Now the base ‘skeleton’ for the interface will be present inside the class:</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/08/image10.png"><img style="display: inline; border: 0px;" title="image" src="http://dennisdel.com/wp-content/uploads/2010/08/image_thumb10.png" border="0" alt="image" width="380" height="475" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dennisdel.com/?feed=rss2&amp;p=300</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>My thoughts on Windows Phone 7 development</title>
		<link>http://dennisdel.com/?p=291</link>
		<comments>http://dennisdel.com/?p=291#comments</comments>
		<pubDate>Tue, 24 Aug 2010 04:45:38 +0000</pubDate>
		<dc:creator>Dennis Delimarsky</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[windows-phone-7]]></category>

		<guid isPermaLink="false">http://dennisdel.com/?p=291</guid>
		<description><![CDATA[The first question many developers probably ask themselves when thinking about starting developing for Windows Phone 7 is &#8211; “Is it worth it?” It’s one thing when you are already a .NET developer (bonus points if you worked with XNA and Silverlight), but it’s a completely different story when the developer that asks that questions [...]]]></description>
			<content:encoded><![CDATA[<p>The first question many developers probably ask themselves when thinking about starting developing for Windows Phone 7 is &#8211; “Is it worth it?” It’s one thing when you are already a .NET developer (bonus points if you worked with XNA and Silverlight), but it’s a completely different story when the developer that asks that questions comes from a different platform, like the iPhone or Android. Not that it’s hard to make the switch, but still – there is time investment.</p>
<p>It’s really hard to predict how this platform will turn out, though. Therefore, it is really hard to answer the question mentioned above. It <a href="http://arstechnica.com/microsoft/news/2010/08/windows-phone-7-nears-the-finish-line-with-sdk-release-date.ars" target="_blank">was mentioned</a> that the number of SDK downloads reached the mark of 300,000 – but does this really show what the development market for Windows Phone 7 will look like? Will we see at least 300,000 applications or it’s all about playing around with tools and doing something else after all? Same as the question that came before this, it is impossible to answer these at this very moment simply because the platform isn’t established as such yet.</p>
<p>Personally, I worked on developing some Windows Phone 7 applications, mostly for fun – I tried working on a RSS reader (you can see my adventures around that <a href="http://mobile.dzone.com/articles/building-rss-reader-windows" target="_blank">here</a> and <a href="http://mobile.dzone.com/articles/building-rss-reader-windows-0" target="_blank">here</a>), I tried working with <a href="http://mobile.dzone.com/articles/sending-toast-notifications" target="_blank">push notifications</a> and even created a <a href="http://mobile.dzone.com/articles/creating-small-downloader-tool" target="_blank">small downloader tool</a>. Of course, these are some very small projects, but I really liked working with some new tools and try new approaches. One thing that I am really concerned about is the difference between the emulator and the actual device. One of the most important things, in my opinion, when developing applications for a mobile device is having an emulator that will provide hooks to every single base function the device is able to perform, pretty much copying the entire device functionality. At this point, this doesn’t really apply to Windows Phone 7. A big gap in the current build of the emulator (this was probably actively discussed already) is the absence of accelerometer simulation. Of course, I do not expect to be able to tilt the emulator window (resource-wise, this would be pretty crazy), but I was thinking that I should at least be able to override the event parameters for the accelerometer to pass the needed location values. I do think that maybe in the RTM build there will be something for this and I will no longer have to use workarounds (like using the mouse only for X and Y coordinates).</p>
<p>I haven’t touched XNA development for the Windows Phone 7 yet, but I can say that there are a lot of possibilities that can be integrated in a Windows Phone 7 application. Pretty much everything you have access to in Silverlight is present in Silverlight for WP7 projects. Plus, device-specific functionality, like vibration capabilities and push notifications. As I mentioned before, if you have some background developing .NET applications, you are pretty much ready to start working on Windows Phone 7 apps, if you wish to of course. When I started, I encountered some issues (expected – the development tools are still in Beta) and it might take a little while to get used to the deployment and testing process, since it is highly dependent on allocated computing resources (hint: the emulator won’t pick up a XAP for testing if there is not enough free RAM) and is performed inside a hardware emulator.</p>
<p>I do hope that the platform will pick up some momentum, but the scarcity of devices to test apps on really plays its role right now – personally, I’d really like to test some apps on real hardware, but there is no chance to get a device (and yes, I know about some developers ‘renting’ devices – I’m too far a way from one) until it is released in public. By that time – I’ll just have to stick with the emulator. And this defines the extent of development I can do.</p>
<p>As a conclusions, I’d say that trying developing for Windows Phone 7 is a pretty interesting experience from a developer’s perspective, especially if you’ve never worked with mobile development before (just like me), since you will have to work in a limited ‘frame’ – the device the application will run on has limited capabilities and therefore you’ve got to make it use that potential to the max. Let the market potential aside, Windows Phone 7 seems like an interesting domain to work with since right now it’s one of those moments when developers witness the birth of a new platform and they will pretty much decide its growth and market share – we all know that today it’s all about the <a href="http://arstechnica.com/microsoft/news/2010/08/microsofts-windows-phone-7-gamble-developers-developers-developers-developers.ars" target="_blank">developers, developers, developers</a>.</p>
<p><strong>PS:</strong> Just out of curiosity, I am interested in finding out what do you think about getting involved in Windows Phone 7 application development. If you’ve got a minute, you can vote on <a href="http://dotnet.dzone.com/polls/windows-phone-7-development" target="_blank">my poll</a> that asks this question.</p>
]]></content:encoded>
			<wfw:commentRss>http://dennisdel.com/?feed=rss2&amp;p=291</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Phone 7 emulator &#8211; applications can be pinned and removed</title>
		<link>http://dennisdel.com/?p=290</link>
		<comments>http://dennisdel.com/?p=290#comments</comments>
		<pubDate>Fri, 20 Aug 2010 20:31:32 +0000</pubDate>
		<dc:creator>Dennis Delimarsky</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[emulator]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[windows-phone-7]]></category>

		<guid isPermaLink="false">http://dennisdel.com/?p=290</guid>
		<description><![CDATA[Not many of the developers who use the Windows Phone 7 emulator know, that when you deploy an application from Visual Studio 2010, you are able to pin it to the Start page, as well as uninstall the application entirely. When an application is deployed to the emulator, exit it (in case you were running), [...]]]></description>
			<content:encoded><![CDATA[<p>Not many of the developers who use the Windows Phone 7 emulator know, that when you deploy an application from Visual Studio 2010, you are able to pin it to the Start page, as well as uninstall the application entirely.</p>
<p>When an application is deployed to the emulator, exit it (in case you were running), click on the application icon in the list of installed apps and hold the mouse button pressed:</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/08/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dennisdel.com/wp-content/uploads/2010/08/image_thumb2.png" width="287" height="538" /></a> </p>
<p>Pinning the application will result in a tile being present on the Start page for your application (for easier access):</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/08/image3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dennisdel.com/wp-content/uploads/2010/08/image_thumb3.png" width="288" height="538" /></a> </p>
<p>You can later on unpin the application. If you hold the left mouse button pressed on the application icon, there will be a crossed-out pin in the topmost right corner of the icon:</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/08/image4.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dennisdel.com/wp-content/uploads/2010/08/image_thumb4.png" width="287" height="538" /></a> </p>
<p>If you decide to uninstall the application, you will be prompted with a conformation message first: </p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/08/image5.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dennisdel.com/wp-content/uploads/2010/08/image_thumb5.png" width="288" height="539" /></a> </p>
<p>If you uninstall it and later on want to resume the debug session, you will have to restart the emulator because Visual Studio 2010 will encounter a deployment error:</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/08/image6.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dennisdel.com/wp-content/uploads/2010/08/image_thumb6.png" width="419" height="52" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dennisdel.com/?feed=rss2&amp;p=290</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Phone 7 projects &#8211; the libraries are still there</title>
		<link>http://dennisdel.com/?p=278</link>
		<comments>http://dennisdel.com/?p=278#comments</comments>
		<pubDate>Sat, 07 Aug 2010 15:49:32 +0000</pubDate>
		<dc:creator>Dennis Delimarsky</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[windows-phone-7]]></category>

		<guid isPermaLink="false">http://dennisdel.com/?p=278</guid>
		<description><![CDATA[While working on a Windows Phone 7 application (specifically those that are Silverlight-based), you probably mentioned the fact that some library references are missing, when you need to add them. For example, I wanted to use some JSON parsing and RSS feed syndication tools, but by default, there were no System.Json and System.ServiceModel.Syndication libraries listed [...]]]></description>
			<content:encoded><![CDATA[<p>While working on a Windows Phone 7 application (specifically those that are Silverlight-based), you probably mentioned the fact that some library references are missing, when you need to add them.</p>
<p>For example, I wanted to use some JSON parsing and RSS feed syndication tools, but by default, there were no <strong>System.Json</strong> and <strong>System.ServiceModel.Syndication</strong> libraries listed as available references.</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/08/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dennisdel.com/wp-content/uploads/2010/08/image_thumb.png" width="429" height="531" /></a> </p>
<p>So does that mean that you cannot use additional libraries that are available in standard Silverlight applications? Nope. All you have to do, is open the <strong>Browse</strong> tab in this dialog and navigate to one of these path (depending whether you are running on a 64-bit or a 32-bit system):</p>
<blockquote><p><strong>&lt;SystemDrive&gt;:\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client</strong></p>
<p><strong>&lt;SystemDrive&gt;:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client</strong></p>
</blockquote>
<p>Some of the libraries that were missing are now available for you to use right out of that folder.</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/08/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dennisdel.com/wp-content/uploads/2010/08/image_thumb1.png" width="429" height="527" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dennisdel.com/?feed=rss2&amp;p=278</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I Got Code #5: Downloading linked images</title>
		<link>http://dennisdel.com/?p=259</link>
		<comments>http://dennisdel.com/?p=259#comments</comments>
		<pubDate>Sun, 25 Jul 2010 21:43:35 +0000</pubDate>
		<dc:creator>Dennis Delimarsky</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://dennisdel.com/?p=259</guid>
		<description><![CDATA[There was actually a question that got me thinking – how would I implement a program that downloads pictures from a web page, that are pointed by some links? Here is a sample console application I came up with: using System; using System.Collections.Generic; using System.Net; using System.Threading; using System.IO; using System.Text.RegularExpressions; using System.Drawing; namespace ConsoleApplication [...]]]></description>
			<content:encoded><![CDATA[<p>There was actually a <a href="http://www.dreamincode.net/forums/topic/183100-pictures-downloader/" target="_blank">question</a> that got me thinking – how would I implement a program that downloads pictures from a web page, that are pointed by some links?</p>
<p>Here is a sample console application I came up with:</p>
<pre class="brush: csharp;">

using System;
using System.Collections.Generic;
using System.Net;
using System.Threading;
using System.IO;
using System.Text.RegularExpressions;
using System.Drawing;

namespace ConsoleApplication
{
    class Program
    {
        static int totalFiles = 0;
        static int currentFiles = 0;

        static void Main(string[] args)
        {
            GetImages(&quot;&lt;a href=&quot;http://www.textureking.com/index.php/category/all-textures%22);&quot;&gt;http://www.textureking.com/index.php/category/all-textures&quot;);&lt;/a&gt;
        }

        static void GetImages(string url)
        {
            string responseString;
            HttpWebRequest initialRequest = (HttpWebRequest)WebRequest.Create(url);
            using (HttpWebResponse initialResponse = (HttpWebResponse)initialRequest.GetResponse())
            {
                using (StreamReader reader = new StreamReader(initialResponse.GetResponseStream()))
                {
                    responseString = reader.ReadToEnd();
                }
            }

            List&lt;string&gt; imageset = new List&lt;string&gt;();
            Regex regex = new Regex(@&quot;f=&quot;&quot;[^&quot;&quot;]*jpg|bmp|tif|gif|png&quot;,RegexOptions.IgnoreCase);
            foreach (Match m in regex.Matches(responseString))
            {
                if (!imageset.Contains(m.Value))
                    imageset.Add(m.Value);
            }

            for (int i = 0; i &lt; imageset.Count; i++)
                imageset[i] = imageset[i].Remove(0, 3);

            totalFiles = imageset.Count;
            currentFiles = totalFiles;

            Console.WriteLine(totalFiles.ToString() + &quot; images will be downloaded.&quot;);

            foreach (string f in imageset)
            {
                ThreadPool.QueueUserWorkItem(new WaitCallback(DownloadImage), f);
            }

            Console.Read();
        }

        static void DownloadImage(object path)
        {
            currentFiles--;
            Console.WriteLine(&quot;Downloading &quot; + Path.GetFileName(path.ToString()) + &quot;... (&quot; + (totalFiles - currentFiles).ToString() + &quot;/&quot; + totalFiles + &quot;)&quot;);
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(path.ToString());
            using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
            {
                Image image = Image.FromStream(response.GetResponseStream());
                image.Save(@&quot;D:\Temporary\&quot; + Path.GetFileName(path.ToString()));
            }
            Console.WriteLine(Path.GetFileName(path.ToString()) + &quot; downloaded.&quot;);
        }
    }

}
</pre>
<p>The sample URL provided in the method call is used to download several textures linked on the webpage.</p>
<p>I am using regex to actually find the URLs. The case is ignored since I am not sure whether the file extensions are written with in caps or not. Since there is a chance for the same URL to be mentioned twice on the same page, I am making sure that there are no duplicates, so before adding the regex match to the List, I am checking if that already contains an entry for the match.</p>
<p>The final saving path also can be modified, but I decided to leave it hardcoded like this for testing purposes. In case you want to make the path dynamic, you can pass a generic collection or an array as the parameter for the <strong>DownloadImage</strong> method and then explicitly convert it and read the needed values (identified by an index, for example).</p>
<p><strong>NOTE:</strong> I am using <a href="http://msdn.microsoft.com/en-us/library/system.threading.threadpool.aspx" target="_blank">ThreadPool</a> here so all threads are automatically set as background – if the application is closed, the download process will be canceled. To avoid this and wait for all downloads to complete (which is probably not a good idea but still a possibility), the <a href="http://msdn.microsoft.com/en-us/library/system.threading.thread.aspx" target="_blank">Thread</a> class should be used with <a href="http://msdn.microsoft.com/en-us/library/system.threading.thread.isbackground.aspx" target="_blank">IsBackground</a> set to false.</p>
]]></content:encoded>
			<wfw:commentRss>http://dennisdel.com/?feed=rss2&amp;p=259</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Got Code #4: WPF TextBox with rounded corners. What and how?</title>
		<link>http://dennisdel.com/?p=256</link>
		<comments>http://dennisdel.com/?p=256#comments</comments>
		<pubDate>Sun, 25 Jul 2010 16:43:27 +0000</pubDate>
		<dc:creator>Dennis Delimarsky</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[textbox]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://dennisdel.com/?p=256</guid>
		<description><![CDATA[What is the first idea that comes to mind when someone mentions rounded corners and WPF? Probably Border. That is the right thing to think about, but how to apply it to a TextBox control? There are two ways to achieve what you want. Way A: The most obvious thing would be creating a border [...]]]></description>
			<content:encoded><![CDATA[<p>What is the first idea that comes to mind when someone mentions rounded corners and WPF? Probably <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.border.aspx" target="_blank">Border</a>. That is the right thing to think about, but how to apply it to a <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.textbox.aspx" target="_blank">TextBox</a> control?</p>
<p>There are two ways to achieve what you want.</p>
<h4>Way A:</h4>
<p>The most obvious thing would be creating a border around the control itself. Something like this:</p>
<pre class="brush: xml;">

&lt;Border CornerRadius=&quot;5&quot; BorderThickness=&quot;1&quot; BorderBrush=&quot;Black&quot; Margin=&quot;91,192,150,79&quot;&gt;
&lt;TextBox Background=”Transparent” BorderThickness=&quot;0&quot; Height=&quot;35&quot; Name=&quot;txtContents&quot; Width=&quot;254&quot; /&gt;
&lt;/Border&gt;
</pre>
<p>That should do the initial trick – the <strong>TextBox</strong> control has no border around it (the <strong>BorderThickness</strong> property is set to 0) while the <strong>Border</strong> that contains it sets the correct rounding, color and thickness.</p>
<p>The rendered output will look like this:</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/07/image1.png"><img style="display: inline; border: 0px;" title="image" src="http://dennisdel.com/wp-content/uploads/2010/07/image_thumb1.png" border="0" alt="image" width="411" height="282" /></a></p>
<p>Looking good, but the fun part comes around when you decide that this specific <strong>TextBox</strong> shouldn&#8217;t be enabled, so you set the <strong>IsEnabled</strong> property to False. What do you get? This:</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/07/image2.png"><img style="display: inline; border: 0px;" title="image" src="http://dennisdel.com/wp-content/uploads/2010/07/image_thumb2.png" border="0" alt="image" width="411" height="282" /></a></p>
<p>What’s up with the rest of the white space between the border and the writing area? Doesn’t look like we want it to behave like this. And that’s where the second way to create rounded corners saves the day.</p>
<h3>Way B:</h3>
<p>It is a bit more complicated, but it gives a better result. What it does is it overrides the default control template for the <strong>TextBox</strong>. But how do I know how the default template looks like?</p>
<p>Since it is not possible to modify only one part of the template, the whole template should be overridden. To avoid functionality loss, I am going to get the default template and use it with small modifications.</p>
<p>To get the default style (that embeds the control template) for a <strong>TextBox</strong> control I am using the <strong>GetStyle</strong> method:</p>
<pre class="brush: csharp;">

string GetStyle(Type t)
{
FrameworkElement element = (FrameworkElement)Activator.CreateInstance(t);
object styleName = element.GetValue(FrameworkElement.DefaultStyleKeyProperty);

Style style = Application.Current.TryFindResource(styleName) as Style;

StringWriter stringContainer = new StringWriter();
XmlTextWriter xmlWriter = new XmlTextWriter(stringContainer);
xmlWriter.Formatting = Formatting.Indented;

System.Windows.Markup.XamlWriter.Save(style, xmlWriter);

return stringContainer.ToString();
}
</pre>
<p>Since I am using the default control, without any custom styles attached, I can simply create an instance of <strong>TextBox</strong> and use its type as a parameter for the <strong>GetStyle</strong> method:</p>
<pre class="brush: csharp;">

TextBox t = new TextBox();
Debug.Print(GetStyle(t.GetType()));
</pre>
<p>The output should look like this:</p>
<pre class="brush: xml;">

&lt;Style TargetType=&quot;TextBox&quot; xmlns=&quot;&lt;a href=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&quot;&gt;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;&lt;/a&gt; xmlns:x=&quot;&lt;a href=&quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&quot;&gt;http://schemas.microsoft.com/winfx/2006/xaml&quot;&lt;/a&gt; xmlns:s=&quot;clr-namespace:System;assembly=mscorlib&quot; xmlns:mwt=&quot;clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero&quot;&gt;
&lt;Style.BasedOn&gt;
&lt;Style TargetType=&quot;TextBoxBase&quot;&gt;
&lt;Style.Resources&gt;
&lt;ResourceDictionary /&gt;
&lt;/Style.Resources&gt;
&lt;Setter Property=&quot;TextElement.Foreground&quot;&gt;
&lt;Setter.Value&gt;
&lt;DynamicResource ResourceKey=&quot;{x:Static SystemColors.ControlTextBrushKey}&quot; /&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Setter Property=&quot;Panel.Background&quot;&gt;
&lt;Setter.Value&gt;
&lt;DynamicResource ResourceKey=&quot;{x:Static SystemColors.WindowBrushKey}&quot; /&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Setter Property=&quot;Border.BorderBrush&quot;&gt;
&lt;Setter.Value&gt;
&lt;LinearGradientBrush StartPoint=&quot;0,0&quot; EndPoint=&quot;0,20&quot; MappingMode=&quot;Absolute&quot;&gt;
&lt;LinearGradientBrush.GradientStops&gt;
&lt;GradientStop Color=&quot;#FFABADB3&quot; Offset=&quot;0.05&quot; /&gt;
&lt;GradientStop Color=&quot;#FFE2E3EA&quot; Offset=&quot;0.07&quot; /&gt;
&lt;GradientStop Color=&quot;#FFE3E9EF&quot; Offset=&quot;1&quot; /&gt;
&lt;/LinearGradientBrush.GradientStops&gt;
&lt;/LinearGradientBrush&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Setter Property=&quot;Border.BorderThickness&quot;&gt;
&lt;Setter.Value&gt;
&lt;Thickness&gt;1,1,1,1&lt;/Thickness&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Setter Property=&quot;Control.Padding&quot;&gt;
&lt;Setter.Value&gt;
&lt;Thickness&gt;1,1,1,1&lt;/Thickness&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Setter Property=&quot;UIElement.AllowDrop&quot;&gt;
&lt;Setter.Value&gt;
&lt;s:Boolean&gt;True&lt;/s:Boolean&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Setter Property=&quot;FrameworkElement.FocusVisualStyle&quot;&gt;
&lt;Setter.Value&gt;
&lt;x:Null /&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Setter Property=&quot;ScrollViewer.PanningMode&quot;&gt;
&lt;Setter.Value&gt;
&lt;x:Static Member=&quot;PanningMode.VerticalFirst&quot; /&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Setter Property=&quot;Stylus.IsFlicksEnabled&quot;&gt;
&lt;Setter.Value&gt;
&lt;s:Boolean&gt;False&lt;/s:Boolean&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Setter Property=&quot;Control.Template&quot;&gt;
&lt;Setter.Value&gt;
&lt;ControlTemplate TargetType=&quot;TextBoxBase&quot;&gt;
&lt;mwt:ListBoxChrome Background=&quot;{TemplateBinding Panel.Background}&quot; BorderBrush=&quot;{TemplateBinding Border.BorderBrush}&quot; BorderThickness=&quot;{TemplateBinding Border.BorderThickness}&quot; RenderMouseOver=&quot;{TemplateBinding UIElement.IsMouseOver}&quot; RenderFocused=&quot;{TemplateBinding UIElement.IsKeyboardFocusWithin}&quot; Name=&quot;Bd&quot; SnapsToDevicePixels=&quot;True&quot;&gt;
&lt;ScrollViewer Name=&quot;PART_ContentHost&quot; SnapsToDevicePixels=&quot;{TemplateBinding UIElement.SnapsToDevicePixels}&quot; /&gt;
&lt;/mwt:ListBoxChrome&gt;
&lt;ControlTemplate.Triggers&gt;
&lt;Trigger Property=&quot;UIElement.IsEnabled&quot;&gt;
&lt;Setter Property=&quot;Panel.Background&quot; TargetName=&quot;Bd&quot;&gt;
&lt;Setter.Value&gt;
&lt;DynamicResource ResourceKey=&quot;{x:Static SystemColors.ControlBrushKey}&quot; /&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Setter Property=&quot;TextElement.Foreground&quot;&gt;
&lt;Setter.Value&gt;
&lt;DynamicResource ResourceKey=&quot;{x:Static SystemColors.GrayTextBrushKey}&quot; /&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Trigger.Value&gt;
&lt;s:Boolean&gt;False&lt;/s:Boolean&gt;
&lt;/Trigger.Value&gt;
&lt;/Trigger&gt;
&lt;/ControlTemplate.Triggers&gt;
&lt;/ControlTemplate&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;/Style&gt;
&lt;/Style.BasedOn&gt;
&lt;Style.Resources&gt;
&lt;ResourceDictionary /&gt;
&lt;/Style.Resources&gt;
&lt;/Style&gt;
</pre>
<p>That is a lot of XAML markup right there, but all we need is the control template:</p>
<pre class="brush: xml;">

&lt;ControlTemplate TargetType=&quot;TextBoxBase&quot;&gt;
&lt;mwt:ListBoxChrome Background=&quot;{TemplateBinding Panel.Background}&quot; BorderBrush=&quot;{TemplateBinding Border.BorderBrush}&quot; BorderThickness=&quot;{TemplateBinding Border.BorderThickness}&quot; RenderMouseOver=&quot;{TemplateBinding UIElement.IsMouseOver}&quot; RenderFocused=&quot;{TemplateBinding UIElement.IsKeyboardFocusWithin}&quot; Name=&quot;Bd&quot; SnapsToDevicePixels=&quot;True&quot;&gt;
&lt;ScrollViewer Name=&quot;PART_ContentHost&quot; SnapsToDevicePixels=&quot;{TemplateBinding UIElement.SnapsToDevicePixels}&quot; /&gt;
&lt;/mwt:ListBoxChrome&gt;
&lt;ControlTemplate.Triggers&gt;
&lt;Trigger Property=&quot;UIElement.IsEnabled&quot;&gt;
&lt;Setter Property=&quot;Panel.Background&quot; TargetName=&quot;Bd&quot;&gt;
&lt;Setter.Value&gt;
&lt;DynamicResource ResourceKey=&quot;{x:Static SystemColors.ControlBrushKey}&quot; /&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Setter Property=&quot;TextElement.Foreground&quot;&gt;
&lt;Setter.Value&gt;
&lt;DynamicResource ResourceKey=&quot;{x:Static SystemColors.GrayTextBrushKey}&quot; /&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Trigger.Value&gt;
&lt;s:Boolean&gt;False&lt;/s:Boolean&gt;
&lt;/Trigger.Value&gt;
&lt;/Trigger&gt;
&lt;/ControlTemplate.Triggers&gt;
&lt;/ControlTemplate&gt;
</pre>
<p>Now, the <a href="http://msdn.microsoft.com/en-us/library/microsoft.windows.themes.listboxchrome.aspx" target="_blank">ListBoxChrome</a> wrapper should be removed and <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.border.aspx" target="_blank">Border</a> used instead, with the <strong>CornerRadius</strong> property assigned. The modified template looks like this:</p>
<pre class="brush: xml;">

&lt;ControlTemplate TargetType=&quot;TextBoxBase&quot; x:Key=&quot;txt&quot;&gt;
&lt;Border CornerRadius=&quot;5&quot; BorderThickness=&quot;1&quot; BorderBrush=&quot;Black&quot; x:Name=&quot;Bd&quot; Background=&quot;{TemplateBinding Panel.Background}&quot;&gt;
&lt;ScrollViewer Name=&quot;PART_ContentHost&quot; SnapsToDevicePixels=&quot;{TemplateBinding UIElement.SnapsToDevicePixels}&quot; /&gt;
&lt;/Border&gt;
&lt;ControlTemplate.Triggers&gt;
&lt;Trigger Property=&quot;UIElement.IsEnabled&quot;&gt;
&lt;Setter Property=&quot;Panel.Background&quot; TargetName=&quot;Bd&quot;&gt;
&lt;Setter.Value&gt;
&lt;DynamicResource ResourceKey=&quot;{x:Static SystemColors.ControlBrushKey}&quot; /&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Setter Property=&quot;TextElement.Foreground&quot;&gt;
&lt;Setter.Value&gt;
&lt;DynamicResource ResourceKey=&quot;{x:Static SystemColors.GrayTextBrushKey}&quot; /&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;Trigger.Value&gt;
&lt;s:Boolean&gt;False&lt;/s:Boolean&gt;
&lt;/Trigger.Value&gt;
&lt;/Trigger&gt;
&lt;/ControlTemplate.Triggers&gt;
&lt;/ControlTemplate&gt;
</pre>
<p>Additionaly, I added<strong> x:Key</strong> to the template header so I can identify it in my application. Now, this template can be inserted in the <strong>Resources</strong> section for a WPF application. Since I am testing this on a windowed WPF application, I will insert this template inside <strong>Windows.Resources</strong>.</p>
<p>The reference to the <strong>s</strong> namespace should be added as well (used for the <strong>IsEnabled</strong> trigger):</p>
<pre class="brush: csharp;">

xmlns:s=&quot;clr-namespace:System;assembly=mscorlib&quot;
</pre>
<p>Now I am able to reference the template for a <strong>TextBox</strong> inside the window:</p>
<pre class="brush: xml;">

&lt;TextBox Template=&quot;{StaticResource txt}&quot; Background=&quot;Transparent&quot; BorderThickness=&quot;0&quot; Height=&quot;35&quot; Name=&quot;textBox1&quot; Width=&quot;254&quot; /&gt;
</pre>
<p>And now the rendered output looks like this:</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/07/image3.png"><img style="display: inline; border: 0px;" title="image" src="http://dennisdel.com/wp-content/uploads/2010/07/image_thumb3.png" border="0" alt="image" width="411" height="277" /></a></p>
<p>Hey, but this one looks just like the one when I first tried using the border! True, but try disabling the <strong>TextBox</strong> now and see what it looks like now:</p>
<p><a href="http://dennisdel.com/wp-content/uploads/2010/07/image4.png"><img style="display: inline; border: 0px;" title="image" src="http://dennisdel.com/wp-content/uploads/2010/07/image_thumb4.png" border="0" alt="image" width="415" height="281" /></a></p>
<p>Just the way it should be. In case you do not need to change the look of the control when it is disabled, you can simply remove the <strong>IsEnabled</strong> trigger from the template so all you will have is this:</p>
<pre class="brush: xml;">

&lt;ControlTemplate TargetType=&quot;TextBoxBase&quot; x:Key=&quot;txt&quot;&gt;
&lt;Border CornerRadius=&quot;5&quot; BorderThickness=&quot;1&quot; BorderBrush=&quot;Black&quot; x:Name=&quot;Bd&quot; Background=&quot;{TemplateBinding Panel.Background}&quot;&gt;
&lt;ScrollViewer Name=&quot;PART_ContentHost&quot; SnapsToDevicePixels=&quot;{TemplateBinding UIElement.SnapsToDevicePixels}&quot; /&gt;
&lt;/Border&gt;
&lt;/ControlTemplate&gt;
</pre>
<p>It will correctly render the border, but there won’t be a grayed-out background and modified foreground when the control is explicitly set as inactive.</p>
]]></content:encoded>
			<wfw:commentRss>http://dennisdel.com/?feed=rss2&amp;p=256</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WeatherBar SDK &#8211; now public</title>
		<link>http://dennisdel.com/?p=243</link>
		<comments>http://dennisdel.com/?p=243#comments</comments>
		<pubDate>Thu, 22 Jul 2010 21:28:58 +0000</pubDate>
		<dc:creator>Dennis Delimarsky</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[extensibility]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[weatherbar]]></category>

		<guid isPermaLink="false">http://dennisdel.com/?p=243</guid>
		<description><![CDATA[A while ago I decided to make WeatherBar extensible. I know that for some people it could be a bit frustrating when they cannot find a specific location in WeatherBar because Google Weather API cannot locate weather data for it. Therefore, starting with the next release of WeatherBar, the application will no longer be tied [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I decided to make <a href="http://weatherbar.codeplex.com" target="_blank">WeatherBar</a> extensible. I know that for some people it could be a bit frustrating when they cannot find a specific location in WeatherBar because Google Weather API cannot locate weather data for it.</p>
<p>Therefore, starting with the next release of WeatherBar, the application will no longer be tied to a single weather service. By default, I will still ship the Google Weather plugin (it is already developed and ready for distribution), but there will also be alternative web services available.</p>
<p>To develop a plugin for WeatherBar, all that is needed is the <strong>WeatherBar Dev Kit</strong>. It can be downloaded <a href="http://dennisdel.com/projects/wb_dev_kit.zip" target="_blank">here</a>.</p>
<p>It includes:</p>
<ul>
<li><strong><em>The SDK documentation</em></strong></li>
<li><strong><em>Sample plugin (Google Weather API)</em></strong></li>
<li><strong><em>WeatherBar Extension Test Tool 1.0 Beta</em></strong></li>
</ul>
<p>The <strong>WeatherBar Extension Test Tool</strong> can be used to test the plugin compatibility with WeatherBar 3.0. And although at this moment there is no official relase for the 3.0 build, this tool will ensure that the plugin works correctly and is able to expose the correct information.</p>
<p>I will be glad to bundle more extensions in the next release (for weather services other than Google Weather), so if you – the developer, created one, <a href="mailto:ddelimarsky@live.com" target="_blank">drop me a line</a>. Once I make sure that your plugin works correctly and is using the correct format, I will be able to pack it in the final release. Of course, developers get the credit for their plugins.</p>
]]></content:encoded>
			<wfw:commentRss>http://dennisdel.com/?feed=rss2&amp;p=243</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing CouchDB on a VM</title>
		<link>http://dennisdel.com/?p=238</link>
		<comments>http://dennisdel.com/?p=238#comments</comments>
		<pubDate>Mon, 19 Jul 2010 08:40:50 +0000</pubDate>
		<dc:creator>Dennis Delimarsky</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://dennisdel.com/?p=238</guid>
		<description><![CDATA[“The time to relax is when you don&#8217;t have time for it.”&#160; - Sydney J. Harris After CouchDB hit its official 1.0 release, I decided to try it out and compare it to existing RDBMS, although this is probably not the right thing to do since CouchDB is based on a completely different paradigm. Anyway, [...]]]></description>
			<content:encoded><![CDATA[<p><em>“The time to relax is when you don&#8217;t have time for it.”</em><a href="http://dennisdel.com/wp-content/uploads/2010/07/image.png"><em><img style="border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://dennisdel.com/wp-content/uploads/2010/07/image_thumb.png" width="220" height="200" /></em></a>&#160; <strong><em>- Sydney J. Harris</em></strong></p>
<p>After CouchDB hit its official 1.0 release, I decided to try it out and compare it to existing RDBMS, although this is probably not the right thing to do since CouchDB is based on a completely different paradigm. Anyway, I gave it a shot.</p>
<p>First of all, I decided that I will try it out inside a VM (Virtual Machine) and there are a few reasons for that. Back in the day, when having the opportunity to run a virtual machine on your computer was more of a privilege since resources were limited and the performance wasn’t even close compared to an actual install, doing something inside a guest system would at least earn you some weird looks – why run something inside a box when you can do the same on the host system?</p>
<p>But now times changed and virtual machines evolved. I can fine-tune the performance of my VM and considering the performance of the base machine (the actual hardware) I can simultaneously run two operating systems without seeing any significant performance loss for both of them (well, it still depends on what you are doing).</p>
<p>I use to experiment a lot with a wide variety of development tools and if I would install everything on my host system (Windows 7 Ultimate x64, if anyone interested). it will become cluttered in a matter of days and will practically be unusable. A VM provides a sandbox environment where I can do anything I want – in case something goes wrong, I can simply install a new VM instance and start from scratch. And of course, I am not risking my data on the base system.</p>
<p>The configuration for the VM I used is the following:</p>
<ul>
<li><strong>CPU:</strong> 1 instance</li>
<li><strong>RAM:</strong> 512MB</li>
<li><strong>Video memory:</strong> 12MB</li>
<li><strong>Hard drive: </strong>30GB</li>
<li><strong>Guest system:</strong> Ubuntu 10.04</li>
</ul>
<p>My first thought was using Synaptic and install CouchDB from an existing official repository. But it wasn’t the case – there is CouchDB listed over there, but it was version 0.11.0 – I wanted to install 1.0.0. Therefore, there could be only one solution – compiling from source. Although this might seem a quite complicated process, in fact once you do it two or three times, you pretty much get used to the procedure and all you have to do is make sure the proper dependencies are present.</p>
<p>So I went ahead and downloaded the source for the 1.0.0 release. This can simply be done via the terminal (the <strong>wget </strong>command) but you can also use the web browser – depends on personal preferences. I followed the instructions on the <a href="http://wiki.apache.org/couchdb/Installing_on_Ubuntu" target="_blank">official wiki page</a> (Installing CouchDB on Ubuntu) and it all went smooth – dependencies installed, the main package is ready &#8211; until the point when <strong>./configure</strong> threw me an error – it could not find the needed JS libraries. Since libmozjs-dev is clearly not available in Ubuntu 10.04, I was sure that I installed xulrunner-dev instead. But I did not specify this for <strong>./configure</strong>, so I restarted the process, but already used the correct library references:</p>
<blockquote><p>./configure &#8211;prefix= &#8211;with-js-lib=/usr/lib/xulrunner-devel-1.9.2.6/lib &#8211;with-js-include=/usr/lib/xulrunner-devel-1.9.2.6/include</p>
</blockquote>
<p>It all went fine, but the story isn’t over yet. It was time to compile and install the server. Simple:</p>
<blockquote><p>sudo make &amp;&amp; make install</p>
</blockquote>
<p>But not so fast – when it almost reached the ending stage, several errors were thrown notifying me that access to several locations was denied. Since I already used <strong>chmod</strong> and <strong>chown</strong>, I was a bit confused on what might be the issue. The solution was simple – I switched to my root account for the installation (and yes, I do know that this is not a good practice – but for the purpose of properly installing CouchDB it made sense). The command went through just fine and the CouchDB server was finally installed. I tried to start the service and the message that it was successfully launched was shown. However, when I tried to use <strong>curl</strong> to see the response, an error was thrown – it could not connect to the server.</p>
<p>The first thought that came to my mind in this situation was restarting the VM. But it didn’t help. Looking for possible solutions, I encountered <a href="http://toni.uebernickel.info/development/couchdb-on-ubuntu-karmic-koala/" target="_blank">this</a> article. I tried running this command:</p>
<blockquote><p>sudo –u couchdb couchdb</p>
</blockquote>
<p>And indeed there was a problem – the user wasn’t able to access the main couchdb folder. I was thinking in the context of user permissions, but it didn’t really apply here, so I thought about folder permissions – I probably didn’t <strong>chmod</strong> something correctly. I tried doing it again by following the instructions but no positive results with that. And then I stumbled across <a href="http://depth-first.com/articles/2010/01/28/pubcouch-install-couchdb-on-ubuntu-karmic-from-source" target="_blank">another article</a> that used the correct <strong>chmod</strong> values. Worked like a charm – I restarted the service ad was able to access the Futon web UI.</p>
<p> <a href="http://dennisdel.com/wp-content/uploads/2010/07/nosql2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="nosql2" border="0" alt="nosql2" src="http://dennisdel.com/wp-content/uploads/2010/07/nosql2_thumb.png" width="425" height="229" /></a>
<p>The installation wasn’t much of a “relax” at first, but the end result is worth it. Time for me to work more with it to see where I can use it and how.</p>
]]></content:encoded>
			<wfw:commentRss>http://dennisdel.com/?feed=rss2&amp;p=238</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
