<?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>Avivo Tech Blog</title>
	<atom:link href="http://tech.avivo.si/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.avivo.si</link>
	<description>Solving problems</description>
	<lastBuildDate>Fri, 27 Aug 2010 07:01:31 +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>Installing and Activating the Remote Desktop Services License Server on Windows Server 2008 R2</title>
		<link>http://tech.avivo.si/2010/08/installing-and-activating-remote-desktop-services-licence-server/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=installing-and-activating-remote-desktop-services-licence-server</link>
		<comments>http://tech.avivo.si/2010/08/installing-and-activating-remote-desktop-services-licence-server/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 07:01:31 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[System administration]]></category>
		<category><![CDATA[Installing and Activating the Remote Desktop Services License Server on Windows Server 2008 R2]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[RDP]]></category>
		<category><![CDATA[remote desktop services licence]]></category>
		<category><![CDATA[window 2008 r2]]></category>
		<category><![CDATA[windows 2008 r2 server]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=566</guid>
		<description><![CDATA[So, you have purchased Microsoft Windows Server 2008 R2 and need to activate Remote Desktop Service Licence Server. We have found following post here. Unless licensing is configured during the initial installation of the Remote Desktop Services role on Windows Server 2008 R2, a 120 day grace period is provided before a license server needs [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F08%2Finstalling-and-activating-remote-desktop-services-licence-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F08%2Finstalling-and-activating-remote-desktop-services-licence-server%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>So, you have purchased Microsoft Windows Server 2008 R2 and need to activate Remote Desktop Service Licence Server.</p>
<p>We have found following post <a href="http://www.techotopia.com/index.php/Configuring_a_Windows_Server_2008_R2_Remote_Desktop_Services_License_Server" target="_blank">here</a>.</p>
<p>Unless licensing is configured during the initial installation of the  Remote Desktop Services role on Windows Server 2008 R2, a 120 day grace  period is provided before a license server needs to be installed and  activated.</p>
<h2>Installing the Remote Desktop Services License Server</h2>
<p>The first step is to install the Remote Desktop Services License  Services server role. The license server does not necessarily have to be  installed on a system which is acting as a Remote Desktop Server. The  installation can be performed using by selecting Roles from the tree in  the left hand panel of the Server Manager tool.</p>
<p>If the server is already configured with the Remote Desktop  Services role, scroll down the Roles summary page to the Remote Desktop  Services section click on the <em>Add Role Services</em> link. In the resulting dialog titled Select Role Services select the check box next to <em>Remote Desktop Licensing</em> and then click Next to proceed to the <em>Configure discovery scope for RD licensing</em> screen as illustrated in the following figure:<br />
<img class="alignnone size-full wp-image-569" title="windows-2008-r2-server-remote-desktop-licence-01" src="http://tech.avivo.si/wp-content/uploads/2010/08/windows-2008-r2-server-remote-desktop-licence-01.jpg" alt="" width="700" height="516" /><br />
In the first version of Windows Server 2008, it was necessary to specify  a method by which RD Session Host servers (or Terminal Servers as they  were known then) would auto-detect the server running the licensing  server. With Windows Server 2008 R2, this approach is discouraged, and  Microsoft now recommends that each RD Session Host be manually  configured with information about the license server. In keeping with  this recommendation, leave the Configure a discovery scope for this  license server option unselected. Note, however, that this setting may  be changed at a later time if required via the RD Licensing Manager  tool. Click Next to proceed to the confirmation screen.</p>
<p>On a server which is does not have the Remote Desktop Services  role installed, open the Server Manager, select Roles from the tree in  the left hand panel and select <em>Add Roles</em>. Click Next on the  initial screen if it appears so that the Select Server Roles screen is  displayed. From the list of roles select the check box next to Remote  Desktop Services and click on the Next button.</p>
<p>Read the information screen and then proceed to the Select Service Roles screen. Check the box next to <em>Remote Desktop Licensing</em>, click Next and follow the steps outlined above.</p>
<p>On the confirmation screen, verify that the information matches  your expectations and click Install to initiate the installation  process.</p>
<h2>Activating the RD License Server</h2>
<p>Once the RD License Server has been installed the next task is to  activate it. This task is performed using the RD Licensing Manager which  may be launched via <em>Start -&gt; All Programs -&gt; Administrative Tools -&gt; Remote Desktop Services -&gt; Remote Desktop Licensing Manager</em>.  Once started, the Remote Desktop Licensing Manager dialog will appear  containing a list of detected license servers on the network. The only  license server listed in the following figure is the one on the local  server. Because this has yet to be activated it is listed with a red  circle containing an X mark next to it:<br />
<img class="alignnone size-full wp-image-570" title="windows-2008-r2-server-remote-desktop-licence-02" src="http://tech.avivo.si/wp-content/uploads/2010/08/windows-2008-r2-server-remote-desktop-licence-02.jpg" alt="" width="700" /></p>
<p><a title="The Windows Server 2008 R2 RD Licensing Manager" href="https://activate.microsoft.com" target="_blank">https://activate.microsoft.com</a> web site using a browser and enter the product ID. Alternatively, if an  internet connection is not available or a firewall prevents such access  the activation may be performed over the telephone. If <em>Automatic connection</em> is selected, the following dialog will appear as the wizard attempts to contact Microsoft:<br />
<img class="alignnone size-full wp-image-571" title="windows-2008-r2-server-remote-desktop-licence-03" src="http://tech.avivo.si/wp-content/uploads/2010/08/windows-2008-r2-server-remote-desktop-licence-03.jpg" alt="" width="451" height="142" /><br />
Once the Microsoft activation server has been located a new dialog will  appear prompting for user, company and geographic location information.  Complete these details and click Next to proceed. The second screen  requests more detailed, but optional information. Either complete this  information or click Next to skip to the activation process. Once again  the wizard will contact Microsoft and complete the activation. Once  completed, the following completion screen will appear:<br />
<img class="alignnone size-full wp-image-572" title="windows-2008-r2-server-remote-desktop-licence-04" src="http://tech.avivo.si/wp-content/uploads/2010/08/windows-2008-r2-server-remote-desktop-licence-04.jpg" alt="" width="556" height="611" /><br />
Note that the <em>Start Install Licenses Wizard now</em> check box is selected by default. If you are ready to begin installing Client Access Licenses (CALs) now click on Next.</p>
<h2>Installing Client Access Licenses (CAL)</h2>
<p>A Client Access License (CAL) is required for each client requiring  access to Windows Server 2008 R2 Remote Desktop Services. Once an RD  License Server has been installed and activated the next step is to  install the CALs. This can be performed as a continuation of the RD  License Server activation process as outlined above, or at any other  time by opening the RD Licensing Manager, right clicking on the  appropriate license server in the list and choosing <em>Install Licenses</em> from the popup menu.</p>
<p>Once the Install Licenses wizard has started, click Next on the  welcome screen to select the type of license program being used. Select  the appropriate license type from the drop down list depending on how  the licenses were acquired and then click Next to enter the license  codes. On the License Program screen enter each code and press the Add  button:<br />
<img class="alignnone size-full wp-image-573" title="windows-2008-r2-server-remote-desktop-licence-05" src="http://tech.avivo.si/wp-content/uploads/2010/08/windows-2008-r2-server-remote-desktop-licence-05.jpg" alt="" width="554" height="610" /><br />
Select the license program corresponding to your license and click next to proceed to the License Code screen:<br />
<img class="alignnone size-full wp-image-574" title="windows-2008-r2-server-remote-desktop-licence-06" src="http://tech.avivo.si/wp-content/uploads/2010/08/windows-2008-r2-server-remote-desktop-licence-06.jpg" alt="" width="554" height="611" /><br />
Enter each license key into this screen followed by the Add button. Once  all the license codes have been added click on the Next button to  complete the license installation process.</p>
<h2>Configuring Licensing Settings on RD Session Hosts</h2>
<p>Assuming that you followed Microsoft’s recommendation to manually  configure the license server information for each RD Session Host it  will now be necessary to perform this task. On each RD Session Host  invoke the Remote Desktop Session Host Configuration tool by selecting  the <em>Start -&gt; All Programs -&gt; Remote Desktop Services -&gt; Remote Desktop Session Host Configuration</em> menu option. Within this tool, double click on the Remote Desktop  licensing mode entry located in the Edit settings box listed under  Licensing. In the resulting Licensing tab of the properties dialog  select the appropriate licensing mode (per device or per user). Having  defined the licensing mode, the next task is to specify the licensing  server. Beneath the mode selection area, click on the <em>Add…</em> button to display the Add License Server dialog as illustrated in the following figure:<br />
<img class="alignnone size-full wp-image-575" title="windows-2008-r2-server-remote-desktop-licence-07" src="http://tech.avivo.si/wp-content/uploads/2010/08/windows-2008-r2-server-remote-desktop-licence-07.jpg" alt="" width="659" height="348" /><br />
All known license servers will be listed in the left hand box. If the  required servers are listed, select them and add them to the list of  specified servers by clicking on the <em>Add&gt;</em> button. If a server  is not listed, manually type the name or IP address of the server in the  text box provided and click the corresponding <em>Add&gt;</em> button. Once all the required servers have been specified, click the OK button to commit the changes and dismiss the dialog.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2010/08/installing-and-activating-remote-desktop-services-licence-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detect Browser in CSS</title>
		<link>http://tech.avivo.si/2010/08/detect-browser-in-css/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=detect-browser-in-css</link>
		<comments>http://tech.avivo.si/2010/08/detect-browser-in-css/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 12:07:09 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[HTML, Javascript and CSS]]></category>
		<category><![CDATA[browser detection]]></category>
		<category><![CDATA[cross browser]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css hacks]]></category>
		<category><![CDATA[detect browser in css]]></category>
		<category><![CDATA[detect internet explorer version in css]]></category>
		<category><![CDATA[how to detect browser version in css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=564</guid>
		<description><![CDATA[Sometimes you need to detect browser version in CSS in order to apply additional, browser specific, properties to the same class. Here are the ways for selecting specific versions of Internet Explorer by using followind conditional comments: IE 6 and below Use * html {} to select the html element. IE 7 and below Use [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F08%2Fdetect-browser-in-css%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F08%2Fdetect-browser-in-css%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Sometimes you need to detect browser version in CSS in order to apply additional, browser specific, properties to the same class.</p>
<p>Here are the ways for selecting specific versions of Internet Explorer by using followind conditional comments:</p>
<ul>
<li>
<h3><strong>IE 6 and below</strong></h3>
<ul>
<li>Use <strong><span style="color: #800000;">* html {}</span></strong> to select the html element.</li>
</ul>
</li>
<li>
<h3><strong>IE 7 and below</strong></h3>
<ul>
<li>Use <strong><span style="color: #800000;">*:first-child+html {} * html {} </span></strong>to select the html element.</li>
</ul>
</li>
<li>
<h3><strong>IE 7 only</strong></h3>
<ul>
<li>Use <strong><span style="color: #800000;">*:first-child+html {}</span></strong> to select the html element.</li>
</ul>
</li>
<li>
<h3><strong>IE 7 and modern browsers only</strong></h3>
<ul>
<li>Use <strong><span style="color: #800000;">html&gt;body {}</span></strong> to select the body element.</li>
</ul>
</li>
<li>
<h3><strong>Modern browsers only (not IE 7)</strong></h3>
<ul>
<li>Use<strong><span style="color: #800000;"> html&gt;/**/body {}</span></strong> to select the body element.</li>
</ul>
</li>
</ul>
<p>Example for <strong>IE7 only (</strong><span style="color: #800000;">change left padding to 5px instead of 20px as it is for other browsers</span>)</p>
<pre lang="css"><span style="color: #800000;">.your_css_class
{
	color: #000;
	padding: 20px;
	background: #fff;
}

/* IE7 hack */
*:first-child+html .your_css_class
{
	padding-left: 5px;
}</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2010/08/detect-browser-in-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to clear recent servers list in MS SQL 2005 Management Studio?</title>
		<link>http://tech.avivo.si/2010/08/how-to-clear-recent-servers-list-in-ms-sql-2005-management-studio/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-clear-recent-servers-list-in-ms-sql-2005-management-studio</link>
		<comments>http://tech.avivo.si/2010/08/how-to-clear-recent-servers-list-in-ms-sql-2005-management-studio/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 21:19:40 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[clear recent ms sql servers list in server name drop down list]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[ms sql server 2005]]></category>
		<category><![CDATA[smss]]></category>
		<category><![CDATA[sql server management studio]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=559</guid>
		<description><![CDATA[So, you have Microsoft SQL Server 2005 Management Studio (SSMS) and when trying to connect &#8220;Server name&#8221; drop down list is filled with sensitive data: To clear this list, all you have to do is delete this file: C:\Documents and Settings\&#60;user&#62;\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat. Just remember, once you delete that file all of your previous [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F08%2Fhow-to-clear-recent-servers-list-in-ms-sql-2005-management-studio%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F08%2Fhow-to-clear-recent-servers-list-in-ms-sql-2005-management-studio%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>So, you have Microsoft SQL Server 2005 Management Studio (SSMS) and when trying to connect &#8220;Server name&#8221; drop down list is filled with sensitive data:<br />
<img class="alignnone size-full wp-image-560" title="sql-server-recent-list" src="http://tech.avivo.si/wp-content/uploads/2010/08/sql-server-recent-list.jpg" alt="" width="640" height="441" /></p>
<p>To clear this list, all you have to do is delete this file:<br />
C:\Documents and Settings\&lt;user&gt;\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat.</p>
<p>Just remember, once you delete that file all of your previous connections will be lost. So make sure that you have any necessary IP addresses, usernames, and passwords that you&#8217;ll need to reconnect to your favorite/most used SQL Servers.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2010/08/how-to-clear-recent-servers-list-in-ms-sql-2005-management-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Sleep or Wait function</title>
		<link>http://tech.avivo.si/2010/07/javascript-sleep-of-wait-function/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=javascript-sleep-of-wait-function</link>
		<comments>http://tech.avivo.si/2010/07/javascript-sleep-of-wait-function/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 22:44:14 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[HTML, Javascript and CSS]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[sleep function]]></category>
		<category><![CDATA[thread.sleep in javascript]]></category>
		<category><![CDATA[wait function]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=553</guid>
		<description><![CDATA[This can be one possible implementation (not very clean, but working): function sleep(numberMillis){ var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true){ now = new Date(); if (now.getTime() > exitTime) return; } };]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F07%2Fjavascript-sleep-of-wait-function%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F07%2Fjavascript-sleep-of-wait-function%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>This can be one possible implementation (not very clean, but working):</p>
<pre lang="javascript">
function sleep(numberMillis){
	var now = new Date();
	var exitTime = now.getTime() + numberMillis;
	while (true){
		now = new Date();
		if (now.getTime() > exitTime) return;
	}
};
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2010/07/javascript-sleep-of-wait-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to boot Windows 2008 R2 Server from usb drive/stick</title>
		<link>http://tech.avivo.si/2010/07/how-to-boot-windows-2008-r2-server-from-usb-drivestick/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-boot-windows-2008-r2-server-from-usb-drivestick</link>
		<comments>http://tech.avivo.si/2010/07/how-to-boot-windows-2008-r2-server-from-usb-drivestick/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 12:21:21 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[System administration]]></category>
		<category><![CDATA[bootable usb stick]]></category>
		<category><![CDATA[copy windows 2008 r2 iso to usb]]></category>
		<category><![CDATA[diskpart]]></category>
		<category><![CDATA[hp proliant ml150 g3]]></category>
		<category><![CDATA[installing windows 2008 r2 from usb]]></category>
		<category><![CDATA[windows 2008 r2 server]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=549</guid>
		<description><![CDATA[We had to install Windows 2008 R2 Server on HP ProLiant ML150 G3 server and we decide to do this booting and installing it from USB stick. We have a 4GB USB stick and it is enough. Diskpart tool is excellent way to do this task. If you don’t have Diskpart, you can download it [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F07%2Fhow-to-boot-windows-2008-r2-server-from-usb-drivestick%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F07%2Fhow-to-boot-windows-2008-r2-server-from-usb-drivestick%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>We had to install Windows 2008 R2 Server on HP ProLiant ML150 G3 server and we decide to do this booting and installing it from USB stick. We have a 4GB USB stick and it is enough.</p>
<p>Diskpart tool is excellent way to do this task. If you don’t have Diskpart, you can download it <a href="http://wudt.codeplex.com/" target="_blank">here</a>.</p>
<h1>Format the thumb drive</h1>
<ol>
<li>from a DOS prompt execute: diskpart</li>
<li><strong>list disk</strong></li>
<li><strong>select disk 1</strong> (assuming disk 1 was your thumb  drive in the above list disk command)</li>
<li><strong>clean </strong></li>
<li><strong>create partition primary </strong></li>
<li><strong>select partition 1 </strong></li>
<li><strong>active </strong></li>
<li><strong>format fs=fat32 </strong></li>
<li><strong>assign </strong></li>
<li><strong>exit</strong></li>
</ol>
<h1>Copy the Win2008 install files</h1>
<ol>
<li><strong>xcopy d:\*.* /s/e/f e:\</strong> (assumes your dvd is drive  D: and your thumb drive is drive E:\, adjust accordingly)</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2010/07/how-to-boot-windows-2008-r2-server-from-usb-drivestick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random sorting using LINQ</title>
		<link>http://tech.avivo.si/2010/07/random-sorting-using-linq/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=random-sorting-using-linq</link>
		<comments>http://tech.avivo.si/2010/07/random-sorting-using-linq/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 09:07:43 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[Programming Techniques]]></category>
		<category><![CDATA[linq]]></category>
		<category><![CDATA[random sorting]]></category>
		<category><![CDATA[random sorting using linq]]></category>
		<category><![CDATA[shuffle with linq]]></category>
		<category><![CDATA[sort]]></category>
		<category><![CDATA[sort randomly]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=545</guid>
		<description><![CDATA[Random Sort Consider the below Person class: public class Person { public int Id { get; set; } public string Name { get; set; } } This is how you can randomly sort the List object: List list = new List(); list.Add(new Person { Id = 1, Name = "Davolio Nancy" }); list.Add(new Person { [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F07%2Frandom-sorting-using-linq%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F07%2Frandom-sorting-using-linq%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Random Sort</p>
<p>Consider the below Person class:</p>
<pre class="csharp">
public class Person
{
    public int Id
    {
        get;
        set;
    }
    public string Name
    {
        get;
        set;
    }
}
</pre>
<p>This is how you can randomly sort the List<Person> object:</p>
<pre class="csharp">
List<Person> list = new List<Person>();

list.Add(new Person { Id = 1, Name = "Davolio Nancy" });
list.Add(new Person { Id = 2, Name = "Fuller Andrew" });
list.Add(new Person { Id = 3, Name = "Leverling Janet" });
list.Add(new Person { Id = 4, Name = "Peacock Margaret" });
list.Add(new Person { Id = 5, Name = "Buchanan Steven" });
list.Add(new Person { Id = 6, Name = "Suyama Michael" });
list.Add(new Person { Id = 7, Name = "King Robert" });
list.Add(new Person { Id = 8, Name = "Callahan Laura" });
list.Add(new Person { Id = 9, Name = "Dodsworth Anne" });

list = list.OrderBy(x => Guid.NewGuid()).ToList();
</pre>
<p>Or you can use this approach:</p>
<pre class="csharp">
Random random = new Random();
list = (from x in list
       let r = random.Next()
       orderby r
       select x).ToList();
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2010/07/random-sorting-using-linq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Allowing WCF services (svc extension) in IIS7</title>
		<link>http://tech.avivo.si/2010/07/allowing-wcf-services-svc-extension-in-iis7/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=allowing-wcf-services-svc-extension-in-iis7</link>
		<comments>http://tech.avivo.si/2010/07/allowing-wcf-services-svc-extension-in-iis7/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 20:17:45 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[Web Services]]></category>
		<category><![CDATA[allow iis to serve svc files]]></category>
		<category><![CDATA[httpHandlers]]></category>
		<category><![CDATA[iis 7]]></category>
		<category><![CDATA[mime types]]></category>
		<category><![CDATA[svc extension]]></category>
		<category><![CDATA[wcf]]></category>
		<category><![CDATA[web.config]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=542</guid>
		<description><![CDATA[First, click on your website (or IIS7 website root) Click on MimeTypes and enter &#8220;.svc&#8221; and &#8220;application/octet-stream&#8221; and save In your project add this to your web.config in &#60;httpHandlers&#62; section: &#60;add name=&#8221;svc-Integrated&#8221; path=&#8221;*.svc&#8221; verb=&#8221;*&#8221; type=&#8221;System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&#8243; preCondition=&#8221;integratedMode&#8221; /&#62; &#60;add name=&#8221;svc-ISAPI-2.0&#8243; path=&#8221;*.svc&#8221; verb=&#8221;*&#8221; modules=&#8221;IsapiModule&#8221; scriptProcessor=&#8221;%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll&#8221; preCondition=&#8221;classicMode,runtimeVersionv2.0,bitness32&#8243; /&#62;]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F07%2Fallowing-wcf-services-svc-extension-in-iis7%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F07%2Fallowing-wcf-services-svc-extension-in-iis7%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<ol>
<li>First, click on your website (or IIS7 website root)</li>
<li>Click on MimeTypes and enter &#8220;.svc&#8221; and &#8220;application/octet-stream&#8221; and save</li>
<li>In your project add this to your web.config in &lt;httpHandlers&gt; section:<br />
&lt;add name=&#8221;svc-Integrated&#8221; path=&#8221;*.svc&#8221; verb=&#8221;*&#8221; type=&#8221;System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&#8243; preCondition=&#8221;integratedMode&#8221; /&gt;<br />
&lt;add name=&#8221;svc-ISAPI-2.0&#8243; path=&#8221;*.svc&#8221; verb=&#8221;*&#8221; modules=&#8221;IsapiModule&#8221; scriptProcessor=&#8221;%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll&#8221; preCondition=&#8221;classicMode,runtimeVersionv2.0,bitness32&#8243; /&gt;</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2010/07/allowing-wcf-services-svc-extension-in-iis7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Three essential plugins for Expression Blend</title>
		<link>http://tech.avivo.si/2010/07/three-essential-plugins-for-expression-blend/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=three-essential-plugins-for-expression-blend</link>
		<comments>http://tech.avivo.si/2010/07/three-essential-plugins-for-expression-blend/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 09:49:00 +0000</pubDate>
		<dc:creator>developer</dc:creator>
				<category><![CDATA[Silverlight/WPF]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=529</guid>
		<description><![CDATA[When it comes to vector graphics in Windows applications XAML is the most advanced format to choose from. XAML is great because developer/designer has full control over the graphics. Hidden reference lines, or garbage shapes, or objects can be relatively easily detected and removed from the code as compared to those formats that entirely rely [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F07%2Fthree-essential-plugins-for-expression-blend%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F07%2Fthree-essential-plugins-for-expression-blend%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>When it comes to vector graphics in Windows applications <a title="Extensible application markup language" href="http://en.wikipedia.org/wiki/Extensible_Application_Markup_Language">XAML</a> is the most advanced format to choose from. XAML is great because developer/designer has full control over the graphics. Hidden reference lines, or garbage shapes, or objects can be relatively easily detected and removed from the code as compared to those formats that entirely rely on GUI editor.</p>
<p>A XAML document can be created with plain Notepad but there are great apps like Visual Studio, Expression Blend and Kaxaml that simplify editing. What is missing in those apps is lack of XAML exporting support, like saving .xaml to .png file. Luckily there are plugins to do just that.</p>
<p><strong><a title="Expression Blend Printing Add-in" href="http://xbprint.codeplex.com/">xbprint</a> </strong>is printing <strong>plugin </strong>for <strong>Expression Blend</strong> 3 hosted on CodePlex. Installation of the utility must be perfomed manually by extracting files to the Addins folder in Expression Blend directory. But once the plugin is installed it is easy to use. Set margins, alignment, paper size and click Print.</p>
<p><a rel="attachment wp-att-531" href="http://tech.avivo.si/2010/07/three-essential-plugins-for-expression-blend/xbprint_medium/"><img class="alignnone size-medium wp-image-531" title="xbprint screenshot" src="http://tech.avivo.si/wp-content/uploads/2010/07/xbprint_medium-600x375.jpg" alt="xbprint screenshot" width="600" height="375" /></a></p>
<p><strong><a title="Expression Blend Rasterizer Add-in" href="http://xbraster.codeplex.com/">xbraster</a> </strong>is <strong>xaml to raster image</strong> converting plugin, a close relative to xbprint. Installation and use is similar. xbraster can convert XAML to PNG, JPEG, TIFF, GIF or bitmap.</p>
<p><a rel="attachment wp-att-532" href="http://tech.avivo.si/2010/07/three-essential-plugins-for-expression-blend/xbraster_medium/"><img class="alignnone size-medium wp-image-532" title="xbraster screenshot" src="http://tech.avivo.si/wp-content/uploads/2010/07/xbraster_medium-600x375.jpg" alt="xbraster screenshot" width="600" height="375" /></a></p>
<p><a title="Sprite Generator Add-in for Expression Blend" href="http://xbsprite.codeplex.com"><strong>xbsprite</strong></a> is a <strong>sprite image generating</strong> plugin. Input xaml files are rasterized and combined in one image with optional CSS and HTML output for use on a web page.</p>
<p><a rel="attachment wp-att-535" href="http://tech.avivo.si/2010/07/three-essential-plugins-for-expression-blend/xbsprite_medium/"><img class="alignnone size-medium wp-image-535" title="xbsprite screenshot" src="http://tech.avivo.si/wp-content/uploads/2010/07/xbsprite_medium-600x375.jpg" alt="xbsprite screenshot" width="600" height="375" /></a></p>
<p>For advanced and professional use of XAML xbprint, xbraster and xbsprite are must-have plugins.</p>
<p><strong>EDIT: xbprint, xbraster and xbsprite can run directly from desktop &#8211; no need to have<br />
Expression Blend installed.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2010/07/three-essential-plugins-for-expression-blend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on android mobile development</title>
		<link>http://tech.avivo.si/2010/06/thoughts-on-android-mobile-development/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=thoughts-on-android-mobile-development</link>
		<comments>http://tech.avivo.si/2010/06/thoughts-on-android-mobile-development/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 13:04:12 +0000</pubDate>
		<dc:creator>developer</dc:creator>
				<category><![CDATA[Mobile development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[android development]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[issues]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[mobile develpment]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=516</guid>
		<description><![CDATA[Intro We like the taste of MVC in ASP .NET and have some practical experiences in coding Java applets, J2ME and Silverlight applications. Lately our team decided to build a simple application for Android phone to try the platform. Story begins with an idea and motivation, installing and setting Eclipse + Android SDK, and like [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F06%2Fthoughts-on-android-mobile-development%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F06%2Fthoughts-on-android-mobile-development%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>Intro</strong><br />
We like the taste of MVC in ASP .NET and have some practical experiences in coding Java applets, J2ME and Silverlight applications.</p>
<p>Lately our team decided to build a simple application for Android phone to try the platform. Story begins with an idea and motivation, installing and setting Eclipse + Android SDK, and like always, a sketch, todo list, etc.</p>
<p><strong>Issues</strong></p>
<ul>
<li>For each property in layout xml the &#8220;android:&#8221; namespace is needed. Of course it can be replace with &#8220;a&#8221; but it still annoying to write it every time. Example &lt;LinearLayout android:id=&#8221;@+id/pnlSomething&#8221; /&gt;   There is more advanced graphical xml standard &#8211; SVG</li>
<li>oops, I tried (miss-clicked) to run android as classic Java application but it returns an error (like build error),<br />
next time I try running as android application this error wont go away even if the code is fine<br />
solution: delete error from the error list and it should work fine <img src='http://tech.avivo.si/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>sometimes I run a debug and don&#8217;t notice the tiny icon in the far right bottom corner of eclipse<br />
that shows the application is launching and it&#8217;s stuck&#8230; and I try to launch it again, and again<br />
and applications are trying to launch parallel&#8230; solution: close eclipse and start again</li>
<li>connection refused on localhost? is this a joke? is only google.com allowed?<br />
firefox opens it normally, firewall is off, same on IIS and apache, permissions are set in manifest.xml<br />
reason: &#8216;localhost&#8217; means the internal loopback of device (emulator) not the PC,<br />
solution: use your LAN IP<br />
//solution: edit hosts and set something like 127.0.0.1   pc-localhost //does not work<br />
<a href="http://groups.google.com/group/android-developers/browse_thread/thread/801645febf0523ea/9e779925e9570828" target="_blank">http://groups.google.com/group/android-developers/browse_thread/thread/801645febf0523ea/9e779925e9570828</a></li>
<li>when a crash occurs it is just a crash, without detailed message or tip, developer should guess the error<br />
* and, BTW, emulator shows wrong time on windows (7:04 PM while the real time is 21:04 on GMT+1 timezone<br />
or 5:07 PM when the time is 19:07)</li>
<li>Record breaker among IDEs: 1.131 GB of RAM taken by Eclipse</li>
<li>A lot of features: social media, web, google maps, sqlite, bluetooth,</li>
<li> gestures, camera, speech recognition, 3D, processing&#8230;</li>
<li>s it easy to learn? theory yes, it is logical and quite simple, well documented;<br />
but dealing with basic practical issues is a pain</li>
</ul>
<p>What really annoys us is that when we write layout in xml and we are confidant with it schema is right, works in theory, draws a preview but just don&#8217;t work in emulator Eclipse won&#8217;t tell what is the problem it just says &#8220;Source Not Found.&#8221;</p>
<p><strong>Comparison: C# vs Java</strong></p>
<p>A good programming language uses less code and effort to complete a task. What makes Silverlight (C#) coding easier and Android (Java) coding harder? Advantages of C# over Java or what is missing in Java:</p>
<ul>
<li> <strong>lambda expression and Linq</strong> make handling data, arrays, xml easy</li>
<li><strong> properties</strong></li>
<li><strong> partial types</strong> when dealing with large files</li>
<li><strong> preprocessor directives (#if, #region)</strong> to bring visual focus on the particular part of code that is being developed and hide the other code</li>
<li><strong> verbatim string</strong>, like @&#8221;C:\Program Files\android\sdk.exe&#8221; without escape characters</li>
<li><strong> nullable types</strong>, like int? that can be -n&#8230;0, 1, 2&#8230;n or null</li>
<li><strong> &#8216;yield&#8217; keyword</strong></li>
<li><strong> &#8216;??&#8217; operator</strong></li>
<li><strong> enumerations</strong> that are avoided in Android (Android uses constants, requires documentation to locate a constant)</li>
</ul>
<p>* comparing to Silverlight you need to write more code in a more complex way for same features (ie. async, binding,<br />
db, events)</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">* nullable types, like int? that can be -n&#8230;0, 1, 2&#8230;n or null</div>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2010/06/thoughts-on-android-mobile-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PDF files not Publish in ASP.NET MVC when deploying</title>
		<link>http://tech.avivo.si/2010/06/pdf-files-not-publish-in-asp-net-mvc-when-deploying/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=pdf-files-not-publish-in-asp-net-mvc-when-deploying</link>
		<comments>http://tech.avivo.si/2010/06/pdf-files-not-publish-in-asp-net-mvc-when-deploying/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 12:28:51 +0000</pubDate>
		<dc:creator>Avivo</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[deploy web application]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[pdf files not published]]></category>
		<category><![CDATA[publish]]></category>
		<category><![CDATA[publish pdf files in asp.net mvc]]></category>

		<guid isPermaLink="false">http://tech.avivo.si/?p=523</guid>
		<description><![CDATA[We faced a problem when we added some PDF files into our media library of ASP.NET MVC website and noticed that these files are not Published automatically. So you need in Visual Studio to click on each PDF file and under Properties (F4) just choose Build Action=Content Copy to Output Directory=Copy Always]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F06%2Fpdf-files-not-publish-in-asp-net-mvc-when-deploying%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftech.avivo.si%2F2010%2F06%2Fpdf-files-not-publish-in-asp-net-mvc-when-deploying%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>We faced a problem when we added some PDF files into our media library of ASP.NET MVC website and noticed that these files are not Published automatically.<br />
So you need in Visual Studio to click on each PDF file and under Properties (F4) just choose <strong></strong></p>
<ul>
<li><strong>Build Action=Content</strong></li>
<li><strong>Copy to Output Directory=Copy Always</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tech.avivo.si/2010/06/pdf-files-not-publish-in-asp-net-mvc-when-deploying/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	<img style='margin:0;padding:0;border:0;' width='1px' height='1px' src="http://tech.avivo.si/wp-content/plugins/mystat/mystat.php?act=time_load&id=86365&rnd=1099237478" /></channel>
</rss>
