<?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>fredrik.eriksson</title>
	<atom:link href="http://eriksson.ws/feed/" rel="self" type="application/rss+xml" />
	<link>http://eriksson.ws</link>
	<description>Coffee and a keyboard</description>
	<lastBuildDate>Wed, 01 Feb 2012 19:43:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Localstorage object storage</title>
		<link>http://eriksson.ws/2011/11/27/localstorage-object-storage/</link>
		<comments>http://eriksson.ws/2011/11/27/localstorage-object-storage/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 22:08:00 +0000</pubDate>
		<dc:creator>fen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[CoffeeScript]]></category>

		<guid isPermaLink="false">http://eriksson.ws:89/?p=202</guid>
		<description><![CDATA[Don’t remember where I got this snippet of code but it’s pretty useful so thanks to however wrote it . This script let’s you persist any javascript object in the localstorage with a key and a json string. if window.Storage and window.JSON window.$storage = (key) -&#62; set: (value) -&#62; localStorage.setItem(key, JSON.stringify(value)) get: -&#62; item = [...]]]></description>
			<content:encoded><![CDATA[<p>Don’t remember where I got this snippet of code but it’s pretty useful so thanks to however wrote it <img src='http://eriksson.ws/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .
<p>This script let’s you persist any javascript object in the localstorage with a key and a json string.
<pre class="code"><span style="color: blue">if </span>window.Storage and window.JSON
    window.$storage = (key) -&gt;
        set: (value) -&gt;
            localStorage.setItem(key, JSON.stringify(value))
        get: -&gt;
            item = localStorage.getItem(key)
            JSON.parse(item) <span style="color: blue">if </span>item
</pre>
<p>And it’s used as follows:
<pre class="code">$storage(<span style="color: maroon">'test'</span>).set({<span style="color: maroon">"hello"</span>: <span style="color: maroon">"world"</span>})
alert $storage(<span style="color: maroon">'test'</span>).get().hello
</pre>
]]></content:encoded>
			<wfw:commentRss>http://eriksson.ws/2011/11/27/localstorage-object-storage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 11 CSS3 Parser</title>
		<link>http://eriksson.ws/2011/10/12/visual-studio-11-css3-parser/</link>
		<comments>http://eriksson.ws/2011/10/12/visual-studio-11-css3-parser/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 22:05:00 +0000</pubDate>
		<dc:creator>fen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://eriksson.ws:89/?p=200</guid>
		<description><![CDATA[Was spelunking in the folders of my Visual Studio 11 installation a couple of weeks ago and found Microsoft.CSS.Core.dll (located in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\Web\CSS3). I was intrigued and needed to look deeper and what I found was a CSS parser that you can use from your application e.g. I needed a CSS [...]]]></description>
			<content:encoded><![CDATA[<p>Was spelunking in the folders of my Visual Studio 11 installation a couple of weeks ago and found <em>Microsoft.CSS.Core.dll</em> (located in <em>C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\Web\CSS3</em>).
<p>I was intrigued and needed to look deeper and what I found was a CSS parser that you can use from your application e.g. I needed a CSS unpacker (that turns a minimized CSS file into a readable format). With the built in formatter I was able to do this:
<pre class="code"><span style="color: blue">static void </span>Main(<span style="color: blue">string</span>[] args)
{
    <span style="color: blue">if </span>(args.Length &lt; 2)
    {
        Console.WriteLine(<span style="color: #a31515">"cssunpack [input] [output]"</span>);
        Environment.Exit(-1);
    }

    var parser = <span style="color: blue">new </span>CssParser();

    var css = parser.Parse(File.ReadAllText(args[0]),
                            insertComments: <span style="color: blue">false</span>);

    var formatter = <span style="color: blue">new </span>CssFormatter();
    File.WriteAllText(args[1], formatter.Format(css));
}
</pre>
<p>So if we do some small tweaks to the CssFormatterOptions we can build a minimizer as well:
<pre class="code"><span style="color: blue">static void </span>Main(<span style="color: blue">string</span>[] args)
{
    <span style="color: blue">if </span>(args.Length &lt; 2)
    {
        Console.WriteLine(<span style="color: #a31515">"csspack [input] [output]"</span>);
        Environment.Exit(-1);
    }

    var parser = <span style="color: blue">new </span>CssParser();

    var css = parser.Parse(File.ReadAllText(args[0]),
                            insertComments: <span style="color: blue">false</span>);

    var formatter = <span style="color: blue">new </span>CssFormatter
    {
        Options = <span style="color: blue">new </span>CssFormattingOptions
        {
            IndentType = IndentType.Spaces,
            IndentSize = 0,
            SpacesPerTab = 0,
            InitialIndentString = <span style="color: blue">string</span>.Empty,
            QuoteType = QuoteType.Double,
            BlockBracePosition = BracePosition.Compact,
            SortProperties = <span style="color: blue">false</span>,
            CompactBlocks = <span style="color: blue">false</span>,
            CompactBlockThreshold = 0,
            RemoveEscapes = <span style="color: blue">true</span>,
            ConvertColorsToHex = <span style="color: blue">true</span>,
            CompressColors = <span style="color: blue">true</span>,
            ElementSelectorCasing = Casing.Lowercase,
            PropertyNameCasing = Casing.Lowercase,
            RemoveLastSemicolon = <span style="color: blue">true</span>,
            IndentRuleHierarchy = <span style="color: blue">false</span>,
            ForStyleBlock = <span style="color: blue">true
        </span>}
    };
    File.WriteAllText(args[1], formatter.Format(css).Replace(Environment.NewLine, <span style="color: #a31515">""</span>));
}
</pre>
<p>There is a lot of more features so take a look for yourself.</p>
<p>I don’t know about the license but it’s probably ok to use on your local dev machine if you have VS11 installed.</p>
]]></content:encoded>
			<wfw:commentRss>http://eriksson.ws/2011/10/12/visual-studio-11-css3-parser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 8 Start Menu</title>
		<link>http://eriksson.ws/2011/09/15/windows-8-start-menu/</link>
		<comments>http://eriksson.ws/2011/09/15/windows-8-start-menu/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 14:59:53 +0000</pubDate>
		<dc:creator>fen</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[Windows 8]]></category>

		<guid isPermaLink="false">http://eriksson.ws:89/?p=206</guid>
		<description><![CDATA[At //BUILD/ some people are asking if it is possible to get the normal start menu back, and yes it is follow these instruction: NOTE: This is a hack and will break stuff. Launch Regedit Navigate to \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer Change RPEnabled from 1 to 0 Log out &#160;]]></description>
			<content:encoded><![CDATA[<p>At //BUILD/ some people are asking if it is possible to get the normal start menu back, and yes it is follow these instruction:</p>
<p><strong>NOTE:</strong> This is a hack and will break stuff.</p>
<p style="text-align: center;"><a href="http://eriksson.ws/wp-content/uploads/2012/01/regedit1.png"><img class="aligncenter  wp-image-208" title="regedit" src="http://eriksson.ws/wp-content/uploads/2012/01/regedit1.png" alt="" width="615" height="317" /></a></p>
<ol>
<li>Launch Regedit</li>
<li>Navigate to \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer</li>
<li>Change RPEnabled from 1 to 0</li>
<li>Log out</li>
</ol>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://eriksson.ws/2011/09/15/windows-8-start-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>//BUILD/ day -1</title>
		<link>http://eriksson.ws/2011/09/12/build-day-1/</link>
		<comments>http://eriksson.ws/2011/09/12/build-day-1/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 21:57:02 +0000</pubDate>
		<dc:creator>fen</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[//BUILD/]]></category>

		<guid isPermaLink="false">http://eriksson.ws:89/?p=188</guid>
		<description><![CDATA[So it’s Monday the conference starts tomorrow and I’m super stoked, to burn some time we went to the Citadel outlet doing some shopping and Starbucks coffee drinking. &#160; In the evening we where invited to the Microsoft Sweden meet up. It was a fun event, and everyone got matching jackets so all swedes can [...]]]></description>
			<content:encoded><![CDATA[<p>So it’s Monday the conference starts tomorrow and I’m super stoked, to burn some time we went to the Citadel outlet doing some shopping and Starbucks coffee drinking.</p>
<p><a href="http://eriksson.ws/wp-content/uploads/2011/09/citadel-outlet.jpg"><img class="aligncenter size-medium wp-image-204" title="citadel-outlet" src="http://eriksson.ws/wp-content/uploads/2011/09/citadel-outlet-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>&nbsp;</p>
<p>In the evening we where invited to the Microsoft Sweden meet up. It was a fun event, and everyone got matching jackets so all swedes can be singled out <img src='http://eriksson.ws/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<a href='http://eriksson.ws/2011/09/12/build-day-1/swe_party1/' title='swe_party1'><img width="150" height="150" src="http://eriksson.ws/wp-content/uploads/2012/01/swe_party1-150x150.jpg" class="attachment-thumbnail" alt="swe_party1" title="swe_party1" /></a>
<a href='http://eriksson.ws/2011/09/12/build-day-1/swe_party2/' title='swe_party2'><img width="150" height="150" src="http://eriksson.ws/wp-content/uploads/2012/01/swe_party2-150x150.jpg" class="attachment-thumbnail" alt="swe_party2" title="swe_party2" /></a>
<a href='http://eriksson.ws/2011/09/12/build-day-1/swe_party3/' title='swe_party3'><img width="150" height="150" src="http://eriksson.ws/wp-content/uploads/2012/01/swe_party3-150x150.jpg" class="attachment-thumbnail" alt="swe_party3" title="swe_party3" /></a>
<a href='http://eriksson.ws/2011/09/12/build-day-1/swe_party4/' title='swe_party4'><img width="150" height="150" src="http://eriksson.ws/wp-content/uploads/2012/01/swe_party4-150x150.jpg" class="attachment-thumbnail" alt="swe_party4" title="swe_party4" /></a>
<a href='http://eriksson.ws/2011/09/12/build-day-1/swe_party5/' title='swe_party5'><img width="150" height="150" src="http://eriksson.ws/wp-content/uploads/2012/01/swe_party5-150x150.jpg" class="attachment-thumbnail" alt="swe_party5" title="swe_party5" /></a>
<a href='http://eriksson.ws/2011/09/12/build-day-1/swe_party6/' title='swe_party6'><img width="150" height="150" src="http://eriksson.ws/wp-content/uploads/2012/01/swe_party6-150x150.jpg" class="attachment-thumbnail" alt="swe_party6" title="swe_party6" /></a>
<a href='http://eriksson.ws/2011/09/12/build-day-1/citadel-outlet/' title='citadel-outlet'><img width="150" height="150" src="http://eriksson.ws/wp-content/uploads/2011/09/citadel-outlet-150x150.jpg" class="attachment-thumbnail" alt="citadel-outlet" title="citadel-outlet" /></a>

]]></content:encoded>
			<wfw:commentRss>http://eriksson.ws/2011/09/12/build-day-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>//BUILD/ day -2</title>
		<link>http://eriksson.ws/2011/09/11/build-day-2/</link>
		<comments>http://eriksson.ws/2011/09/11/build-day-2/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 21:54:00 +0000</pubDate>
		<dc:creator>fen</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[//BUILD/]]></category>

		<guid isPermaLink="false">http://eriksson.ws:89/?p=186</guid>
		<description><![CDATA[Todays prebuild theme is jetlag, we have a lovely –9 hours time different from Sweden So we are spending the day at a shopping mall (a.ka Starbucks checking emails and twitter)]]></description>
			<content:encoded><![CDATA[<p>Todays prebuild theme is jetlag, we have a lovely –9 hours time different from Sweden <img src='http://eriksson.ws/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
<p>So we are spending the day at a shopping mall (a.ka Starbucks checking emails and twitter)
<p><a href="http://eriksson.ws/wp-content/uploads/2012/01/surf_stop.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="surf_stop" border="0" alt="surf_stop" src="http://eriksson.ws/wp-content/uploads/2012/01/surf_stop_thumb.jpg" width="644" height="484"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://eriksson.ws/2011/09/11/build-day-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Catching the Close button event</title>
		<link>http://eriksson.ws/2011/09/09/catching-the-close-button-event/</link>
		<comments>http://eriksson.ws/2011/09/09/catching-the-close-button-event/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 14:43:00 +0000</pubDate>
		<dc:creator>fen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://eriksson.ws:89/?p=56</guid>
		<description><![CDATA[Got a question yesterday how to get an event when a user clicks the close button in a console app. This code snippet is what I have used. class Application { static Application() { SetConsoleCtrlHandler(Handler, true); } public static event Action Close; public static event Action Break; public static event Action CtrlC; public static event [...]]]></description>
			<content:encoded><![CDATA[<p>Got a question yesterday how to get an event when a user clicks the close button in a console app. This code snippet is what I have used.</p>
<pre class="code"><span style="color: blue">class </span><span style="color: #00008b">Application
</span>{
    <span style="color: blue">static </span><span style="color: #00008b">Application</span>()
    {
        <span style="color: #008b8b">SetConsoleCtrlHandler</span>(<span style="color: #008b8b">Handler</span>, <span style="color: blue">true</span>);
    }

    <span style="color: blue">public static event </span><span style="color: #00008b">Action </span><span style="color: magenta">Close</span>;

    <span style="color: blue">public static event </span><span style="color: #00008b">Action </span><span style="color: magenta">Break</span>;

    <span style="color: blue">public static event </span><span style="color: #00008b">Action </span><span style="color: magenta">CtrlC</span>;

    <span style="color: blue">public static event </span><span style="color: #00008b">Action </span><span style="color: magenta">LogOff</span>;

    <span style="color: blue">public static event </span><span style="color: #00008b">Action </span><span style="color: magenta">Shutdown</span>;

    [<span style="color: #00008b">DllImport</span>(<span style="color: #a31515">"Kernel32"</span>)]
    <span style="color: blue">private static extern bool </span><span style="color: #008b8b">SetConsoleCtrlHandler</span>(<span style="color: #00008b">HandlerRoutine </span>handler, <span style="color: blue">bool </span>add);

    <span style="color: blue">private delegate bool </span><span style="color: #00008b">HandlerRoutine</span>(<span style="color: #00008b">CtrlTypes </span>CtrlType);

    <span style="color: blue">private enum </span><span style="color: #00008b">CtrlTypes
    </span>{
        <span style="color: purple">CTRL_C_EVENT </span>= 0,
        <span style="color: purple">CTRL_BREAK_EVENT</span>,
        <span style="color: purple">CTRL_CLOSE_EVENT</span>,
        <span style="color: purple">CTRL_LOGOFF_EVENT </span>= 5,
        <span style="color: purple">CTRL_SHUTDOWN_EVENT
    </span>}

    <span style="color: blue">private static bool </span><span style="color: #008b8b">Handler</span>(<span style="color: #00008b">CtrlTypes </span>ctrlType)
    {
        <span style="color: blue">switch </span>(ctrlType)
        {
            <span style="color: blue">case </span><span style="color: #00008b">CtrlTypes</span>.<span style="color: purple">CTRL_C_EVENT</span>:
                <span style="color: blue">if </span>(<span style="color: magenta">CtrlC </span>!= <span style="color: blue">null</span>)
                    <span style="color: magenta">CtrlC</span>();
                <span style="color: blue">break</span>;
            <span style="color: blue">case </span><span style="color: #00008b">CtrlTypes</span>.<span style="color: purple">CTRL_BREAK_EVENT</span>:
                <span style="color: blue">if </span>(<span style="color: magenta">Break </span>!= <span style="color: blue">null</span>)
                    <span style="color: magenta">Break</span>();
                <span style="color: blue">break</span>;
            <span style="color: blue">case </span><span style="color: #00008b">CtrlTypes</span>.<span style="color: purple">CTRL_CLOSE_EVENT</span>:
                <span style="color: blue">if </span>(<span style="color: magenta">Close </span>!= <span style="color: blue">null</span>)
                    <span style="color: magenta">Close</span>();
                <span style="color: blue">break</span>;
            <span style="color: blue">case </span><span style="color: #00008b">CtrlTypes</span>.<span style="color: purple">CTRL_LOGOFF_EVENT</span>:
                <span style="color: blue">if </span>(<span style="color: magenta">LogOff </span>!= <span style="color: blue">null</span>)
                    <span style="color: magenta">LogOff</span>();
                <span style="color: blue">break</span>;
            <span style="color: blue">case </span><span style="color: #00008b">CtrlTypes</span>.<span style="color: purple">CTRL_SHUTDOWN_EVENT</span>:
                <span style="color: blue">if </span>(<span style="color: magenta">Shutdown </span>!= <span style="color: blue">null</span>)
                    <span style="color: magenta">Shutdown</span>();
                <span style="color: blue">break</span>;
            <span style="color: blue">default</span>:
                <span style="color: blue">throw new </span><span style="color: #00008b">ArgumentOutOfRangeException</span>(<span style="color: #a31515">"ctrlType"</span>);
        }
        <span style="color: blue">return true</span>;
    }
}
</pre>
<p>And it’s used as follows.</p>
<pre class="code"><span style="color: blue">static void </span><span style="color: #008b8b">Main</span>()
{
    <span style="color: #00008b">Application</span>.<span style="color: magenta">Close </span><span style="color: #008b8b">+= </span>() =&gt;
    {
        <span style="color: #00008b">Debugger</span>.<span style="color: #008b8b">Break</span>();
    };

    <span style="color: #00008b">Console</span>.<span style="color: #008b8b">ReadKey</span>();
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://eriksson.ws/2011/09/09/catching-the-close-button-event/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Close database connections from TSQL</title>
		<link>http://eriksson.ws/2011/09/02/close-database-connections-from-tsql/</link>
		<comments>http://eriksson.ws/2011/09/02/close-database-connections-from-tsql/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 13:40:00 +0000</pubDate>
		<dc:creator>fen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://eriksson.ws:89/?p=63</guid>
		<description><![CDATA[I always forget how to do this so I thought someone else probably have the same issue alter database DatabaseName set single_user with rollback immediate go]]></description>
			<content:encoded><![CDATA[<p>I always forget how to do this so I thought someone else probably have the same issue <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://eriksson.ws:89/wp-content/uploads/2012/01/wlEmoticon-smile.png"></p>
<pre>alter database DatabaseName set single_user with rollback immediate
go</pre>
]]></content:encoded>
			<wfw:commentRss>http://eriksson.ws/2011/09/02/close-database-connections-from-tsql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GodModes in Windows 7</title>
		<link>http://eriksson.ws/2011/09/01/godmodes-in-windows-7/</link>
		<comments>http://eriksson.ws/2011/09/01/godmodes-in-windows-7/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 12:44:00 +0000</pubDate>
		<dc:creator>fen</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://eriksson.ws:89/?p=77</guid>
		<description><![CDATA[GodMode is a undocumented feature in Windows 7 that gives you direct access to all kind of different settings in windows. The most popular is the&#160; folder view of all available commands in the Control Panel. To get access to this you need to do the following. Create a new folder Name the folder: GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://eriksson.ws/wp-content/uploads/2012/01/GodMode-icon.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="GodMode icon" border="0" alt="GodMode icon" align="right" src="http://eriksson.ws/wp-content/uploads/2012/01/GodMode-icon_thumb.png" width="240" height="197"></a>GodMode is a undocumented feature in Windows 7 that gives you direct access to all kind of different settings in windows. The most popular is the&nbsp; folder view of all available commands in the Control Panel. To get access to this you need to do the following.</p>
<ol>
<li>Create a new folder
<li>Name the folder: <strong>GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}</strong></li>
</ol>
<p>Now when you open the folder you will get the following folder view:</p>
<p><a href="http://eriksson.ws:89/wp-content/uploads/2012/01/GodMode.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="GodMode" border="0" alt="GodMode" src="http://eriksson.ws/wp-content/uploads/2012/01/GodMode_thumb.png" width="487" height="714"></a></p>
<p>Bellow is a list of other direct access folders that you can create as the one above.</p>
<ul>
<li>ControlPanel.{ED7BA470-8E54-465E-825C-99712043E01C}
<li>LocationSensor.{00C6D95F-329C-409a-81D7-C46C66EA7F33}
<li>BiometricDevice.{0142e4d0-fb7a-11dc-ba4a-000ffe7ab428}
<li>PowerOptions.{025A5937-A6BE-4686-A844-36FE4BEC8B6D}
<li>TaskbarIcons.{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}
<li>Credentials.{1206F5F1-0569-412C-8FEC-3204630DFB70}
<li>InstallFromNetwork.{15eae92e-f17a-4431-9f28-805e482dafd4}
<li>DefaultPrograms.{17cd9488-1228-4b2f-88ce-4298e93e0966}
<li>PublicKeys.{1D2680C9-0E2A-469d-B787-065558BC7D43}
<li>WifiNetworks.{1FA9085F-25A2-489B-85D4-86326EEDCD87}
<li>Network.{208D2C60-3AEA-1069-A2D7-08002B30309D}
<li>Computer.{20D04FE0-3AEA-1069-A2D8-08002B30309D}
<li>Printers.{2227A280-3AEA-1069-A2DE-08002B30309D}
<li>WorkplaceConnetions.{241D7C96-F8BF-4F85-B01F-E2B043341A4B}
<li>Firewall.{4026492F-2F69-46B8-B9BF-5654FC07E423}
<li>PerformanceRatings.{78F3955E-3B90-4184-BD14-5397C15F1EFC}</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://eriksson.ws/2011/09/01/godmodes-in-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Frame rate counters in WP7</title>
		<link>http://eriksson.ws/2011/08/31/frame-rate-counters-in-wp7/</link>
		<comments>http://eriksson.ws/2011/08/31/frame-rate-counters-in-wp7/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 12:40:00 +0000</pubDate>
		<dc:creator>fen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://eriksson.ws:89/?p=10</guid>
		<description><![CDATA[1. Render Thread FPS The number of frames per second that the independent simple animations and rendering thread is using. Keeping around 60 will provide a great experience, while a number of 30 fps will begin to show a poor experience to the end user. 2. User Interface Thread FPS The number of fps that [...]]]></description>
			<content:encoded><![CDATA[<p><strong>1. Render Thread FPS<img class="alignright" style="margin: 0px 0px 0px 14px;" src="http://eriksson.ws/wp-content/uploads/2012/01/wp7-perf2_thumb.png" alt="" width="67" height="372" /></strong><br />
The number of frames per second that the independent simple animations and rendering thread is using. Keeping around 60 will provide a great experience, while a number of 30 fps will begin to show a poor experience to the end user.<br />
<strong>2. User Interface Thread FPS</strong><br />
The number of fps that the primary user interface thread is experiencing. Property change notifications, data binding, primary managed code execution, and animations not handled on the render thread use this threads resources.<br />
<strong>3. Textual Memory Usage</strong><br />
A specialized memory counter indicating the video memory used for storing application textures.<br />
<strong>4. Surface Counter</strong><br />
A counter of the number of surfaces that are passed to the graphics chip<br />
<strong>5. Intermediate Texture Count</strong><br />
The number of intermediate textures created for compositing.<br />
<strong>6.Screen Fill Rate</strong><br />
A metric representing the number of complete phone screens being painted each and every frame.</p>
<table width="472" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="100"><strong>Counter</strong></td>
<td valign="top" width="119"><strong>Ideal Minimum</strong></td>
<td valign="top" width="124"><strong>Best Experience</strong></td>
<td valign="top" width="127"><strong>Theoretical Max</strong></td>
</tr>
<tr>
<td valign="top" width="100">Render Thread</td>
<td align="center" valign="top" width="119">30 fps</td>
<td align="center" valign="top" width="124">60 fps</td>
<td align="center" valign="top" width="127">120 fps</td>
</tr>
<tr>
<td valign="top" width="100">UI Thread</td>
<td align="center" valign="top" width="119">15 fps</td>
<td align="center" valign="top" width="124">&gt; 15 fps</td>
<td align="center" valign="top" width="127">120 fps</td>
</tr>
<tr>
<td valign="top" width="100">Screen Fill Rate</td>
<td valign="top" width="119"></td>
<td align="center" valign="top" width="124">&lt;= 2.0</td>
<td align="center" valign="top" width="127">N/A</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://eriksson.ws/2011/08/31/frame-rate-counters-in-wp7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Relative paths and Windows Services</title>
		<link>http://eriksson.ws/2011/08/30/relative-paths-and-windows-services/</link>
		<comments>http://eriksson.ws/2011/08/30/relative-paths-and-windows-services/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 21:52:00 +0000</pubDate>
		<dc:creator>fen</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://eriksson.ws:89/?p=182</guid>
		<description><![CDATA[So you have converted your console app to a Windows Service but now all your relative paths is relative to C:\Windows\system32 (or c:\Windows\SysWOW64) . This is because your service is executed by svchost.exe that is located in C:\Windows\system32 (or svchost.exe located in c:\Windows\SysWOW64 if you run a 32bit service on a 64bit Windows) and therefore [...]]]></description>
			<content:encoded><![CDATA[<p>So you have converted your console app to a Windows Service but now all your relative paths is relative to C:\Windows\system32 (or c:\Windows\SysWOW64) <img src='http://eriksson.ws/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> .</p>
<p>This is because your service is executed by svchost.exe that is located in C:\Windows\system32 (or svchost.exe located in c:\Windows\SysWOW64 if you run a 32bit service on a 64bit Windows) and therefore has it as executing directory.</p>
<p>To resolve this I usually use the ResolvePath method bellow:</p>
<pre class="code"><span style="color: blue">public static string </span>ResolvePath(<span style="color: blue">string </span>path)
{
    <span style="color: blue">if </span>(!Path.IsPathRooted(path))
    {
        var executingAsmPath = <span style="color: blue">new </span>UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path;
        var directoryName = Path.GetDirectoryName(Uri.UnescapeDataString(executingAsmPath));
        path = Path.Combine(directoryName, path);
    }
    <span style="color: blue">return </span>path;
}
</pre>
<p>either resolving the path directly:</p>
<pre class="code"><span style="color: blue">string </span>logPath = ResolvePath(<span style="color: #a31515">@".\log.txt"</span>);
</pre>
<p>or changing the current directory:</p>
<pre class="code">Directory.SetCurrentDirectory(ResolvePath(<span style="color: #a31515">""</span>));
</pre>
]]></content:encoded>
			<wfw:commentRss>http://eriksson.ws/2011/08/30/relative-paths-and-windows-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

