<?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"
	>

<channel>
	<title>Andrey Vystavkin Blog</title>
	<atom:link href="http://j4vk.com/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://j4vk.com/wordpress</link>
	<description>Midnight thoughts</description>
	<pubDate>Wed, 03 Sep 2008 09:14:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>CakePHP: complex SELECT queries</title>
		<link>http://j4vk.com/wordpress/2008/09/03/cakephp-complex-select-queries/</link>
		<comments>http://j4vk.com/wordpress/2008/09/03/cakephp-complex-select-queries/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 09:14:31 +0000</pubDate>
		<dc:creator>Andrey Vystavkin</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[etc]]></category>

		<category><![CDATA[cakephp]]></category>

		<category><![CDATA[IT]]></category>

		<category><![CDATA[pagination]]></category>

		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://j4vk.com/wordpress/?p=322</guid>
		<description><![CDATA[As the project grows I had to work on some more complex queries to provide users with better searching facilities.
In this case, you might use two options:

Straightforward find() function from App::Model (where you&#8217;ll have to handle the outpu of data yourself, and trying to fit the search results in your websites layout)
Use Pagination functionality (which [...]]]></description>
			<content:encoded><![CDATA[<p>As the project grows I had to work on some more complex queries to provide users with better searching facilities.</p>
<p>In this case, you might use two options:</p>
<ul>
<li>Straightforward <em><strong>find()</strong></em> function from App::Model (where you&#8217;ll have to handle the outpu of data yourself, and trying to fit the search results in your websites layout)</li>
<li>Use <em><strong><a href="http://bakery.cakephp.org/articles/view/pagination-for-custom-queries" title="Pagination from Bakery CakePHP">Pagination</a></strong></em> functionality (which is designed for handling big chunks of data for you)</li>
</ul>
<p>A simple example: from a small search menu, I need to get the data about item&#8217;s price, its type etc, so at this point, find() solution would look like:</p>
<div class="codesnip-container" >
<div class="codesnip" style="font-family: monospace;"><span class="re0">$condition</span> = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;OR&#8217;</span> =&gt; <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&#8216;Item.type&#8217;</span>&nbsp; &nbsp;=&gt; <span class="re0">$this</span>-&gt;<span class="me1">data</span><span class="br0">&#91;</span><span class="st0">&#8216;Item&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;type&#8217;</span><span class="br0">&#93;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&#8216;Item.qty&#8217;</span>&nbsp; &nbsp; &nbsp;=&gt; <span class="re0">$this</span>-&gt;<span class="me1">data</span><span class="br0">&#91;</span><span class="st0">&#8216;Item&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;qty&#8217;</span><span class="br0">&#93;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#41;</span>,<br />
&nbsp; <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;Item.price BETWEEN ? AND ?&#8217;</span> =&gt; <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="re0">$start_price</span>,<span class="re0">$end_price</span><span class="br0">&#41;</span><span class="br0">&#41;</span><br />
<span class="br0">&#41;</span>;<br />
<span class="re0">$this</span>-&gt;<span class="me1"><span class="br0">&#40;</span></span><span class="st0">&#8216;results&#8217;</span>, <span class="re0">$this</span>-&gt;<span class="me1">Item</span>-&gt;<span class="me1">find</span><span class="br0">&#40;</span><span class="st0">&#8216;all&#8217;</span>, <span class="re0">$condition</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</div>
<p>Once you set results array in the view template, <a href="http://j4vk.com/wordpress/tag/it/" class="st_tag internal_tag" rel="tag" title="Posts tagged with IT">it</a> will cause you few hours on how to rearrange data presentation, meanwhile you can use <strong><em><a href="http://j4vk.com/wordpress/tag/pagination/" class="st_tag internal_tag" rel="tag" title="Posts tagged with pagination">Pagination</a></em></strong>:</p>
<div class="codesnip-container" >
<div class="codesnip" style="font-family: monospace;"><span class="coMULTI">/*<br />
* I&#8217;m going to use the same $condition<br />
*&nbsp; the difference will be at the view level and the way of setting the data &quot;results&quot;<br />
*/</span><br />
<span class="re0">$this</span>-&gt;<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&#8216;results&#8217;</span>, <span class="re0">$this</span>-&gt;<span class="me1">paginate</span><span class="br0">&#40;</span><span class="st0">&#8216;Item&#8217;</span>, <span class="re0">$condition</span><span class="br0">&#41;</span>;</div>
</div>
<p>And in the view you might add some code like:</p>
<div class="codesnip-container" >
<div class="codesnip" style="font-family: monospace;"><span class="kw2">&lt;?</span><br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$paginator</span>-&gt;<span class="me1">counter</span><span class="br0">&#40;</span><a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><br />
<span class="st0">&#8216;format&#8217;</span> =&gt; __<span class="br0">&#40;</span><span class="st0">&#8216;%page% of %pages%, showing %current%<br />
records out of %count% total, starting on record %start%, ending on %end%&#8217;</span>, <span class="kw2">true</span><span class="br0">&#41;</span><br />
<span class="br0">&#41;</span><span class="br0">&#41;</span>; </p>
<p><span class="kw1">foreach</span><span class="br0">&#40;</span><span class="re0">$results</span> <span class="kw1">as</span> <span class="re0">$i</span> =&gt; <span class="re0">$item</span><span class="br0">&#41;</span>:<br />
<span class="coMULTI">/*<br />
* Items output<br />
*/</span><br />
<span class="kw1">endforeach</span>;<br />
<span class="kw2">?&gt;</span><br />
<span class="kw2">&lt;?<a href="http://j4vk.com/wordpress/tag/php/" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">php</a></span> <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$paginator</span>-&gt;<span class="me1">prev</span><span class="br0">&#40;</span><span class="st0">&#8216;&lt;&lt; &#8216;</span>.__<span class="br0">&#40;</span><span class="st0">&#8216;Previous Page&#8217;</span>, <span class="kw2">true</span><span class="br0">&#41;</span>, <br />
<a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>, <span class="kw2">null</span>, <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;class&#8217;</span>=&gt;<span class="st0">&#8216;disabled&#8217;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;?&gt;<br />
&nbsp;|&nbsp; &nbsp; &nbsp;<span class="kw2">&lt;?<a href="http://j4vk.com/wordpress/tag/php/" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">php</a></span> <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$paginator</span>-&gt;<span class="me1">numbers</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;?&gt;<br />
&nbsp; &nbsp; <span class="kw2">&lt;?<a href="http://j4vk.com/wordpress/tag/php/" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">php</a></span> <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$paginator</span>-&gt;<span class="me1">next</span><span class="br0">&#40;</span>__<span class="br0">&#40;</span><span class="st0">&#8216;Next Page&#8217;</span>, <span class="kw2">true</span><span class="br0">&#41;</span>.<span class="st0">&#8216; &gt;&gt;&#8217;</span>,<br />
&nbsp;<a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>, <span class="kw2">null</span>, <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;class&#8217;</span>=&gt;<span class="st0">&#8216;disabled&#8217;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;?&gt;</div>
</div>
<p>Last lines of the code would manage the results listing for you, which has to be defined in your Controller:</p>
<div class="codesnip-container" >
<div class="codesnip" style="font-family: monospace;"><span class="kw2">var</span> <span class="re0">$paginate</span> = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&#8216;Item&#8217;</span> =&gt; <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&#8216;limit&#8217;</span> =&gt; <span class="nu0">5</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&#8216;order&#8217;</span>=&gt; <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;Item.added&#8217;</span> =&gt; <span class="st0">&#8216;ASC&#8217;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#41;</span></div>
</div>
<p>Done, now  you can easily handle your search outputs. <img src='http://j4vk.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://j4vk.com/wordpress/2008/09/03/cakephp-complex-select-queries/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CakePHP: lists, beautiful bits</title>
		<link>http://j4vk.com/wordpress/2008/08/18/cakephp-lists-beautiful-bits/</link>
		<comments>http://j4vk.com/wordpress/2008/08/18/cakephp-lists-beautiful-bits/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 13:36:02 +0000</pubDate>
		<dc:creator>Andrey Vystavkin</dc:creator>
		
		<category><![CDATA[etc]]></category>

		<category><![CDATA[cakephp]]></category>

		<category><![CDATA[frameworks]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://j4vk.com/wordpress/?p=320</guid>
		<description><![CDATA[These tiny bits of beauty really make the development enjoyable:

$names = $this-&#62;find&#40;&#8216;list&#8217;, array&#40;
&#8216;conditions&#8217;=&#62; null,
&#8216;order&#8217;&#160; &#160; &#160; &#160;=&#62; &#8216;Developer.id ASC&#8217;,
&#8216;fields&#8217;&#160; &#160; &#160; &#160;=&#62; array&#40;&#8216;Developer.id&#8217;,&#8216;Developer.&#8217;.$name.&#8221;&#41;,
&#8216;recursive&#8217; =&#62; 0
&#41;&#41;;

as the result, getting:

Array = &#40;
&#91;1&#93; =&#62; &#8216;Pafilia&#8217;,
&#91;2&#93; =&#62; &#8216;Vashiotis&#8217;
&#41;;

I&#8217;ll miss these features if I move from this framework 
]]></description>
			<content:encoded><![CDATA[<p>These tiny bits of beauty really make the development enjoyable:</p>
<div class="codesnip-container" >
<div class="codesnip" style="font-family: monospace;"><span class="re0">$names</span> = <span class="re0">$this</span>-&gt;<span class="me1">find</span><span class="br0">&#40;</span><span class="st0">&#8216;list&#8217;</span>, <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><br />
<span class="st0">&#8216;conditions&#8217;</span>=&gt; <span class="kw2">null</span>,<br />
<span class="st0">&#8216;order&#8217;</span>&nbsp; &nbsp; &nbsp; &nbsp;=&gt; <span class="st0">&#8216;Developer.id ASC&#8217;</span>,<br />
<span class="st0">&#8216;fields&#8217;</span>&nbsp; &nbsp; &nbsp; &nbsp;=&gt; <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;Developer.id&#8217;</span>,<span class="st0">&#8216;Developer.&#8217;</span>.<span class="re0">$name</span>.<span class="st0">&#8221;</span><span class="br0">&#41;</span>,<br />
<span class="st0">&#8216;recursive&#8217;</span> =&gt; <span class="nu0">0</span><br />
<span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</div>
<p>as the result, getting:</p>
<div class="codesnip-container" >
<div class="codesnip" style="font-family: monospace;"><a href="http://www.php.net/array"><span class="kw3">Array</span></a> = <span class="br0">&#40;</span><br />
<span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span> =&gt; <span class="st0">&#8216;Pafilia&#8217;</span>,<br />
<span class="br0">&#91;</span><span class="nu0">2</span><span class="br0">&#93;</span> =&gt; <span class="st0">&#8216;Vashiotis&#8217;</span><br />
<span class="br0">&#41;</span>;</div>
</div>
<p>I&#8217;ll miss these features if I move from this framework <img src='http://j4vk.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://j4vk.com/wordpress/2008/08/18/cakephp-lists-beautiful-bits/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CakePHP: Dynamic select boxes with AJAX</title>
		<link>http://j4vk.com/wordpress/2008/08/07/cakephp-dynamic-select-boxes-ajax/</link>
		<comments>http://j4vk.com/wordpress/2008/08/07/cakephp-dynamic-select-boxes-ajax/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 01:09:52 +0000</pubDate>
		<dc:creator>Andrey Vystavkin</dc:creator>
		
		<category><![CDATA[etc]]></category>

		<category><![CDATA[Add new tag]]></category>

		<category><![CDATA[ajax]]></category>

		<category><![CDATA[cakephp]]></category>

		<category><![CDATA[coding]]></category>

		<category><![CDATA[frameworks]]></category>

		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://j4vk.com/wordpress/?p=311</guid>
		<description><![CDATA[Working with CakePHP1.2 I had to implement some AJAX techniques in the framework, mainly dealing with onChange behavior of the form components, here is a small example of how we can use multiple selectboxes.
Note: For simplicity reasons, I didn&#8217;t include queries, and just used option-arrays:

//inside controller
&#60;?php
&#160; &#160; &#160; &#160;class FooController extends AppController&#123;
&#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Working with CakePHP1.2 I had to implement some <a href="http://j4vk.com/wordpress/tag/ajax/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ajax">AJAX</a> techniques in the framework, mainly dealing with onChange behavior of the form components, here is a small example of how we can use multiple selectboxes.</p>
<p>Note: For simplicity reasons, I didn&#8217;t include queries, and just used option-arrays:</p>
<div class="codesnip-container" >
<div class="codesnip" style="font-family: monospace;"><span class="co1">//inside controller</span><br />
<span class="kw2">&lt;?<a href="http://j4vk.com/wordpress/tag/php/" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">php</a></span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span class="kw2">class</span> FooController <span class="kw2">extends</span> AppController<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> <span class="re0">$name</span> = <span class="st0">&#8216;Fooes&#8217;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> <span class="re0">$components</span> = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;RequestHandler&#8217;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> <span class="re0">$helpers</span> = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;Html&#8217;</span>,<span class="st0">&#8216;Form&#8217;</span>,<span class="st0">&#8216;Javascript&#8217;</span>,<span class="st0">&#8216;<a href="http://j4vk.com/wordpress/tag/ajax/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ajax">Ajax</a>&#8217;</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">function</span> beforeRender<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$this</span>-&gt;<span class="me1">RequestHandler</span>-&gt;<span class="me1">isAjax</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Configure::<span class="me2">write</span><span class="br0">&#40;</span><span class="st0">&#8216;debug&#8217;</span>,<span class="nu0">0</span><span class="br0">&#41;</span>;&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//prevent useless warnings for <a href="http://j4vk.com/wordpress/tag/ajax/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ajax">Ajax</a></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$this</span>-&gt;<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&#8216;foobar&#8217;</span>,<span class="kw2">null</span><span class="br0">&#41;</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="co1">// initiate an array of options (otherwise, you&#8217;ll get a warning)</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw2">function</span> updateDistricts<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$this</span>-&gt;<span class="me1">layout</span> = <span class="st0">&#8216;<a href="http://j4vk.com/wordpress/tag/ajax/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ajax">ajax</a>&#8217;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$this</span>-&gt;<span class="me1">beforeRender</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">$this</span>-&gt;<span class="me1">render</span><span class="br0">&#40;</span><span class="st0">&#8216;updateDistricts/&#8217;</span>,<span class="st0">&#8216;<a href="http://j4vk.com/wordpress/tag/ajax/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ajax">ajax</a>&#8217;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="kw2">?&gt;</span></div>
</div>
<p>This is just a simple layout for calling <a href="http://j4vk.com/wordpress/tag/ajax/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ajax">AJAX</a> methods, without database, sofisticated layout handling, routes etc (for these reasons we got <a href="http://j4vk.com/wordpress/tag/cakephp/" class="st_tag internal_tag" rel="tag" title="Posts tagged with cakephp">CakePHP</a> API, and <a href="http://j4vk.com/wordpress/tag/cakephp/" class="st_tag internal_tag" rel="tag" title="Posts tagged with cakephp">CakePHP</a> GoogleGroup)</p>
<div class="codesnip-container" >
<div class="codesnip" style="font-family: monospace;">//inside viewer (test-data): <span class="sc2"><a href="http://december.com/html/4/element/em.html"><span class="kw2">&lt;em&gt;</span></a></span>foo/update_districts.ctp<span class="sc2"><span class="kw2">&lt;/em&gt;</span></span><br />
<span class="sc2"><a href="http://december.com/html/4/element/option.html"><span class="kw2">&lt;option&gt;</span></a></span>Limassol<span class="sc2"><span class="kw2">&lt;/option&gt;</span></span><br />
<span class="sc2"><a href="http://december.com/html/4/element/option.html"><span class="kw2">&lt;option&gt;</span></a></span>Nicosia<span class="sc2"><span class="kw2">&lt;/option&gt;</span></span><br />
<span class="sc2"><a href="http://december.com/html/4/element/option.html"><span class="kw2">&lt;option&gt;</span></a></span>Larnaca<span class="sc2"><span class="kw2">&lt;/option&gt;</span></span><br />
<span class="sc2"><a href="http://december.com/html/4/element/option.html"><span class="kw2">&lt;option&gt;</span></a></span>Famagusta<span class="sc2"><span class="kw2">&lt;/option&gt;</span></span></div>
</div>
<p>The actual form would look like:</p>
<div class="codesnip-container" >
<div class="codesnip" style="font-family: monospace;"><span class="co1">//this code was used as an element from /view/elements/*.ctp</span></p>
<p>&lt;ul id=<span class="st0">&quot;navlinks&quot;</span>&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;li&gt;&lt;?<a href="http://j4vk.com/wordpress/tag/php/" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">php</a> <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$form</span>-&gt;<span class="me1">create</span><span class="br0">&#40;</span><span class="st0">&#8216;foo&#8217;</span><span class="br0">&#41;</span>;?&gt;&lt;/li&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;li&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw2">&lt;?<a href="http://j4vk.com/wordpress/tag/php/" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">php</a></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.php.net/print"><span class="kw3">print</span></a> <span class="re0">$form</span>-&gt;<span class="me1">input</span><span class="br0">&#40;</span><span class="st0">&#8216;Districts.name&#8217;</span>, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;type&#8217;</span>=&gt;<span class="st0">&#8217;select&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;options&#8217;</span>=&gt;array<span class="br0">&#40;</span><span class="st0">&#8216;Limassol&#8217;</span>,<span class="st0">&#8216;Nicosia&#8217;</span>,<span class="st0">&#8216;Larnaka&#8217;</span><span class="br0">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&#8216;id&#8217;</span>=&gt;<span class="st0">&#8216;district_name&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&#8216;empty&#8217;</span>=&gt;<span class="st0">&#8216;Choose District&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&#8216;label&#8217;</span>=&gt;<span class="st0">&#8216;District&#8217;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.php.net/print"><span class="kw3">print</span></a> <span class="st0">&#8216;&lt;span class=&quot;ajax_update&quot; id=&quot;ajax_indicator&quot; tyle=&quot;display:none;&quot;&gt;&#8217;</span>.<span class="re0">$html</span>-&gt;<span class="me1">image</span><span class="br0">&#40;</span><span class="st0">&#8216;<a href="http://j4vk.com/wordpress/tag/ajax/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ajax">ajax</a>-loader.gif&#8217;</span><span class="br0">&#41;</span>.<span class="st0">&#8216;&lt;/span&gt;&#8217;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">?&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/li&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;li&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw2">&lt;?<a href="http://j4vk.com/wordpress/tag/php/" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">php</a></span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.php.net/print"><span class="kw3">print</span></a> <span class="re0">$form</span>-&gt;<span class="me1">input</span><span class="br0">&#40;</span><span class="st0">&#8216;Towns.name&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&#8216;type&#8217;</span>=&gt;<span class="st0">&#8217;select&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&#8216;options&#8217;</span>=&gt; <span class="re0">$foobar</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&#8217;style&#8217;</span>=&gt;<span class="st0">&#8216;display:none&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8217;showEmpty&#8217;</span>=&gt;true,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;empty&#8217;</span>=&gt;<span class="st0">&#8216;City&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&#8216;id&#8217;</span>=&gt;<span class="st0">&#8216;city_name&#8217;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span class="kw3">print</span></a> <span class="re0">$<a href="http://j4vk.com/wordpress/tag/ajax/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ajax">ajax</a></span>-&gt;<span class="me1">observeField</span><span class="br0">&#40;</span><span class="st0">&#8216;district_name&#8217;</span>, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span>&nbsp; <span class="st0">&#8216;url&#8217;</span>=&gt;<span class="st0">&#8216;updateTowns/&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&#8216;update&#8217;</span>=&gt;<span class="st0">&#8216;city_name&#8217;</span>, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;loading&#8217;</span>=&gt;<span class="st0">&quot;Element.show(&#8217;city_name&#8217;);&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Element.show(&#8217;ajax_indicator&#8217;)&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#8216;complete&#8217;</span>=&gt;<span class="st0">&quot;Element.hide(&#8217;ajax_indicator&#8217;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Effect.Appear(&#8217;city_name&#8217;)&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&#8216;onChange&#8217;</span>=&gt;true<span class="br0">&#41;</span><span class="br0">&#41;</span>;&nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw2">?&gt;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/li&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;li&gt;&lt;?<a href="http://j4vk.com/wordpress/tag/php/" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">php</a> <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="re0">$form</span>-&gt;<span class="me1">end</span><span class="br0">&#40;</span><span class="st0">&#8216;Search&#8217;</span><span class="br0">&#41;</span>;?&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</div>
</div>
<p>As the result, once you change the default value of the first select box, the second one automatically calls the controller&#8217;s method, which renders the values (gets the option list from the view file) and renders <a href="http://j4vk.com/wordpress/tag/it/" class="st_tag internal_tag" rel="tag" title="Posts tagged with IT">it</a> in <a href="http://j4vk.com/wordpress/tag/ajax/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ajax">AJAX</a> manner</p>
<p>.</p>
]]></content:encoded>
			<wfw:commentRss>http://j4vk.com/wordpress/2008/08/07/cakephp-dynamic-select-boxes-ajax/feed/</wfw:commentRss>
		</item>
		<item>
		<title>E-commerce solutions</title>
		<link>http://j4vk.com/wordpress/2008/07/22/e-commerce-solutions/</link>
		<comments>http://j4vk.com/wordpress/2008/07/22/e-commerce-solutions/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 13:19:03 +0000</pubDate>
		<dc:creator>Andrey Vystavkin</dc:creator>
		
		<category><![CDATA[Blogging]]></category>

		<category><![CDATA[Cyprus]]></category>

		<category><![CDATA[fun]]></category>

		<guid isPermaLink="false">http://j4vk.com/wordpress/?p=308</guid>
		<description><![CDATA[Few days ago, my boss start going around the project deadlines, hoping that I&#8217;ll submit everything on time.Having a bad experience dealing with IT&#8217;s, a guy has been doing dump HTML with few PHP includes for about two years.No wonder, why he was amazed when I told him that all the projects would be finished [...]]]></description>
			<content:encoded><![CDATA[<p>Few days ago, my boss start going around the project deadlines, hoping that I&#8217;ll submit everything on time.Having a bad experience dealing with <a href="http://j4vk.com/wordpress/tag/it/" class="st_tag internal_tag" rel="tag" title="Posts tagged with IT">IT</a>&#8217;s, a guy has been doing dump HTML with few <a href="http://j4vk.com/wordpress/tag/php/" class="st_tag internal_tag" rel="tag" title="Posts tagged with php">PHP</a> includes for about two years.No wonder, why he was amazed when I told him that all the projects would be finished by the beginning of August.</p>
<p>Keeping these deadlines in mind, the boss started to look for even faster alternative solutions. Well, and he found some.</p>
<p>Today&#8217;s working day started from the conversation, whether <a href="http://j4vk.com/wordpress/tag/it/" class="st_tag internal_tag" rel="tag" title="Posts tagged with IT">it</a>&#8217;d be useful to buy a ready-made solution for his website, so I&#8217;ve decided to take a look at what he&#8217;s found:</p>
<ol>
<li>Portfolio of 8 sites with &#8220;asdf&#8221; test data.</li>
<li>Admin is accessible with &#8220;admin/admin&#8221; username password combination</li>
<li>7 out of 8 sites got partially finished control panels - working only 30% of <a href="http://j4vk.com/wordpress/tag/it/" class="st_tag internal_tag" rel="tag" title="Posts tagged with IT">it</a>. (Data mismatch, no input validations, or JS validation only)</li>
</ol>
<p>But the site my boss was especially interested in just rocked my heart. Here&#8217;s a screenshot:</p>
<p><a title="Uber Admin Panel by j4vk, on Flickr" href="http://www.flickr.com/photos/jujav4ik/2692684410/"><img style="vertical-align: middle;" src="http://farm4.static.flickr.com/3207/2692684410_946e008b5a_m.jpg" alt="Uber Admin Panel" width="240" height="180" /></a></p>
<p><a href="http://j4vk.com/wordpress/tag/it/" class="st_tag internal_tag" rel="tag" title="Posts tagged with IT">It</a>&#8217;s like: pay first, and you <span style="text-decoration: underline;">might</span> get this CMS later <img src='http://j4vk.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://j4vk.com/wordpress/2008/07/22/e-commerce-solutions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Useful links for CakePHP framework</title>
		<link>http://j4vk.com/wordpress/2008/07/21/useful-links-for-cakephp-framework/</link>
		<comments>http://j4vk.com/wordpress/2008/07/21/useful-links-for-cakephp-framework/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 06:27:31 +0000</pubDate>
		<dc:creator>Andrey Vystavkin</dc:creator>
		
		<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://j4vk.com/wordpress/?p=307</guid>
		<description><![CDATA[
cakebaker.42dh.com
book.cakephp.org
CakePHP Google Group
API CakePHP

]]></description>
			<content:encoded><![CDATA[<ul>
<li><a title="CakePHP " href="http://cakebaker.42dh.com">cakebaker.42dh.com</a></li>
<li><a title="CakePHP Cookbook" href="http://book.cakephp.org">book.cakephp.org</a></li>
<li><a title="Official CakePHP google Group" href="http://groups.google.com/group/cake-php/">CakePHP Google Group</a></li>
<li><a title="CakePHP  API" href="http://api.cakephp.org/">API CakePHP</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://j4vk.com/wordpress/2008/07/21/useful-links-for-cakephp-framework/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A little bit of success</title>
		<link>http://j4vk.com/wordpress/2008/05/20/a-little-bit-of-success/</link>
		<comments>http://j4vk.com/wordpress/2008/05/20/a-little-bit-of-success/#comments</comments>
		<pubDate>Tue, 20 May 2008 11:20:41 +0000</pubDate>
		<dc:creator>Andrey Vystavkin</dc:creator>
		
		<category><![CDATA[etc]]></category>

		<category><![CDATA[News]]></category>

		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://j4vk.com/wordpress/?p=306</guid>
		<description><![CDATA[Just passed my driving test:

Now I got wheels
Now have to drink less.

]]></description>
			<content:encoded><![CDATA[<p>Just passed my driving test:</p>
<ul>
<li>Now I got wheels</li>
<li>Now have to drink less.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://j4vk.com/wordpress/2008/05/20/a-little-bit-of-success/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Speed up your work in Vim</title>
		<link>http://j4vk.com/wordpress/2008/05/09/speed-up-your-work-in-vim/</link>
		<comments>http://j4vk.com/wordpress/2008/05/09/speed-up-your-work-in-vim/#comments</comments>
		<pubDate>Thu, 08 May 2008 23:33:22 +0000</pubDate>
		<dc:creator>Andrey Vystavkin</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Tips]]></category>

		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://j4vk.com/wordpress/?p=305</guid>
		<description><![CDATA[If you don&#8217;t know what&#8217;s Vim, then:

You&#8217;re Windows IDE&#8217;s fan
You&#8217;ve never used Linux

An option &#8220;you&#8217;re using Emacs&#8221; is not included - you would have definetely known Vim. You&#8217;d hate it for the sake of &#8220;holly wars&#8221;.
I&#8217;m not an Emacs lover, neither those huge IDE&#8217;s with bunch of boxes, bookmarks, you name it. Most of these [...]]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t know what&#8217;s <a href="http://j4vk.com/wordpress/tag/vim/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vim">Vim</a>, then:</p>
<ol>
<li>You&#8217;re <a href="http://j4vk.com/wordpress/tag/windows/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Windows">Windows</a> IDE&#8217;s fan</li>
<li>You&#8217;ve never used <a href="http://j4vk.com/wordpress/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a></li>
</ol>
<p>An option &#8220;you&#8217;re using Emacs&#8221; is not included - you would have definetely known <a href="http://j4vk.com/wordpress/tag/vim/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vim">Vim</a>. You&#8217;d hate <a href="http://j4vk.com/wordpress/tag/it/" class="st_tag internal_tag" rel="tag" title="Posts tagged with IT">it</a> for the sake of &#8220;<a href="http://j4vk.com/wordpress/tag/holly-wars/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Holly wars">holly wars</a>&#8221;.</p>
<p>I&#8217;m not an Emacs lover, neither those huge IDE&#8217;s with bunch of boxes, bookmarks, you name <a href="http://j4vk.com/wordpress/tag/it/" class="st_tag internal_tag" rel="tag" title="Posts tagged with IT">it</a>. Most of these things are useless when you need to code something fast, so I just stuck with <a href="http://j4vk.com/wordpress/tag/vim/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vim">Vim</a>: simple, light, fast, and have a lot of functionality. Here are just few <a href="http://j4vk.com/wordpress/tag/tips/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Tips">tips</a> of speeding up <a href="http://j4vk.com/wordpress/tag/coding/" class="st_tag internal_tag" rel="tag" title="Posts tagged with coding">coding</a> process I&#8217;ve been using lately:</p>
<p>If you got some repetitive function calls or anything you&#8217;re not bothered to print just fire up:</p>
<h6>Comments:</h6>
<div class="codesnip-container" ><span style="color: #808080;">:ab #cb /********************************<br />
:ab #ce /*******************************/</span></div>
<p>Printing <span style="color: #999999;">
<div class="codesnip-container" >#cb</div>
<p></span> or <span style="color: #999999;">
<div class="codesnip-container" >#ce</div>
<p></span> will paste initial comment pattern.
<div class="codesnip-container" ><span style="color: #999999;">:ab #r require_once();<br />
:ab #i  include_once();</span></div>
<p>Minus another dozen of lines to be typed.</p>
<h6>Text search:</h6>
<p>You can <span style="color: #999999;">
<div class="codesnip-container" >:set incsearch</div>
<p></span> which will enable incremental search for you, or use <abbr title="Regular Expressions">regexp</abbr>, like:</p>
<div class="codesnip-container" ><span style="color: #999999;">:/\&lt;agent\&gt;/</span></div>
<p>will find you &#8220;agent&#8221; in current file.</p>
<h6>Using ftp:</h6>
<div class="codesnip-container" ><span style="color: #888888;"><br />
</span> <span style="color: #888888;">cmap ,r  :Nread ftp://ftpdomain/public_html/index.html<br />
cmap ,w  :Nwrite ftp://ftpdomain/public_html/index.html</span></div>
<p>These are just basics, Bram Moolenaar, the developer of <a href="http://j4vk.com/wordpress/tag/vim/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vim">Vim</a>, got a good article on <a title="Vim habits: optimize your work in Vim" href="http://www.moolenaar.net/habits.html">how to optimize your work with Vim</a>, and David Rayner with his page of <a title="Tips and Tricks how to speed up Vim usage" href="http://rayninfo.co.uk/vimtips.html">Vim tips</a>. Compulsory to learn for <a href="http://j4vk.com/wordpress/tag/vim/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vim">Vim</a> beginners!</p>
]]></content:encoded>
			<wfw:commentRss>http://j4vk.com/wordpress/2008/05/09/speed-up-your-work-in-vim/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Real Microsoft Vista code leaked!</title>
		<link>http://j4vk.com/wordpress/2008/05/08/real-microsoft-vista-code-leaked/</link>
		<comments>http://j4vk.com/wordpress/2008/05/08/real-microsoft-vista-code-leaked/#comments</comments>
		<pubDate>Wed, 07 May 2008 23:54:17 +0000</pubDate>
		<dc:creator>Andrey Vystavkin</dc:creator>
		
		<category><![CDATA[etc]]></category>

		<category><![CDATA[Humor]]></category>

		<category><![CDATA[Vista]]></category>

		<guid isPermaLink="false">http://j4vk.com/wordpress/?p=304</guid>
		<description><![CDATA[/*
TOP SECRET Microsoft(c) Project:Longhorn(TM) SP1
Estimated release date:2008
*/
#include “win95.h”
#include “win98.h”
#include “leopard.h”
char chew_up_some_ram[10000000];
void main () {
while (!CRASHED) {
if (first_time_install) {
make_10_gigabyte_swapfile();
do_nothing_loop();
search_and_destroy(FIREFOX &#124; OPENOFFICEORG &#124; ANYTHING_GOOGLE);
hang_system();
}
if (still_not_crashed) {
basically_run_windows_xp();
do_nothing_loop();
}
}
if (!DX10GPU()) {
set_graphics(aero, very_slow);
set_mouse(reaction, sometimes);
}
// printf(”Welcome to Windows 2000?);
// printf(”Welcome to Windows XP”);
printf(”Welcome to Windows Vista”);
while (something) {
sleep(10);
get_user_input();
sleep(10);
act_on_user_input();
sleep(10);
flicker_led_promisingly(hard_disk);
}
creat_general_protection_fault();
}
]]></description>
			<content:encoded><![CDATA[<div class="codesnip-container" >/*<br />
TOP SECRET Microsoft(c) Project:Longhorn(TM) SP1<br />
Estimated release date:2008<br />
*/<br />
#include “win95.h”<br />
#include “win98.h”<br />
#include “leopard.h”</div>
<p>char chew_up_some_ram[10000000];</p>
<p>void main () {<br />
while (!CRASHED) {</p>
<p>if (first_time_install) {<br />
make_10_gigabyte_swapfile();<br />
do_nothing_loop();<br />
search_and_destroy(FIREFOX | OPENOFFICEORG | ANYTHING_GOOGLE);<br />
hang_system();<br />
}</p>
<p>if (still_not_crashed) {<br />
basically_run_windows_xp();<br />
do_nothing_loop();<br />
}<br />
}</p>
<p>if (!DX10GPU()) {<br />
set_graphics(aero, very_slow);<br />
set_mouse(reaction, sometimes);<br />
}</p>
<p>// printf(”Welcome to <a href="http://j4vk.com/wordpress/tag/windows/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Windows">Windows</a> 2000?);<br />
// printf(”Welcome to <a href="http://j4vk.com/wordpress/tag/windows/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Windows">Windows</a> XP”);<br />
printf(”Welcome to <a href="http://j4vk.com/wordpress/tag/windows/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Windows">Windows</a> <a href="http://j4vk.com/wordpress/tag/vista/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Vista">Vista</a>”);</p>
<p>while (something) {<br />
sleep(10);<br />
get_user_input();<br />
sleep(10);<br />
act_on_user_input();<br />
sleep(10);<br />
flicker_led_promisingly(hard_disk);<br />
}</p>
<p>creat_general_protection_fault();<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://j4vk.com/wordpress/2008/05/08/real-microsoft-vista-code-leaked/feed/</wfw:commentRss>
		</item>
		<item>
		<title>KDE on Windows</title>
		<link>http://j4vk.com/wordpress/2008/01/27/kde-on-windows/</link>
		<comments>http://j4vk.com/wordpress/2008/01/27/kde-on-windows/#comments</comments>
		<pubDate>Sun, 27 Jan 2008 15:51:14 +0000</pubDate>
		<dc:creator>Andrey Vystavkin</dc:creator>
		
		<category><![CDATA[Blogging]]></category>

		<category><![CDATA[Links]]></category>

		<category><![CDATA[Desktops]]></category>

		<category><![CDATA[KDE]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://j4vk.com/wordpress/2008/01/27/kde-on-windows/</guid>
		<description><![CDATA[
Good news, KDE team started migration of original KDE applications for Windows platform. Concerning windows.kde.org, users of Windows XP/2000/2003 can easily install famous apps like Konqueror, Kate and others on their machines, via KDE-installer.
If some of the applications don&#8217;t work from the beginning, just add KDEDIRS and Path in your Control Panel, as it&#8217;s described [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/jujav4ik/2223360764/" title="KDE on Windows XP by j4vk, on Flickr"><img src="http://farm3.static.flickr.com/2241/2223360764_097bd7a695_m.jpg" alt="KDE on Windows XP" align="middle" height="192" width="240" /></a></p>
<p>Good <a href="http://j4vk.com/wordpress/tag/news/" class="st_tag internal_tag" rel="tag" title="Posts tagged with News">news</a>, <a href="http://j4vk.com/wordpress/tag/kde/" class="st_tag internal_tag" rel="tag" title="Posts tagged with KDE">KDE</a> team started migration of original <a href="http://j4vk.com/wordpress/tag/kde/" class="st_tag internal_tag" rel="tag" title="Posts tagged with KDE">KDE</a> applications for <a href="http://j4vk.com/wordpress/tag/windows/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Windows">Windows</a> platform. Concerning <a href="http://windows.kde.org/" title="KDE Windows project page">windows.kde.org</a>, users of <a href="http://j4vk.com/wordpress/tag/windows/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Windows">Windows</a> XP/2000/2003 can easily install famous apps like Konqueror, Kate and others on their machines, via <a href="http://download.cegit.de/kde-windows/installer/" title="KDE-Installer for Windows">KDE-installer.</a></p>
<p>If some of the applications don&#8217;t work from the beginning, just add KDEDIRS and Path in your Control Panel, as <a href="http://j4vk.com/wordpress/tag/it/" class="st_tag internal_tag" rel="tag" title="Posts tagged with IT">it</a>&#8217;s <a href="http://techbase.kde.org/index.php?title=Projects/KDE_on_Windows/Installation" title="How to install KDE on Windows">described in the manual</a>.</p>
<p>So far, I found only one minor thing: I couldn&#8217;t manage applications via Konqueror, however <a href="http://j4vk.com/wordpress/tag/it/" class="st_tag internal_tag" rel="tag" title="Posts tagged with IT">it</a> needs some googling.</p>
<p>In general, lots of positive feelings for this great move of <a href="http://j4vk.com/wordpress/tag/kde/" class="st_tag internal_tag" rel="tag" title="Posts tagged with KDE">KDE</a>, because some of the apps in <a href="http://j4vk.com/wordpress/tag/kde/" class="st_tag internal_tag" rel="tag" title="Posts tagged with KDE">KDE</a> can&#8217;t be compared with <a href="http://j4vk.com/wordpress/tag/windows/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Windows">Windows</a> scanty alternatives.</p>
]]></content:encoded>
			<wfw:commentRss>http://j4vk.com/wordpress/2008/01/27/kde-on-windows/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Brands show your intelligence</title>
		<link>http://j4vk.com/wordpress/2008/01/21/brands-show-your-intelligence/</link>
		<comments>http://j4vk.com/wordpress/2008/01/21/brands-show-your-intelligence/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 11:57:44 +0000</pubDate>
		<dc:creator>Andrey Vystavkin</dc:creator>
		
		<category><![CDATA[etc]]></category>

		<category><![CDATA[Holly wars]]></category>

		<category><![CDATA[News]]></category>

		<category><![CDATA[OS]]></category>

		<guid isPermaLink="false">http://j4vk.com/wordpress/2008/01/21/brands-show-your-intelligence/</guid>
		<description><![CDATA[and now a study proves that &#8220;Mac people&#8221; indeed are more liberal and open-minded than average folks.
If you&#8217;re using PC, you&#8217;re conservative and close-minded average person living on this planet. The quote is a bit stupid, isn&#8217;t it?
]]></description>
			<content:encoded><![CDATA[<blockquote><a href="http://www.digitalartsonline.co.uk/news/index.cfm?RSS&amp;NewsID=9310" title="Digital Art magazine compares Mac and PC">and now a study proves that &#8220;Mac people&#8221; indeed are more liberal and open-minded than average folks</a>.</p></blockquote>
<p>If you&#8217;re using PC, you&#8217;re conservative and close-minded average person living on this planet. The quote is a bit stupid, isn&#8217;t <a href="http://j4vk.com/wordpress/tag/it/" class="st_tag internal_tag" rel="tag" title="Posts tagged with IT">it</a>?</p>
]]></content:encoded>
			<wfw:commentRss>http://j4vk.com/wordpress/2008/01/21/brands-show-your-intelligence/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
