<?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>Miha Valencic &#187; miha</title>
	<atom:link href="http://www.mihavalencic.com/author/miha/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mihavalencic.com</link>
	<description>Solving IT Challenges</description>
	<lastBuildDate>Tue, 30 Mar 2010 13:01:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using PersistentDictionary for prototyping</title>
		<link>http://www.mihavalencic.com/2010/03/30/using-persistentdictionary-for-prototyping/</link>
		<comments>http://www.mihavalencic.com/2010/03/30/using-persistentdictionary-for-prototyping/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 13:01:54 +0000</pubDate>
		<dc:creator>miha</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mihavalencic.com/?p=265</guid>
		<description><![CDATA[Often times, one would find himself in a situation, where you need to temporarily store some data, but don&#8217;t wan&#8217;t the hassle of configuring a database, a username, etc for it. Maybe even more so, if your development box does not contain SQL Server express or similar database. You can of course use SqlCE, SQLite, [...]]]></description>
			<content:encoded><![CDATA[<p>Often times, one would find himself in a situation, where you need to temporarily store some data, but don&#8217;t wan&#8217;t the <em>hassle</em> of configuring a database, a username, etc for it. Maybe even more so, if your development box does not contain <a href="http://www.microsoft.com/express/database/">SQL Server express</a> or similar database. You can of course use <a href="http://www.microsoft.com/Sqlserver/2008/en/us/compact.aspx">SqlCE</a>, <a href="http://www.sqlite.org">SQLite</a>, <a href="http://sourceforge.net/projects/libdb-dotnet/">BerkeleyDB</a> or something else if your needs are beyond simple prototyping storage. SqlCE, SQLite and BerkeleyDB offer familiar querying interface using SQL to manipulate &amp; query data, whereas <a href="http://www.codeplex.com/ManagedEsent">PersistentDictionary</a> offers what the name suggests. A persistent (transactions included!) IDictionary&lt;k,v&gt; implementation.</p>
<p>PersistentDictionary implementation is based on <a href="http://blogs.msdn.com/windowssdk/archive/2008/10/23/esent-extensible-storage-engine-api-in-the-windows-sdk.aspx">Esent</a>, which is a not well-known embedded database included in all major windows version (XP, Vista, Windows Server, etc).  From the Microsoft Windows SDK blog:</p>
<blockquote><p>ESENT is used by the Active Directory, Windows Desktop Search, Windows Mail and several other Windows services and a slightly modified version of the code is used by Microsoft Exchange to store all its mailbox data. The ESENT API is available through the SDK and can be used on all versions of Windows from Windows Server 2000 on up</p></blockquote>
<p>There is a <a href="http://www.codeplex.com/ManagedEsent">managed wrapper for Esent</a>, part of which is also an implementation of PersistentDictionary. Out-of-the box, the PersistentDictionary implementation only stores simple structures and primitive data types, but it is very easy to modify it to support also classes, which are marked with the [Serializable] attribute. One just needs to change the ColumnConverter class. For your convenience,<a href="/wp-content/uploads/2010/03/ManagedEsentCollections.zip"> here is the compiled version of EsentCollections</a>, which enable just that. The usage is fairly simple.</p>
<pre>var store = new PersistentDictionary&lt;Guid, MyClass&gt;("test-database");
// save an instance of your class
store[Guid.NewGuid()] = new MyClass { PropertyA = "SomeValue" };

// to retrieve and display all elements, you can
foreach(var key in store.Keys) {
  var retrievedInstance = store[key];
  // now do something with this instance
  Console.WriteLine(retrievedInstance.PropertyA);
}</pre>
<p>You have to ensure, though, that your custom class is marked for serialization. You can achieve this like so:</p>
<pre>[Serializable]
public class MyClass {
  public string PropertyA { get; set; }
}</pre>
<p>You can see that it is very easy to implement <strong>simple</strong> repositories on top of that &#8212; for <strong>prototyping needs</strong>, where the entities are constantly evolving and changing.</p>
<p>Do note, however, that Esent is not limited to PersistentDictionary. You can query it in different ways, add indexes to it, have many columns, etc. The thing is used by large-scale software like Exchange, nontheless.</p>
<p>I will post a simple example of IRepository implementation shortly. Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihavalencic.com/2010/03/30/using-persistentdictionary-for-prototyping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A truly amazing game</title>
		<link>http://www.mihavalencic.com/2010/01/16/a-truly-amazing-game/</link>
		<comments>http://www.mihavalencic.com/2010/01/16/a-truly-amazing-game/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 00:30:18 +0000</pubDate>
		<dc:creator>miha</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://www.mihavalencic.com/?p=256</guid>
		<description><![CDATA[
I am by no means a gamer (don&#8217;t play, never did a lot (except for Tetris (the original one), The Incredible Machine, and maybe something else) but was fascinated by Crayon Physics Deluxe. I&#8217;ve been setting up my father&#8217;s and my sister&#8217;s computer (they&#8217;ve bought themselves an MSI multi-touch all-in-one PC AE2220M) and found an [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://crayonphysics.com/"><img class="alignnone size-full wp-image-257" title="crayon-physics" src="http://www.mihavalencic.com/wp-content/uploads/2010/01/crayon-physics.png" alt="crayon-physics" width="550" height="272" /></a></p>
<p>I am by no means a gamer (don&#8217;t play, never did a lot (except for <a href="http://en.wikipedia.org/wiki/Tetris">Tetris</a> (the original one), <a href="http://en.wikipedia.org/wiki/The_Incredible_Machine">The Incredible Machine</a>, and maybe something else) but was fascinated by Crayon Physics Deluxe. I&#8217;ve been setting up my father&#8217;s and my sister&#8217;s computer (they&#8217;ve bought themselves an <a href="http://eu.msi.com/index.php?func=proddesc&amp;maincat_no=654&amp;cat2_no=666&amp;prod_no=1933">MSI multi-touch all-in-one PC AE2220M</a>) and found an interesting application in the <a href="http://www.youtube.com/results?search_query=windows+7+touch+pack+blackboard">Windows 7 Touch Pack: Blackboard</a>. It reminded me of <a href="http://en.wikipedia.org/wiki/The_Incredible_Machine">The Incredible Machine</a>, a DOS-based game in the early nineties. Refreshing the fond memories of TIM, I read the Wikipedia article about it, where I saw the game <a href="http://crayonphysics.com/">Crayon Physics Deluxe</a> mentioned. When I saw the demo (the video recording), I downloaded a trial and bought the game. I do own <a href="http://www.wacom.com/bamboo/bamboo_fun.php">a tablet</a>, and I&#8217;m testing it on my kids tomorrow (they are not allowed to work computer otherwise).</p>
<p><span id="more-256"></span>With regards to the multi-touch all-in-one PC: it is solid built, the sound is not so great, and the keyboard is too small for my taste and feels very plastic &#8212; it is wireless, on the other hand. Otherwise, it&#8217;s quite good consireding the price (720 EUR + VAT), sporting a dual core CPU, 4GB of RAM and 640GB of hard disk space. A quality keyboard would&#8217;ve made the difference, in my opinion, since the rest of the computer feels quite solid.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihavalencic.com/2010/01/16/a-truly-amazing-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kdaj je bolha.com postala plačljiva?</title>
		<link>http://www.mihavalencic.com/2010/01/13/kdaj-je-bolha-com-postala-placljiva/</link>
		<comments>http://www.mihavalencic.com/2010/01/13/kdaj-je-bolha-com-postala-placljiva/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 17:01:22 +0000</pubDate>
		<dc:creator>miha</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.mihavalencic.com/?p=253</guid>
		<description><![CDATA[Presenečen sem danes ugotovil, da je na bolha.com le nekaj rubrik brezplačnih. Za precej rubrik pa zahtevajo plačilo. Prodajam (po zelo ugodni ceni!) PVC okna in vrata, ki sem jih odstranil ob adaptaciji hiše&#8230; Očitno bom dal pač oglas na Pod svojo streho. Sicer, če koga zanima, ali pozna koga ki bi to rabil, gre [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mihavalencic.com/wp-content/uploads/2010/01/PVC-Okna-in-balkonska-vrata.jpg"><img class="alignleft size-thumbnail wp-image-254" title="PVC-Okna-in-balkonska-vrata" src="http://www.mihavalencic.com/wp-content/uploads/2010/01/PVC-Okna-in-balkonska-vrata-150x150.jpg" alt="PVC-Okna-in-balkonska-vrata" width="150" height="150" /></a>Presenečen sem danes ugotovil, da je na <a href="http://bolha.com">bolha.com</a> le nekaj rubrik brezplačnih. Za precej rubrik pa zahtevajo plačilo. Prodajam (po zelo ugodni ceni!) PVC okna in vrata, ki sem jih odstranil ob adaptaciji hiše&#8230; Očitno bom dal pač oglas na <a href="http://www.podsvojostreho.net">Pod svojo streho</a>. Sicer, če koga zanima, ali pozna koga ki bi to rabil, gre za kvaliteten PVC profil (jaz drugod po hiši še vedno imam ostala okna) in termopan (k=1.1) stekla. Dimenzije: balkonska vrata (višina: 224cm, širina 100cm) in dve okni (višina: 140cm, širina 210cm).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihavalencic.com/2010/01/13/kdaj-je-bolha-com-postala-placljiva/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server and conversion of local character</title>
		<link>http://www.mihavalencic.com/2009/11/20/sql-server-and-conversion-of-local-character/</link>
		<comments>http://www.mihavalencic.com/2009/11/20/sql-server-and-conversion-of-local-character/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 17:10:50 +0000</pubDate>
		<dc:creator>miha</dc:creator>
				<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.mihavalencic.com/?p=250</guid>
		<description><![CDATA[I&#8217;ve had this problem for the second time yesterday. I&#8217;ve had this problem once before, but I could not remember how I solved it then. The situation: Application developed and tested on a local Windows Server 2008, MS SQL Server 2008. I deployed the application on a hosted server with SQL Server 2008 Express. The [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had this problem for the second time yesterday. I&#8217;ve had this problem once before, but I could not remember how I solved it then. The situation: Application developed and tested on a local Windows Server 2008, MS SQL Server 2008. I deployed the application on a hosted server with SQL Server 2008 Express. The OS is WS2008 R2. I noticed, that I was missing slovene characters, but just one of them. A letter č (c with caret). I tested the local installation, and everything was fine. I opened SQL Server Management studio, and tried to enter slovene characters there. I typed čšž, submitted the query, and what got insterted was cšž. (notice that č was being converted on the fly to c). What is weird is, that this is happening on a hosted machine, and not on my local machine &#8212; although both machines use English as a default language.</p>
<p>Since I&#8217;ve had this problem before, and I discussed it with <a href="http://blogs.solidq.com/EN/dsarka/default.aspx">Dejan</a>, I started digging through all of my email correspondence with Dejan, but could not find anything. I checked and changed the collation of a database, still nothing. My best friend, Google, was of no help either. It then struck me. <a href="http://msdn.microsoft.com/en-us/library/aa258242%28SQL.80%29.aspx">Varchar</a>. It is <strong>non-unicode</strong> data type. nvarchar is of course, what was needed to fix the problem. It is intriguing though, that all of the other Slovene characters work, but c with caret (č) does not get corrupt as one would expect, but gets converted to c.</p>
<p>A lesson learned, is a lesson earned, I guess. This post is here to remind of this situation next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihavalencic.com/2009/11/20/sql-server-and-conversion-of-local-character/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>BleedingEdge 2009</title>
		<link>http://www.mihavalencic.com/2009/10/01/bleedingedge-2009/</link>
		<comments>http://www.mihavalencic.com/2009/10/01/bleedingedge-2009/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 15:06:09 +0000</pubDate>
		<dc:creator>miha</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://www.mihavalencic.com/?p=242</guid>
		<description><![CDATA[Hvala vsem ki ste se udeležili predavanj. Menim da smo odprli nekaj zanimivih vprašanj, ki jih velja dobro razmisliti pri naslednjih projektih. Prezentacija predavanja z naslovom &#8220;Kako z velikimi&#8221; je na voljo za &#8220;dolvleko&#8221;.
]]></description>
			<content:encoded><![CDATA[<p>Hvala vsem ki ste se udeležili predavanj. Menim da smo odprli nekaj zanimivih vprašanj, ki jih velja dobro razmisliti pri naslednjih projektih. Prezentacija predavanja z naslovom <a title="Prezentacija" href="/wp-content/uploads/2009/10/Kako-z-velikimi.zip">&#8220;Kako z velikimi&#8221; je na voljo za &#8220;dolvleko&#8221;</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihavalencic.com/2009/10/01/bleedingedge-2009/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Prodajamo stanovanje</title>
		<link>http://www.mihavalencic.com/2009/08/24/prodajamo-stanovanje/</link>
		<comments>http://www.mihavalencic.com/2009/08/24/prodajamo-stanovanje/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 18:51:20 +0000</pubDate>
		<dc:creator>miha</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://www.mihavalencic.com/?p=229</guid>
		<description><![CDATA[Prodamo stanovanje v Spodnji Šiški.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" src="/wp-content/uploads/2009/08/20090824-0758-150x150.jpg" alt="Nase stanovanje" width="150" height="150" align="left" /> Odločili smo se za prodajo našega ljubega stanovanja v Spodnji Šiški. Več si lahko preberete na <a href="/sarmantno-stanovanje/">strani namenjeni stanovanju</a>.</p>
<p>Stanovanje smo vmes že prodali. <img src='http://www.mihavalencic.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihavalencic.com/2009/08/24/prodajamo-stanovanje/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change collation of a database</title>
		<link>http://www.mihavalencic.com/2009/08/04/change-collation-of-a-database/</link>
		<comments>http://www.mihavalencic.com/2009/08/04/change-collation-of-a-database/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 18:02:28 +0000</pubDate>
		<dc:creator>miha</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://www.mihavalencic.com/?p=213</guid>
		<description><![CDATA[This is mostly a &#8220;note to self&#8221;. If you receive &#8220;The database could not be exclusively locked to perform the operation.&#8221; error message, you have to put the DB in the single user mode, then change the collation. Here&#8217;s how to do it:
USE MASTER
GO

ALTER DATABASE moovme SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE moovme COLLATE Slovenian_CI_AS
ALTER [...]]]></description>
			<content:encoded><![CDATA[<p>This is mostly a &#8220;note to self&#8221;. If you receive &#8220;The database could not be exclusively locked to perform the operation.&#8221; error message, you have to put the DB in the single user mode, then change the collation. Here&#8217;s how to do it:</p>
<pre>USE MASTER
GO

ALTER DATABASE moovme SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE moovme COLLATE Slovenian_CI_AS
ALTER DATABASE moovme SET MULTI_USER
GO</pre>
<p>Hope that helps anyone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihavalencic.com/2009/08/04/change-collation-of-a-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>After YSlow, now Page Speed from Google</title>
		<link>http://www.mihavalencic.com/2009/06/05/after-yslow-now-page-speed-from-google/</link>
		<comments>http://www.mihavalencic.com/2009/06/05/after-yslow-now-page-speed-from-google/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 21:36:36 +0000</pubDate>
		<dc:creator>miha</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.mihavalencic.com/?p=191</guid>
		<description><![CDATA[Page Speed is an YSlow alternative for testing and optimizing websites. I tested it only briefly on Firefox 3.5b4 (officialy, it does not support beta Firefox releases, but you can always unpack the XPI and change the maxversion attribute.
Both YSlow and Page Speed require the excellent Firebug extension, which is an essential tool for web [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/speed/page-speed/">Page Speed</a> is an <a href="http://developer.yahoo.com/yslow/">YSlow</a> alternative for testing and optimizing websites. I tested it only briefly on Firefox 3.5b4 (officialy, it does not support beta Firefox releases, but you can always unpack the XPI and change the <em>maxversion</em> attribute.</p>
<p>Both YSlow and Page Speed require the excellent Firebug extension, which is an essential tool for web developers. If you don&#8217;t know YSlow or Page Speed yet, now is the time to get acquainted.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihavalencic.com/2009/06/05/after-yslow-now-page-speed-from-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC &#8211; NTK 09 demos</title>
		<link>http://www.mihavalencic.com/2009/06/02/aspnet-mvc-ntk-09-demos/</link>
		<comments>http://www.mihavalencic.com/2009/06/02/aspnet-mvc-ntk-09-demos/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 07:22:11 +0000</pubDate>
		<dc:creator>miha</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[ntk]]></category>

		<guid isPermaLink="false">http://www.mihavalencic.com/?p=188</guid>
		<description><![CDATA[Attached, you can find a couple of ASP.NET MVC demos which demo:

ajax views
route debugging
menulink helper
error handling (controllers, views, customization)
different view results (RSS view result among them)
model binding
custom controller factory with a simple Autofac dependency injection demo
custom view engine (showing how mobile pages can be served by using MDBF) and
client &#38; server side validation using the [...]]]></description>
			<content:encoded><![CDATA[<p>Attached, you can find a couple of <a href="http://www.asp.net/mvc">ASP.NET MVC</a> demos which demo:</p>
<ul>
<li>ajax views</li>
<li>route debugging</li>
<li>menulink helper</li>
<li>error handling (controllers, views, customization)</li>
<li>different view results (RSS view result among them)</li>
<li>model binding</li>
<li>custom controller factory with a simple <a href="http://code.google.com/p/autofac/">Autofac</a> dependency injection demo</li>
<li>custom view engine (showing how mobile pages can be served by using <a href="http://mdbf.codeplex.com/">MDBF</a>) and</li>
<li>client &amp; server side validation using the interesting <a href="http://www.codeplex.com/xval">xVal</a> framework.</li>
</ul>
<p><a title="NTK ASP.NET MVC demos" href="/wp-content/uploads/2009/06/aspnet-mvc-ntk-demos.zip">Get all demos in one zip archive</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihavalencic.com/2009/06/02/aspnet-mvc-ntk-09-demos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Prezentacija ASP.NET MVC &#8211; NTK 09</title>
		<link>http://www.mihavalencic.com/2009/05/27/prezentacija-aspnet-mvc-ntk-09/</link>
		<comments>http://www.mihavalencic.com/2009/05/27/prezentacija-aspnet-mvc-ntk-09/#comments</comments>
		<pubDate>Wed, 27 May 2009 09:20:41 +0000</pubDate>
		<dc:creator>miha</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://www.mihavalencic.com/?p=185</guid>
		<description><![CDATA[Hvala vsem ki ste prišli na predavanje. Tukaj se nahaja powerpoint prezentacija s predavanja ASP.NET MVC. Upam da ste izpolnili vprašalnike.
]]></description>
			<content:encoded><![CDATA[<p>Hvala vsem ki ste prišli na predavanje. <a href="/wp-content/uploads/2009/05/aspnet-mvcpptx.zip">Tukaj</a> se nahaja powerpoint prezentacija s predavanja ASP.NET MVC. Upam da ste izpolnili vprašalnike.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mihavalencic.com/2009/05/27/prezentacija-aspnet-mvc-ntk-09/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
