<?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>Vacheslav Starikov&#039;s</title>
	<atom:link href="http://starikovs.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://starikovs.com</link>
	<description>BLOG</description>
	<lastBuildDate>Thu, 03 May 2012 22:40:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>GD extension required</title>
		<link>http://starikovs.com/2012/05/04/gd-extension-required/</link>
		<comments>http://starikovs.com/2012/05/04/gd-extension-required/#comments</comments>
		<pubDate>Thu, 03 May 2012 22:40:13 +0000</pubDate>
		<dc:creator>Vacheslav</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://starikovs.com/?p=645</guid>
		<description><![CDATA[I&#8217;ve tryed to use some GD functions in php. Locally everything is ok, I use xampp on Windows. But when I moved my site to the server I get this error: PHP Fatal error: Uncaught exception &#8216;WideImage_Exception&#8217; with message &#8216;WideImage requires the GD extension, but it&#8217;s apparently not loaded&#8230; In my php app the WideImage [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve tryed to use some GD functions in php. Locally everything is ok, I use xampp on Windows. But when I moved my site to the server I get this error:</p>
<p><span style="color: red">PHP Fatal error:  Uncaught exception &#8216;WideImage_Exception&#8217; with message &#8216;WideImage requires the GD extension, but it&#8217;s apparently not loaded&#8230;</span></p>
<p>In my php app the WideImage library is used and it utilizes GD library. So, there isn&#8217;t GD extension installed. Well, let&#8217;s install it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> upgrade <span style="color: #660033;">--show-upgraded</span>
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php5-gd</pre></div></div>

<p>After installing php5 gd library the error have been gone and WideImage classes begin to work properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://starikovs.com/2012/05/04/gd-extension-required/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to disable directory listing</title>
		<link>http://starikovs.com/2012/05/03/disable-directory-listing/</link>
		<comments>http://starikovs.com/2012/05/03/disable-directory-listing/#comments</comments>
		<pubDate>Thu, 03 May 2012 19:22:14 +0000</pubDate>
		<dc:creator>Vacheslav</dc:creator>
				<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://starikovs.com/?p=641</guid>
		<description><![CDATA[I&#8217;ve just searched for this approach but there are so many complex tips for this simple task.. So, in this article I&#8217;ll show you how to disable directory index in Apache web server. Imagine, that you have a virtual host: &#60;VirtualHost *:80&#62; ... &#60;/VirtualHost&#62; To disable directory listing you should add this line of code: [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just searched for this approach but there are so many complex tips for this simple task.. So, in this article I&#8217;ll show you how to disable directory index in Apache web server. </p>
<p>Imagine, that you have a virtual host:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">80</span>&gt;
...
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;</pre></div></div>

<p>To disable directory listing you should add this line of code:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">80</span>&gt;
...
<span style="color: #00007f;">Options</span> -<span style="color: #0000ff;">Indexes</span>
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;</pre></div></div>

<p>It works! </p>
<p>By the way, I tryed to remove Options directive but the directory listing wasn&#8217;t disabled. </p>
]]></content:encoded>
			<wfw:commentRss>http://starikovs.com/2012/05/03/disable-directory-listing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 Text border</title>
		<link>http://starikovs.com/2012/04/02/css3-text-border/</link>
		<comments>http://starikovs.com/2012/04/02/css3-text-border/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 13:03:05 +0000</pubDate>
		<dc:creator>Vacheslav</dc:creator>
				<category><![CDATA[css3]]></category>

		<guid isPermaLink="false">http://starikovs.com/?p=618</guid>
		<description><![CDATA[Here&#8217;s an example of how to implement a border around some text. In this example text-shadow CSS 3 property is used. .test &#123; text-shadow: 1px 0px 0px red, -1px 0px 0px red, 0px 1px 0px red, 0px -1px 0px red; &#160; font-size: 400%; font-weight: bold; color: yellow; &#125;​ Text with border!]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an example of how to implement a border around some text. In this example <strong>text-shadow</strong> CSS 3 property is used.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.test</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">,</span> 
        <span style="color: #933;">-1px</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">,</span> 
        <span style="color: #933;">0px</span> <span style="color: #933;">1px</span> <span style="color: #933;">0px</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">,</span> 
        <span style="color: #933;">0px</span> <span style="color: #933;">-1px</span> <span style="color: #933;">0px</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">400%</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">yellow</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>​</pre></div></div>

<style type="text/css">
.test {
    font-weight: bold;
    font-size: 400%;
    color: yellow;
    text-shadow: 1px 0px 0px red, 
        -1px 0px 0px red, 
        0px 1px 0px red, 
        0px -1px 0px red;
    display: inline-block;
    padding-bottom: 20px;
}​
</style>
<p><span class="test">Text with border!</span></p>
]]></content:encoded>
			<wfw:commentRss>http://starikovs.com/2012/04/02/css3-text-border/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apr_socket_connect(): No connection could be made because the target machine actively refused it.</title>
		<link>http://starikovs.com/2012/03/19/ab_error_win/</link>
		<comments>http://starikovs.com/2012/03/19/ab_error_win/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 11:52:29 +0000</pubDate>
		<dc:creator>Vacheslav</dc:creator>
				<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://starikovs.com/?p=606</guid>
		<description><![CDATA[When the one of my local projects has been tested with an Apache HTTP server benchmarking tool (ab) I&#8217;ve got an error: ab -c400 -n2000 http://localhost/myproject/ Test aborted after 10 failures. apr_socket_connect(): No connection could be made because the target machine actively refused it. (730061) I&#8217;ve tryed to configure httpd-mpm.conf the mpm_worker_module section but nothing [...]]]></description>
			<content:encoded><![CDATA[<p>When the one of my local projects has been tested with an Apache HTTP server benchmarking tool (ab) I&#8217;ve got an error:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ab <span style="color: #660033;">-c400</span> <span style="color: #660033;">-n2000</span> http:<span style="color: #000000; font-weight: bold;">//</span>localhost<span style="color: #000000; font-weight: bold;">/</span>myproject<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p><strong>Test aborted after 10 failures.</p>
<p>apr_socket_connect(): No connection could be made because the target machine actively refused it. (730061)</strong></p>
<p>I&#8217;ve tryed to configure <strong>httpd-mpm.conf</strong> the <strong>mpm_worker_module</strong> section but nothing changed. I&#8217;ve checked the mpm module that is using:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">httpd <span style="color: #660033;">-l</span></pre></div></div>

<p><strong>Compiled in modules:<br />
&#8230;<br />
mpm_winnt.c<br />
&#8230;<br />
</strong></p>
<p>So, my fault.. I&#8217;ve tryed to configure <strong>mpm_worker_module</strong> that isn&#8217;t used but the current mpm module that is used is <strong>mpm_winnt_module</strong> because I use XAMPP on Windows.</p>
<p>To fix this error you shoud set <strong>ThreadsPerChild</strong> with a bigger value and restart the web server.</p>
]]></content:encoded>
			<wfw:commentRss>http://starikovs.com/2012/03/19/ab_error_win/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cssRules null in Chrome</title>
		<link>http://starikovs.com/2012/03/01/fix-cssrules-null-chrome/</link>
		<comments>http://starikovs.com/2012/03/01/fix-cssrules-null-chrome/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 15:28:44 +0000</pubDate>
		<dc:creator>Vacheslav</dc:creator>
				<category><![CDATA[chrome]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://starikovs.com/?p=598</guid>
		<description><![CDATA[I found this problem when tryed to use cssRules of document.styleSheets[i] locally in Chrome but found that cssRules is null and only in Chrome. I need only to add some rules but not to read or modify existed rules so this fix is not for all. Here&#8217;s the bug http://code.google.com/p/chromium/issues/detail?id=49001. And here&#8217;s my workaround for [...]]]></description>
			<content:encoded><![CDATA[<p>I found this problem when tryed to use cssRules of document.styleSheets[i] locally in Chrome but found that cssRules is null and only in Chrome. I need only to add some rules but not to read or modify existed rules so this fix is not for all.</p>
<p>Here&#8217;s the bug <a href="http://code.google.com/p/chromium/issues/detail?id=49001">http://code.google.com/p/chromium/issues/detail?id=49001</a>.</p>
<p>And here&#8217;s my workaround for this problem:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> styles <span style="color: #339933;">=</span> document.<span style="color: #660066;">styleSheets</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> style <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> s <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> s <span style="color: #339933;">&lt;</span> styles.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> s<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>styles<span style="color: #009900;">&#91;</span>s<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">href</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        style <span style="color: #339933;">=</span> styles<span style="color: #009900;">&#91;</span>s<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>style <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>
    style <span style="color: #339933;">=</span> jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;style type=<span style="color: #000099; font-weight: bold;">\&quot;</span>text/css<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&lt;/style&gt;&quot;</span><span style="color: #009900;">&#41;</span>
        .<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'head'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> rules <span style="color: #339933;">=</span> style.<span style="color: #660066;">cssRules</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// is not null!!!</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://starikovs.com/2012/03/01/fix-cssrules-null-chrome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vertical align block element inside block element</title>
		<link>http://starikovs.com/2012/02/29/vertical-align-block-element-inside-block-element/</link>
		<comments>http://starikovs.com/2012/02/29/vertical-align-block-element-inside-block-element/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 14:23:46 +0000</pubDate>
		<dc:creator>Vacheslav</dc:creator>
				<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://starikovs.com/?p=596</guid>
		<description><![CDATA[The popular question, &#8220;How to align vertically block inside block?&#8221;. Here&#8217;s an example of how to position a div in the middle of another div. The same way you can position vertically a block on the top or at the bottom. HTML: &#60;div id=&#34;a&#34;&#62; &#60;div id=&#34;b&#34;&#62;&#60;/div&#62; &#60;/div&#62;​ CSS: #a &#123; display: block; width: 100px; height: [...]]]></description>
			<content:encoded><![CDATA[<p>The popular question, &#8220;How to align vertically block inside block?&#8221;. Here&#8217;s an example of how to position a div in the middle of another div. The same way you can position vertically a block on the top or at the bottom.</p>
<p>HTML:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;a&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;b&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>​</pre></div></div>

<p>CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#a</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#b</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> inline-<span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">gray</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">middle</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
​</pre></div></div>

<p>By the way, you can use this approach to align text within a div vertically.</p>
]]></content:encoded>
			<wfw:commentRss>http://starikovs.com/2012/02/29/vertical-align-block-element-inside-block-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stick Footer to bottom with help of CSS3</title>
		<link>http://starikovs.com/2012/02/23/stick-footer-css3/</link>
		<comments>http://starikovs.com/2012/02/23/stick-footer-css3/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 09:51:14 +0000</pubDate>
		<dc:creator>Vacheslav</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>

		<guid isPermaLink="false">http://starikovs.com/?p=590</guid>
		<description><![CDATA[In this article I will show you the method of how to make sticky Footer with help of CSS3. The footer element is positioned immediately after the content element if the content element has height bigger then the window height, otherwise the footer element is positioned at the bottom of the browser&#8217;s window. HTML: &#60;div [...]]]></description>
			<content:encoded><![CDATA[<p>In this article I will show you the method of how to make sticky Footer with help of CSS3. The footer element is positioned immediately after the content element if the content element has height bigger then the window height, otherwise the footer element is positioned at the bottom of the browser&#8217;s window.</p>
<p>HTML:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;content&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Some text<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Some text<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>etc...<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;footer&quot;</span>&gt;</span>Footer<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>​</pre></div></div>

<p>CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">html<span style="color: #00AA00;">,</span> body <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#footer</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-100px</span><span style="color: #00AA00;">;</span>
    box-sizing<span style="color: #00AA00;">:</span> border-box<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">gray</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> lightyellow<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#content</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
    box-sizing<span style="color: #00AA00;">:</span> border-box<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">min-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">dotted</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
​</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://starikovs.com/2012/02/23/stick-footer-css3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cron timezone problem</title>
		<link>http://starikovs.com/2011/12/21/cron-timezone-problem/</link>
		<comments>http://starikovs.com/2011/12/21/cron-timezone-problem/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 19:37:58 +0000</pubDate>
		<dc:creator>Vacheslav</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://starikovs.com/?p=577</guid>
		<description><![CDATA[I&#8217;ve just tried to understand what&#8217;s the problem with my crontab. I set it to a proper time but nothing happens. As i guessed the problem is in timezone. I use Debian linux so here I&#8217;ll provide steps how I&#8217;ve fixed it: Configure time zone with dpkg-reconfigure dpkg-reconfigure tzdata Link localtime to a corresponding zoneinfo [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just tried to understand what&#8217;s the problem with my crontab. I set it to a proper time but nothing happens. As i guessed the problem is in timezone.</p>
<p>I use Debian linux so here I&#8217;ll provide steps how I&#8217;ve fixed it:</p>
<h5>Configure time zone with dpkg-reconfigure</h5>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">    dpkg-reconfigure tzdata</pre></div></div>

<h5>Link localtime to a corresponding zoneinfo file</h5>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">    <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-sf</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>zoneinfo<span style="color: #000000; font-weight: bold;">/</span>Europe<span style="color: #000000; font-weight: bold;">/</span>Kiev <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>localtime</pre></div></div>

<p>In your case select your time zone.</p>
<h5>Restart cron daemon</h5>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>cron restart</pre></div></div>

<p>In my case this was the fix for the problem. I edited my contab and cron started to work like a Swiss watch <img src='http://starikovs.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://starikovs.com/2011/12/21/cron-timezone-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New line to paragraph in PHP</title>
		<link>http://starikovs.com/2011/11/10/php-new-line-to-paragraph/</link>
		<comments>http://starikovs.com/2011/11/10/php-new-line-to-paragraph/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 06:43:42 +0000</pubDate>
		<dc:creator>Vacheslav</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://starikovs.com/?p=569</guid>
		<description><![CDATA[Here&#8217;s an example of how to convert new line (LF &#8211; line feed, &#8216;\n&#8217;) or carriage return (CR, &#8216;\r&#8217;) followed by new line (CR+LF, &#8216;\r\n&#8217;) to &#60;br&#62; or &#60;p&#62;. In case of double or more breaks we&#8217;ll get a paragraph but in case of one break we&#8217;ll have &#60;br&#62;. $text = 'Lorem ipsum\r\n\r\ndolor sit\r\namet.'; // [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an example of how to convert new line (LF &#8211; line feed, &#8216;\n&#8217;) or carriage return (CR, &#8216;\r&#8217;) followed by new line (CR+LF, &#8216;\r\n&#8217;) to &lt;br&gt; or &lt;p&gt;. In case of double or more breaks we&#8217;ll get a paragraph but in case of one break we&#8217;ll have &lt;br&gt;.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Lorem ipsum\r\n\r\ndolor sit\r\namet.'</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// double or more nl to &lt;p&gt;</span>
<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/(\r?\n){2,}/'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;/p&gt;&lt;p&gt;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// nl to &lt;br&gt;</span>
<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/(\r?\n)+/'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;br /&gt;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;p&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$text</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/p&gt;'</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>output: </strong><span>&lt;p&gt;Lorem ipsum&lt;/p&gt;&lt;p&gt;dolor sit&lt;br /&gt;amet.&lt;/p&gt;</span></p>
]]></content:encoded>
			<wfw:commentRss>http://starikovs.com/2011/11/10/php-new-line-to-paragraph/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One side shadow in CSS3</title>
		<link>http://starikovs.com/2011/11/09/css3-one-side-shadow/</link>
		<comments>http://starikovs.com/2011/11/09/css3-one-side-shadow/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 14:22:40 +0000</pubDate>
		<dc:creator>Vacheslav</dc:creator>
				<category><![CDATA[css3]]></category>

		<guid isPermaLink="false">http://starikovs.com/?p=552</guid>
		<description><![CDATA[As You may suppose, there isn&#8217;t a standard way to set the box shadow for only one side of the box or leave one side of the element without a shadow. But You can reach it by using simple CSS tricks. Here You can analyze two examples. In the first example, we will set box-shadow [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://starikovs.com/wp-content/uploads/2011/11/one-side-shadow-css3.png" alt="" title="one-side-shadow-css3" width="121" height="235" class="alignleft size-full wp-image-553" style="margin-bottom: 0" /></p>
<p>As You may suppose, there isn&#8217;t a standard way to set the box shadow for only one side of the box or leave one side of the element without a shadow. But You can reach it by using simple CSS tricks. Here You can analyze two examples. </p>
<p>In the first example, we will set box-shadow for only one side of the box.</p>
<p>In the second sample, only one side of the element will be without a shadow.</p>
<p>I hope everybody will understand this CSS so I won&#8217;t provide any other description. More code, less water)</p>
<p>Let&#8217;s start:</p>
<h3>One side shadow</h3>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">div <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">7px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
div<span style="color: #3333ff;">:before </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">' '</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">7px</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span> 
  box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">5px</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<style type="text/css">
#test1 {
margin: 30px;
height: 100px;
width: 100px;
position: relative;
overflow: hidden;
padding: 0 7px 0 0;
}
#test1:before {
position: absolute; 
content: ' '; 
top: 0px; 
right: 7px; 
bottom: 0;
left: 0; 
background-color: transparent; 
box-shadow: 0 0 5px black;
border: 1px solid red;
}
</style>
<div id="test1"></div>
<h3>One side without shadow</h3>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">div <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">7px</span> <span style="color: #933;">7px</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">7px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
div<span style="color: #3333ff;">:before </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">' '</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">7px</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">7px</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-7px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">7px</span><span style="color: #00AA00;">;</span> 
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span> 
  box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">5px</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<style type="text/css">
#test2 {
margin: 30px;
height: 100px;
width: 100px;
position:relative;
overflow: hidden;
padding: 7px 7px 0 7px;
}
#test2:before {
position: absolute; 
content: ' '; 
top: 7px; 
right: 7px; 
bottom: -7px;
left: 7px; 
background-color: transparent; 
box-shadow: 0 0 5px black;
border: 1px solid red;
}
</style>
<div id="test2"></div>
]]></content:encoded>
			<wfw:commentRss>http://starikovs.com/2011/11/09/css3-one-side-shadow/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

