<?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>Dmitko.ru</title>
	<atom:link href="http://dmitko.ru/feed/" rel="self" type="application/rss+xml" />
	<link>http://dmitko.ru</link>
	<description>Dmitry Kopylov&#039;s blog</description>
	<lastBuildDate>Fri, 23 Dec 2011 07:35:12 +0000</lastBuildDate>
	<language>ru</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Powershell: handy links</title>
		<link>http://dmitko.ru/ps/</link>
		<comments>http://dmitko.ru/ps/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 06:31:16 +0000</pubDate>
		<dc:creator>dmitko</dc:creator>
				<category><![CDATA[Без рубрики]]></category>

		<guid isPermaLink="false">http://dmitko.ru/?p=655</guid>
		<description><![CDATA[Enable Script Support Enable and Use Remote Commands in Windows PowerShell How to create a PSCredential object Remoting Out of Memory Exception PowerShell V2 Remoting on Workgroup Joined Computers]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://www.tech-recipes.com/rx/2513/powershell_enable_script_support/" target="_blank">Enable Script Support</a></li>
<li><a href="http://technet.microsoft.com/en-us/magazine/ff700227.aspx" target="_blank">Enable and Use Remote Commands in Windows PowerShell</a></li>
<li><a href="http://blogs.msdn.com/b/koteshb/archive/2010/02/13/powershell-creating-a-pscredential-object.aspx">How to create a PSCredential object</a></li>
<li><a href="http://get-powershell.com/post/2009/03/17/Remoting-Out-of-Memory-Exception.aspx" target="_blank">Remoting Out of Memory Exception</a></li>
<li><a href="https://rkeithhill.wordpress.com/2009/05/02/powershell-v2-remoting-on-workgroup-joined-computers-%E2%80%93-yes-it-can-be-done/" target="_blank">PowerShell V2 Remoting on Workgroup Joined Computers</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dmitko.ru/ps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run integration tests with TFS2010. Part 1.</title>
		<link>http://dmitko.ru/run-integration-tests-with-tfs2010-part-1/</link>
		<comments>http://dmitko.ru/run-integration-tests-with-tfs2010-part-1/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 08:02:00 +0000</pubDate>
		<dc:creator>dmitko</dc:creator>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[nunit]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[tfs]]></category>

		<guid isPermaLink="false">http://dmitko.ru/?p=647</guid>
		<description><![CDATA[Last week I was working on automation of regression tests for our product. We have some NUnit tests that were run manually by nunit console on the virtual machine with our product installed. The goal was to automate this process and store results somewhere. We use TFS 2010 and did not want to bring another [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I was working on automation of regression tests for our product. We have some NUnit tests that were run manually by nunit console on the virtual machine with our product installed. The goal was to automate this process and store results somewhere. We use TFS 2010 and did not want to bring another third party tool for continuous integration process on the other hand we wanted to use the existing tests and bring minimum change to them.</p>
<ol>
<li>We decided to create a new build definition that will run tests remotely and publish test results to the TFS.</li>
<li>To run tests remotely we decided to use <strong>Powershell</strong> with <em>invoke-command -computername</em> to run powershell script which can call NUnit.</li>
<li>To be able to publish NUnit&#8217;s test results, an xslt tranformation is needed which can be taken from <a href="http://nunit4teambuild.codeplex.com" target="_blank">nunit4teambuild.codeplex.com</a></li>
</ol>
<p>I will write separate posts for each of this steps in a short time as there were some challenges on each step.</p>
]]></content:encoded>
			<wfw:commentRss>http://dmitko.ru/run-integration-tests-with-tfs2010-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Client performance: enabling KeepAlive</title>
		<link>http://dmitko.ru/client-performance-enabling-keepalive/</link>
		<comments>http://dmitko.ru/client-performance-enabling-keepalive/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 05:51:37 +0000</pubDate>
		<dc:creator>dmitko</dc:creator>
				<category><![CDATA[Optimization]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://dmitko.ru/?p=620</guid>
		<description><![CDATA[The Keep-Alive extension to HTTP/1.0 and the persistent connection feature of HTTP/1.1 provide long-lived HTTP sessions which allow multiple requests to be sent over the same TCP connection. In some cases this has been shown to result in an almost 50% speedup in latency times for HTML documents with many images. (source) Apache configuration: KeepAlive [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>The Keep-Alive extension to HTTP/1.0 and the persistent connection feature of HTTP/1.1 provide long-lived HTTP sessions which allow multiple requests to be sent over the same TCP connection. In some cases this has been shown to result in an almost 50% speedup in latency times for HTML documents with many images. (<a href="http://httpd.apache.org/docs/2.0/mod/core.html#keepalive" target="_blank">source</a>)</p></blockquote>
<p>Apache configuration:</p>
<pre><code>
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout  5
</code></pre>
<p><strong><span style="text-decoration: underline;">Before KeepAlive:</span></strong></p>
<p><a href="http://gdestop.ru">http://gdestop.ru</a>:</p>
<p><img class="aligncenter size-full wp-image-617" title="gdestop" src="http://dmitko.ru/wp-content/uploads/2011/06/gdestop1.png" alt="gdestop" width="725" height="114" /></p>
<p><a href="http://gdestop.ru/adler/">http://gdestop.ru/adler</a>:</p>
<p><img class="aligncenter size-full wp-image-615" title="adler" src="http://dmitko.ru/wp-content/uploads/2011/06/adler1.png" alt="adler" width="724" height="111" /></p>
<p><a href="http://gdestop.ru/anapa/view/492/">http://gdestop.ru/anapa/view/492</a>:</p>
<p><img class="aligncenter size-full wp-image-616" title="hotel" src="http://dmitko.ru/wp-content/uploads/2011/06/hotel1.png" alt="hotel" width="734" height="113" /></p>
<p><strong><span style="text-decoration: underline;">Before KeepAlive:</span></strong></p>
<p><a href="http://gdestop.ru">http://gdestop.ru</a>:</p>
<p><img class="aligncenter size-full wp-image-621" title="gdestop" src="http://dmitko.ru/wp-content/uploads/2011/06/gdestop2.png" alt="gdestop" width="725" height="111" /></p>
<p><a href="http://gdestop.ru/adler/">http://gdestop.ru/adler</a>:</p>
<p><img class="aligncenter size-full wp-image-622" title="adler" src="http://dmitko.ru/wp-content/uploads/2011/06/adler2.png" alt="adler" width="724" height="114" /></p>
<p><a href="http://gdestop.ru/anapa/view/492/">http://gdestop.ru/anapa/view/492</a>:</p>
<p><img class="aligncenter size-full wp-image-623" title="hotel" src="http://dmitko.ru/wp-content/uploads/2011/06/hotel2.png" alt="hotel" width="730" height="113" /></p>
<p>For some pages enabling KeepAlive worked out better fot some worse, but generally it&#8217;s recommended to enable KeepAlive. My additional advice is to monitor server&#8217;s resource usage after each reconfiguration.</p>
]]></content:encoded>
			<wfw:commentRss>http://dmitko.ru/client-performance-enabling-keepalive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Client performance: adding gzip compression</title>
		<link>http://dmitko.ru/client-performance-adding-gzip-compression/</link>
		<comments>http://dmitko.ru/client-performance-adding-gzip-compression/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 06:10:52 +0000</pubDate>
		<dc:creator>dmitko</dc:creator>
				<category><![CDATA[gdestop.ru]]></category>
		<category><![CDATA[Optimization]]></category>

		<guid isPermaLink="false">http://dmitko.ru/?p=612</guid>
		<description><![CDATA[As a continuation of client side optimization let&#8217;s now find out how enabling gzip compression between server and client affects page loading. First, one needs to enable mod_gzip for Apache (I&#8217;m using it) and configure it the proper way. Usually it&#8217;s reasonable to compress text content such as css or js files, as well as [...]]]></description>
			<content:encoded><![CDATA[<p>As a continuation of client side optimization let&#8217;s now find out how enabling gzip compression between server and client affects page loading.</p>
<p>First, one needs to enable mod_gzip for Apache (I&#8217;m using it) and configure it the proper way. Usually it&#8217;s reasonable to compress text content such as css or js files, as well as html response. Compressing images is usually considered as waste of CPU, so we should not allow it.</p>
<p>Here is my mod_gzip configuration file (thanks to <a href="http://roneiv.wordpress.com/2008/08/22/mod_gzip-how-to-make-configuration-work-for-apache-13-mod_jk-and-jbossjsf/">this post</a>):</p>
<pre><code>
mod_gzip_on                   Yes
mod_gzip_can_negotiate        Yes
mod_gzip_static_suffix        .gz
AddEncoding              gzip .gz
mod_gzip_update_static        No
mod_gzip_command_version      '/mod_gzip_status'
mod_gzip_temp_dir             /tmp
mod_gzip_keep_workfiles       No
mod_gzip_minimum_file_size    300
mod_gzip_maximum_file_size    500000
mod_gzip_maximum_inmem_size   60000
mod_gzip_min_http             1000
mod_gzip_handle_methods        GET POST
mod_gzip_dechunk              Yes
mod_gzip_send_vary            On

#Files and items to compress
mod_gzip_item_include         file       \.html$
mod_gzip_item_include         file       \.htm$
mod_gzip_item_include         file       \.js$
mod_gzip_item_include         file       \.js
mod_gzip_item_include         file       \.faces
mod_gzip_item_include         file       \.css$
mod_gzip_item_include         file       \.jsp$
mod_gzip_item_include         file       \.jsp

mod_gzip_item_include         uri        \.jsp$
mod_gzip_item_include         uri        \.jsp

mod_gzip_item_include         handler    \.*
mod_gzip_item_include         handler    \.*$

mod_gzip_item_include         mime       ^text/html$
mod_gzip_item_include         mime       ^text/html
mod_gzip_item_include         mime       ^text/plain
mod_gzip_item_include         mime       ^text/plain$
mod_gzip_item_include         mime       ^text/xml$
mod_gzip_item_include         mime       ^text/css$
mod_gzip_item_include         mime       ^text/javascript$
mod_gzip_item_include         mime       ^text/javascript
mod_gzip_item_include         mime       ^application/x-javascript$
mod_gzip_item_include         mime       ^application/javascript$
</code></pre>
<p>also this file has to be included in the apache configuration file by using the <em>Include </em>statement. To make a django application sending compressed response, the middleware list must contain <em>django.middleware.gzip.GZipMiddleware</em> in settings.py:</p>
<pre><code>MIDDLEWARE_CLASSES = (
	'django.middleware.gzip.GZipMiddleware',
        'django.middleware.common.CommonMiddleware',
...
)</code></pre>
<p>After doing that a Firebug can be used to see that content is compressed by the response headers:</p>
<p><img class="aligncenter size-full wp-image-613" title="ffgzip" src="http://dmitko.ru/wp-content/uploads/2011/06/ffgzip.png" alt="ffgzip" width="556" height="122" /></p>
<p>Now lets run TestWebPage against my key pages from the <a href="http://dmitko.ru/?p=586">previous post</a>:</p>
<p><span style="text-decoration: underline;"><strong>Before gzip</strong></span></p>
<p><a href="http://gdestop.ru/anapa/view/492/">http://gdestop.ru</a>:</p>
<p><img class="aligncenter size-full wp-image-603" title="gdestop-cdn" src="http://dmitko.ru/wp-content/uploads/2011/06/gdestop-cdn.png" alt="gdestop-cdn" width="724" height="116" /></p>
<p><a href="http://gdestop.ru/adler/">http://gdestop.ru/adler</a>:</p>
<p><img class="aligncenter size-full wp-image-604" title="adler-cdn" src="http://dmitko.ru/wp-content/uploads/2011/06/adler-cdn.png" alt="adler-cdn" width="722" height="109" /></p>
<p><a href="http://gdestop.ru/anapa/view/492/">http://gdestop.ru/anapa/view/492</a>:</p>
<p><img class="aligncenter size-full wp-image-605" title="hotel-cdn" src="http://dmitko.ru/wp-content/uploads/2011/06/hotel-cdn.png" alt="hotel-cdn" width="732" height="110" /></p>
<p><strong><span style="text-decoration: underline;">After gzip:</span></strong></p>
<p><a href="http://gdestop.ru/anapa/view/492/">http://gdestop.ru</a>:</p>
<p><img class="aligncenter size-full wp-image-617" title="gdestop" src="http://dmitko.ru/wp-content/uploads/2011/06/gdestop1.png" alt="gdestop" width="725" height="114" /></p>
<p><a href="http://gdestop.ru/adler/">http://gdestop.ru/adler</a>:</p>
<p><img class="aligncenter size-full wp-image-615" title="adler" src="http://dmitko.ru/wp-content/uploads/2011/06/adler1.png" alt="adler" width="724" height="111" /></p>
<p><a href="http://gdestop.ru/anapa/view/492/">http://gdestop.ru/anapa/view/492</a>:</p>
<p><img class="aligncenter size-full wp-image-616" title="hotel" src="http://dmitko.ru/wp-content/uploads/2011/06/hotel1.png" alt="hotel" width="734" height="113" /></p>
<p>So, we have very good results for the root page, and resort&#8217;s page. Hotel&#8217;s page did get such a good boost because when I moved all common scripts to CDN, they became compressed by CDN.</p>
]]></content:encoded>
			<wfw:commentRss>http://dmitko.ru/client-performance-adding-gzip-compression/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Up to 30% loding page faster by using CDN</title>
		<link>http://dmitko.ru/up-to-30-loding-page-faster-by-using-cdn/</link>
		<comments>http://dmitko.ru/up-to-30-loding-page-faster-by-using-cdn/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 07:04:45 +0000</pubDate>
		<dc:creator>dmitko</dc:creator>
				<category><![CDATA[gdestop.ru]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[cdn]]></category>

		<guid isPermaLink="false">http://dmitko.ru/?p=586</guid>
		<description><![CDATA[I decided to begin client optimization for http://gdestop.ru First I&#8217;ve become really interested in it and second now over 1700 unique visitors come every day, so it would be nice to care about them and decrease page loading time. To be able compare the optimization results, I&#8217;ve run WebPagetest for three key pages (all of [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to begin client optimization for <a href="http://gdestop.ru/">http://gdestop.ru</a> First I&#8217;ve become really interested in it and second now over 1700 unique visitors come every day, so it would be nice to care about them and decrease page loading time.<br />
To be able compare the optimization results, I&#8217;ve run WebPagetest for three key pages (all of them in Russian, so sorry for non-Russian speakers): <a href="http://gdestop.ru">http://gdestop.ru</a> (the root page &#8212; does not have many scripts comparing to others), <a href="http://gdestop.ru/adler/">http://gdestop.ru/adler/</a> &#8212; (resort&#8217;s page &#8212; has jQuery UI + YUI data table) and <a href="http://gdestop.ru/anapa/view/492/">http://gdestop.ru/anapa/view/492/</a> &#8212; a typical hotel&#8217;s page with lots of jQuery UI plugins + YUI, the heaviest one. Tests were run for Moscow, IE8 :</p>
<p><a href="http://gdestop.ru/anapa/view/492/">http://gdestop.ru</a>:</p>
<p><img class="aligncenter size-full wp-image-599" title="gdestop" src="http://dmitko.ru/wp-content/uploads/2011/06/gdestop.png" alt="gdestop" width="734" height="115" /></p>
<p><a href="http://gdestop.ru/adler/">http://gdestop.ru/adler</a>:</p>
<p><img class="aligncenter size-full wp-image-601" title="adler" src="http://dmitko.ru/wp-content/uploads/2011/06/adler.png" alt="adler" width="737" height="115" /></p>
<p><a href="http://gdestop.ru/anapa/view/492/">http://gdestop.ru/anapa/view/492</a>:</p>
<p><img class="aligncenter size-full wp-image-602" title="hotel" src="http://dmitko.ru/wp-content/uploads/2011/06/hotel.png" alt="hotel" width="747" height="112" /></p>
<p>Not the best results though, but I really did not care much about client side optimization. All scripts were hosted locally and let&#8217;s see how things change if I move common scripts (jQuery, jQuery Ui, YUI) to CDN. I decided to use Yandex CDN <a href="http://api.yandex.ru/jslibs/">http://api.yandex.ru/jslibs/</a> as for Russia I believe this is the most appropriate.</p>
<p><a href="http://gdestop.ru/anapa/view/492/">http://gdestop.ru</a>:</p>
<p><img class="aligncenter size-full wp-image-603" title="gdestop-cdn" src="http://dmitko.ru/wp-content/uploads/2011/06/gdestop-cdn.png" alt="gdestop-cdn" width="724" height="116" /></p>
<p><a href="http://gdestop.ru/adler/">http://gdestop.ru/adler</a>:</p>
<p><img class="aligncenter size-full wp-image-604" title="adler-cdn" src="http://dmitko.ru/wp-content/uploads/2011/06/adler-cdn.png" alt="adler-cdn" width="722" height="109" /></p>
<p><a href="http://gdestop.ru/anapa/view/492/">http://gdestop.ru/anapa/view/492</a>:</p>
<p><img class="aligncenter size-full wp-image-605" title="hotel-cdn" src="http://dmitko.ru/wp-content/uploads/2011/06/hotel-cdn.png" alt="hotel-cdn" width="732" height="110" /></p>
<p>As we can see, moving to CDN made 30% faster first view for the root page and hotel&#8217;s which is a really great result for such a little effort.</p>
<p>To be continued&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://dmitko.ru/up-to-30-loding-page-faster-by-using-cdn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Add global ajax event handlers with jQuery</title>
		<link>http://dmitko.ru/howto-add-global-ajax-event-handlers-with-jquery/</link>
		<comments>http://dmitko.ru/howto-add-global-ajax-event-handlers-with-jquery/#comments</comments>
		<pubDate>Mon, 30 May 2011 07:16:22 +0000</pubDate>
		<dc:creator>dmitko</dc:creator>
				<category><![CDATA[FYI]]></category>

		<guid isPermaLink="false">http://dmitko.ru/?p=580</guid>
		<description><![CDATA[Task: add global state for selenium tests to wait for when ui is very ajax based. //javascript var _Busy = false; function setBusy(flag) { _Busy = flag; } function isBusy() { return _Busy; } $(document).ajaxStart(function () { setBusy(true); }); $(document).ajaxStop(function () { setBusy(false); }); //C# - selenium wrapper public void WaitForUiReady() { _selenium.WaitForCondition("selenium.browserbot.getUserWindow().isBusy() == false", [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Task</strong>: add global state for selenium tests to wait for when ui is very ajax based.</p>
<pre><code>
//javascript

var _Busy = false;

function setBusy(flag) {
    _Busy = flag;
}

function isBusy() {
    return _Busy;
}

$(document).ajaxStart(function () {
    setBusy(true);
});

$(document).ajaxStop(function () {
    setBusy(false);
});

//C# - selenium wrapper

public void WaitForUiReady()
{
    _selenium.WaitForCondition("selenium.browserbot.getUserWindow().isBusy() == false", PageLoadTimeOut);
}
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://dmitko.ru/howto-add-global-ajax-event-handlers-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Required field visualization with Html.LabelFor</title>
		<link>http://dmitko.ru/howto-required-field-visualizing-with-html-labelfor/</link>
		<comments>http://dmitko.ru/howto-required-field-visualizing-with-html-labelfor/#comments</comments>
		<pubDate>Mon, 16 May 2011 07:45:39 +0000</pubDate>
		<dc:creator>dmitko</dc:creator>
				<category><![CDATA[ASP MVC]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[LabelFor]]></category>
		<category><![CDATA[required]]></category>

		<guid isPermaLink="false">http://dmitko.ru/?p=576</guid>
		<description><![CDATA[Based on http://weblogs.asp.net/raduenuca/archive/2011/02/17/asp-net-mvc-display-visual-hints-for-the-required-fields-in-your-model.aspx My solution: namespace WebUI.Extensions { public static class LabelExtensions { public static MvcHtmlString LabelForEx(this HtmlHelper helper, Expression&#38;gt; expression) { var metaData = ModelMetadata.FromLambdaExpression(expression, helper.ViewData); string htmlFieldName = ExpressionHelper.GetExpressionText(expression); string labelText = metaData.DisplayName ?? metaData.PropertyName ?? htmlFieldName.Split('.').Last(); if (String.IsNullOrEmpty(labelText)) return MvcHtmlString.Empty; var label = new TagBuilder("label"); label.Attributes.Add("for", helper.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldId(htmlFieldName)); bool isRequired = metaData.ContainerType.GetProperty(metaData.PropertyName) .GetCustomAttributes(typeof (RequiredAttribute), [...]]]></description>
			<content:encoded><![CDATA[<p>Based on <a href="http://weblogs.asp.net/raduenuca/archive/2011/02/17/asp-net-mvc-display-visual-hints-for-the-required-fields-in-your-model.aspx">http://weblogs.asp.net/raduenuca/archive/2011/02/17/asp-net-mvc-display-visual-hints-for-the-required-fields-in-your-model.aspx</a> My solution:</p>
<pre><code>namespace WebUI.Extensions
{
    public static class LabelExtensions
    {
        public static MvcHtmlString LabelForEx(this HtmlHelper helper, Expression&amp;gt; expression)
        {
            var metaData = ModelMetadata.FromLambdaExpression(expression, helper.ViewData);

            string htmlFieldName = ExpressionHelper.GetExpressionText(expression);
            string labelText = metaData.DisplayName ?? metaData.PropertyName ?? htmlFieldName.Split('.').Last();            

            if (String.IsNullOrEmpty(labelText))
                return MvcHtmlString.Empty;

            var label = new TagBuilder("label");
            label.Attributes.Add("for", helper.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldId(htmlFieldName));

            bool isRequired =
                metaData.ContainerType.GetProperty(metaData.PropertyName)
                    .GetCustomAttributes(typeof (RequiredAttribute), false)
                    .Length == 1;

            if (isRequired)
                label.Attributes.Add("class", "required");

            label.SetInnerText(labelText);
            return MvcHtmlString.Create(label.ToString());
        }
    }
}</code></pre>
<pre><code>label.required:after {
    color: red;
    content: "*";
}</code></pre>
<pre><code>&amp;lt;%= Html.LabelForEx(model =&amp;gt; model.FieldName)%&amp;gt;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://dmitko.ru/howto-required-field-visualizing-with-html-labelfor/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HOWTO: Integrate Visual Studio and DiffMerge</title>
		<link>http://dmitko.ru/howto-integrate-visual-studio-and-diffmerge/</link>
		<comments>http://dmitko.ru/howto-integrate-visual-studio-and-diffmerge/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 12:59:45 +0000</pubDate>
		<dc:creator>dmitko</dc:creator>
				<category><![CDATA[FYI]]></category>
		<category><![CDATA[На заметку]]></category>

		<guid isPermaLink="false">http://dmitko.ru/?p=574</guid>
		<description><![CDATA[Go to Tools->Options /Source Countrol/VSTFS-Configure User Tools… View: .* C:\Program Files (x86)\SourceGear\DiffMerge\DiffMerge.exe /title1=%6 /title2=%7 %1 %2 Merge: .* C:\Program Files (x86)\SourceGear\DiffMerge\DiffMerge.exe /title1=%6 /title2=%8 /title3=%7 /result=%4 %1 %3 %2]]></description>
			<content:encoded><![CDATA[<p>Go to Tools->Options /Source Countrol/VSTFS-Configure User Tools… </p>
<p>View:</p>
<p>.*<br />
C:\Program Files (x86)\SourceGear\DiffMerge\DiffMerge.exe<br />
/title1=%6 /title2=%7 %1 %2</p>
<p>Merge:</p>
<p>.*<br />
C:\Program Files (x86)\SourceGear\DiffMerge\DiffMerge.exe<br />
/title1=%6 /title2=%8 /title3=%7 /result=%4 %1 %3 %2</p>
]]></content:encoded>
			<wfw:commentRss>http://dmitko.ru/howto-integrate-visual-studio-and-diffmerge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove duplicate categories urls.</title>
		<link>http://dmitko.ru/remove-duplicate-categories-urls/</link>
		<comments>http://dmitko.ru/remove-duplicate-categories-urls/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 21:21:26 +0000</pubDate>
		<dc:creator>dmitko</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://dmitko.ru/?p=571</guid>
		<description><![CDATA[I&#8217;ve discovered that WordPress generates the same category page for http://exapmple.com/category/child and http://exapmple.com/category/parent/child which is not so good for SEO. The possible quick fix that worked for me &#8212; to add to the theme&#8217;s header.php the following code: if (is_category()) { list($dummy, $categoryRelative) = split("category", $_SERVER["REQUEST_URI"]); $category_id = get_cat_ID( single_cat_title("", false) ); $category_link = get_category_link( [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve discovered that WordPress generates the same category page for http://exapmple.com/category/child and http://exapmple.com/category/parent/child which is not so good for SEO. The possible quick fix that worked for me &#8212; to add to the theme&#8217;s header.php the following code:</p>
<pre><code>if (is_category())
{
	list($dummy, $categoryRelative) = split("category", $_SERVER["REQUEST_URI"]);

	$category_id = get_cat_ID( single_cat_title("", false) );
	$category_link = get_category_link( $category_id );

	list($dummy, $correctCategoryRelative) = split("category", $category_link);

	if ($categoryRelative != $correctCategoryRelative)
	{
		header('HTTP/1.1 301 Moved Permanently');
		header('Location: '.$category_link);
		exit();
	}
}</code></pre>
<p>This is a really quick code &#8212; if you can suggest a better solution, please do!</p>
]]></content:encoded>
			<wfw:commentRss>http://dmitko.ru/remove-duplicate-categories-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress: change rss feed order</title>
		<link>http://dmitko.ru/wordpress-change-rss-feed-order/</link>
		<comments>http://dmitko.ru/wordpress-change-rss-feed-order/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 07:12:30 +0000</pubDate>
		<dc:creator>dmitko</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://dmitko.ru/?p=567</guid>
		<description><![CDATA[Для того, чтобы поменять порядок сортировки по умолчанию в ленте RSS вашего блога на WordPress можно использовать действие pre_get_posts: add_action('pre_get_posts', 'sort_rss' ); function sort_rss( $notused ) { global $wp_query; if( is_feed() ) { $wp_query-&#62;set( 'orderby', 'ID' ); } } Есть идеи получше? Поделитесь в комментариях!]]></description>
			<content:encoded><![CDATA[<p>Для того, чтобы поменять порядок сортировки по умолчанию в ленте RSS вашего блога на WordPress можно использовать действие pre_get_posts:</p>
<pre><code>

add_action('pre_get_posts', 'sort_rss' );

function sort_rss( $notused )
{
	global $wp_query;
	if( is_feed() )
	{
		$wp_query-&gt;set( 'orderby', 'ID' );
	}
}
</code></pre>
<p>Есть идеи получше? Поделитесь в комментариях!</p>
]]></content:encoded>
			<wfw:commentRss>http://dmitko.ru/wordpress-change-rss-feed-order/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

