<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Competition &#8220;Laugh or cry?&#8221;</title>
	<atom:link href="http://erka.kpumuk.info/development/competition-laugh-or-cry/feed/" rel="self" type="application/rss+xml" />
	<link>http://erka.kpumuk.info/development/competition-laugh-or-cry/</link>
	<description></description>
	<pubDate>Wed, 19 Nov 2008 11:47:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: exitTeam</title>
		<link>http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-14700</link>
		<dc:creator>exitTeam</dc:creator>
		<pubDate>Tue, 30 Nov 2010 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-14700</guid>
		<description>Hi,
As for me the best one is Dmytro Shteflyuk's example with date validation.
Btw, small addition to the leap year validation, it should be checked if it is divisible to 4, and not divisible to 100, but, if it is divisible to 400 then it is a leap year too :)

also some small todays example:

&lt;code lang="PHP"&gt;ini_set('session.timeout', 28800);&lt;/code&gt;

hope you will like it :)</description>
		<content:encoded><![CDATA[<p>Hi,<br />
As for me the best one is Dmytro Shteflyuk&#8217;s example with date validation.<br />
Btw, small addition to the leap year validation, it should be checked if it is divisible to 4, and not divisible to 100, but, if it is divisible to 400 then it is a leap year too <img src='http://erka.kpumuk.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>also some small todays example:</p>
<div class="codecolorer-container PHP" style="height:35px;"><div class="codecolorer" style="font-family: monospace;"><a href="http://www.php.net/ini_set"><span class="kw3">ini_set</span></a><span class="br0">&#40;</span><span class="st0">'session.timeout'</span>, <span class="nu0">28800</span><span class="br0">&#41;</span>;</div></div>
<p>hope you will like it <img src='http://erka.kpumuk.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: COTOHA</title>
		<link>http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11912</link>
		<dc:creator>COTOHA</dc:creator>
		<pubDate>Tue, 30 Nov 2010 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11912</guid>
		<description>флудя в блоге ты, эрка, не остановишь волну народного гнева. обманутый народ, он, знаешь ли, беспощаден...</description>
		<content:encoded><![CDATA[<p>флудя в блоге ты, эрка, не остановишь волну народного гнева. обманутый народ, он, знаешь ли, беспощаден&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: COTOHA</title>
		<link>http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11829</link>
		<dc:creator>COTOHA</dc:creator>
		<pubDate>Sun, 30 Nov 2008 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11829</guid>
		<description>осталось только показать как этот SQL оптимизируется... потому как если нет, то что тут такого? просто бокс - сложный спорт и требует сложных SQL'ей. :)</description>
		<content:encoded><![CDATA[<p>осталось только показать как этот SQL оптимизируется&#8230; потому как если нет, то что тут такого? просто бокс - сложный спорт и требует сложных SQL&#8217;ей. <img src='http://erka.kpumuk.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erka</title>
		<link>http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11814</link>
		<dc:creator>erka</dc:creator>
		<pubDate>Wed, 30 Nov 2011 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11814</guid>
		<description>Oooo... I have never seen a sql query like posted one.</description>
		<content:encoded><![CDATA[<p>Oooo&#8230; I have never seen a sql query like posted one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexey Kovyrin</title>
		<link>http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11813</link>
		<dc:creator>Alexey Kovyrin</dc:creator>
		<pubDate>Tue, 30 Nov 2010 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11813</guid>
		<description>While optimizing some customer application I've found following SQL query:

&lt;code lang="sql"&gt;
(SELECT
          country_code, region_name, towncity_name, venue_name, ticketing_number,
          shows.show_id, date, commission_id, locked, bouts.user, inserter,
          bouts.bout_id, rounds_scheduled, rounds_boxed, decision, bouts.division , result, time,
          boxer_a_id,
          boxer_a_weight,
          boxer_a.dob as boxer_a_dob,
          boxer_a.last_name as boxer_a_last_name,
          boxer_a.first_name as boxer_a_first_name,
          boxer_b_id,
          boxer_b_weight,
          boxer_b.dob as boxer_b_dob,
          boxer_b.last_name as boxer_b_last_name,
          boxer_b.first_name as boxer_b_first_name,
          judge1,
          jdg1_pts_a,
          jdg1_pts_b,
          judge1.last_name as judge1_last_name,
          judge1.first_name as judge1_first_name,
          judge2,
          jdg2_pts_a,
          jdg2_pts_b,
          judge2.last_name as judge2_last_name,
          judge2.first_name as judge2_first_name,
          judge3,
          jdg3_pts_a,
          jdg3_pts_b,
          judge3.last_name as judge3_last_name,
          judge3.first_name as judge3_first_name,
          referee,
          ref_pts_a,
          ref_pts_b,
          referee.last_name as referee_last_name,
          referee.first_name as referee_first_name
         FROM bouts
         JOIN shows ON bouts.show_id = shows.show_id
         JOIN venues ON shows.venue_id = venues.venue_id
         JOIN towncities ON venues.towncity_id = towncities.towncity_id
         JOIN humans AS boxer_a ON boxer_a.human_id = bouts.boxer_a_id
         JOIN humans AS boxer_b ON boxer_b.human_id = bouts.boxer_b_id
         JOIN humans AS referee ON referee.human_id = bouts.referee
         JOIN humans AS judge1 ON judge1.human_id = bouts.judge1
         JOIN humans AS judge2 ON judge2.human_id = bouts.judge2
         JOIN humans AS judge3 ON judge3.human_id = bouts.judge3
         WHERE
         (boxer_b_id = '001616') AND result = 'SC') UNION (SELECT
          country_code, region_name, towncity_name, venue_name, ticketing_number,
          shows.show_id, date, commission_id, locked, bouts.user, inserter,
          bouts.bout_id, rounds_scheduled, rounds_boxed, decision, bouts.division , result, time,
          boxer_a_id,
          boxer_a_weight,
          boxer_a.dob as boxer_a_dob,
          boxer_a.last_name as boxer_a_last_name,
          boxer_a.first_name as boxer_a_first_name,
          boxer_b_id,
          boxer_b_weight,
          boxer_b.dob as boxer_b_dob,
          boxer_b.last_name as boxer_b_last_name,
          boxer_b.first_name as boxer_b_first_name,
          judge1,
          jdg1_pts_a,
          jdg1_pts_b,
          judge1.last_name as judge1_last_name,
          judge1.first_name as judge1_first_name,
          judge2,
          jdg2_pts_a,
          jdg2_pts_b,
          judge2.last_name as judge2_last_name,
          judge2.first_name as judge2_first_name,
          judge3,
          jdg3_pts_a,
          jdg3_pts_b,
          judge3.last_name as judge3_last_name,
          judge3.first_name as judge3_first_name,
          referee,
          ref_pts_a,
          ref_pts_b,
          referee.last_name as referee_last_name,
          referee.first_name as referee_first_name
         FROM bouts
         JOIN shows ON bouts.show_id = shows.show_id
         JOIN venues ON shows.venue_id = venues.venue_id
         JOIN towncities ON venues.towncity_id = towncities.towncity_id
         JOIN humans AS boxer_a ON boxer_a.human_id = bouts.boxer_a_id
         JOIN humans AS boxer_b ON boxer_b.human_id = bouts.boxer_b_id
         JOIN humans AS referee ON referee.human_id = bouts.referee
         JOIN humans AS judge1 ON judge1.human_id = bouts.judge1
         JOIN humans AS judge2 ON judge2.human_id = bouts.judge2
         JOIN humans AS judge3 ON judge3.human_id = bouts.judge3
         WHERE
         (boxer_a_id = '001616') AND result = 'SC') ORDER BY date DESC;
&lt;/code&gt;

</description>
		<content:encoded><![CDATA[<p>While optimizing some customer application I&#8217;ve found following SQL query:</p>
<div class="codecolorer-container sql" style="height:560px;"><div class="codecolorer" style="font-family: monospace;"><span class="br0">&#40;</span><span class="kw1">SELECT</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; country_code, region_name, towncity_name, venue_name, ticketing_number,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; shows.show_id, date, commission_id, locked, bouts.user, inserter,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bouts.bout_id, rounds_scheduled, rounds_boxed, decision, bouts.division , result, time,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_a_id,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_a_weight,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_a.dob <span class="kw1">AS</span> boxer_a_dob,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_a.last_name <span class="kw1">AS</span> boxer_a_last_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_a.first_name <span class="kw1">AS</span> boxer_a_first_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_b_id,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_b_weight,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_b.dob <span class="kw1">AS</span> boxer_b_dob,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_b.last_name <span class="kw1">AS</span> boxer_b_last_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_b.first_name <span class="kw1">AS</span> boxer_b_first_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge1,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jdg1_pts_a,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jdg1_pts_b,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge1.last_name <span class="kw1">AS</span> judge1_last_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge1.first_name <span class="kw1">AS</span> judge1_first_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge2,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jdg2_pts_a,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jdg2_pts_b,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge2.last_name <span class="kw1">AS</span> judge2_last_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge2.first_name <span class="kw1">AS</span> judge2_first_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge3,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jdg3_pts_a,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jdg3_pts_b,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge3.last_name <span class="kw1">AS</span> judge3_last_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge3.first_name <span class="kw1">AS</span> judge3_first_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; referee,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ref_pts_a,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ref_pts_b,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; referee.last_name <span class="kw1">AS</span> referee_last_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; referee.first_name <span class="kw1">AS</span> referee_first_name<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">FROM</span> bouts<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> shows <span class="kw1">ON</span> bouts.show_id = shows.show_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> venues <span class="kw1">ON</span> shows.venue_id = venues.venue_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> towncities <span class="kw1">ON</span> venues.towncity_id = towncities.towncity_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> humans <span class="kw1">AS</span> boxer_a <span class="kw1">ON</span> boxer_a.human_id = bouts.boxer_a_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> humans <span class="kw1">AS</span> boxer_b <span class="kw1">ON</span> boxer_b.human_id = bouts.boxer_b_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> humans <span class="kw1">AS</span> referee <span class="kw1">ON</span> referee.human_id = bouts.referee<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> humans <span class="kw1">AS</span> judge1 <span class="kw1">ON</span> judge1.human_id = bouts.judge1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> humans <span class="kw1">AS</span> judge2 <span class="kw1">ON</span> judge2.human_id = bouts.judge2<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> humans <span class="kw1">AS</span> judge3 <span class="kw1">ON</span> judge3.human_id = bouts.judge3<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">WHERE</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#40;</span>boxer_b_id = <span class="st0">'001616'</span><span class="br0">&#41;</span> <span class="kw1">AND</span> result = <span class="st0">'SC'</span><span class="br0">&#41;</span> UNION <span class="br0">&#40;</span><span class="kw1">SELECT</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; country_code, region_name, towncity_name, venue_name, ticketing_number,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; shows.show_id, date, commission_id, locked, bouts.user, inserter,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bouts.bout_id, rounds_scheduled, rounds_boxed, decision, bouts.division , result, time,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_a_id,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_a_weight,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_a.dob <span class="kw1">AS</span> boxer_a_dob,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_a.last_name <span class="kw1">AS</span> boxer_a_last_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_a.first_name <span class="kw1">AS</span> boxer_a_first_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_b_id,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_b_weight,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_b.dob <span class="kw1">AS</span> boxer_b_dob,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_b.last_name <span class="kw1">AS</span> boxer_b_last_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boxer_b.first_name <span class="kw1">AS</span> boxer_b_first_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge1,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jdg1_pts_a,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jdg1_pts_b,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge1.last_name <span class="kw1">AS</span> judge1_last_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge1.first_name <span class="kw1">AS</span> judge1_first_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge2,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jdg2_pts_a,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jdg2_pts_b,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge2.last_name <span class="kw1">AS</span> judge2_last_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge2.first_name <span class="kw1">AS</span> judge2_first_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge3,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jdg3_pts_a,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jdg3_pts_b,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge3.last_name <span class="kw1">AS</span> judge3_last_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; judge3.first_name <span class="kw1">AS</span> judge3_first_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; referee,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ref_pts_a,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ref_pts_b,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; referee.last_name <span class="kw1">AS</span> referee_last_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; referee.first_name <span class="kw1">AS</span> referee_first_name<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">FROM</span> bouts<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> shows <span class="kw1">ON</span> bouts.show_id = shows.show_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> venues <span class="kw1">ON</span> shows.venue_id = venues.venue_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> towncities <span class="kw1">ON</span> venues.towncity_id = towncities.towncity_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> humans <span class="kw1">AS</span> boxer_a <span class="kw1">ON</span> boxer_a.human_id = bouts.boxer_a_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> humans <span class="kw1">AS</span> boxer_b <span class="kw1">ON</span> boxer_b.human_id = bouts.boxer_b_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> humans <span class="kw1">AS</span> referee <span class="kw1">ON</span> referee.human_id = bouts.referee<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> humans <span class="kw1">AS</span> judge1 <span class="kw1">ON</span> judge1.human_id = bouts.judge1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> humans <span class="kw1">AS</span> judge2 <span class="kw1">ON</span> judge2.human_id = bouts.judge2<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">JOIN</span> humans <span class="kw1">AS</span> judge3 <span class="kw1">ON</span> judge3.human_id = bouts.judge3<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">WHERE</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#40;</span>boxer_a_id = <span class="st0">'001616'</span><span class="br0">&#41;</span> <span class="kw1">AND</span> result = <span class="st0">'SC'</span><span class="br0">&#41;</span> <span class="kw1">ORDER</span> <span class="kw1">BY</span> date <span class="kw1">DESC</span>;</div></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: COTOHA</title>
		<link>http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11774</link>
		<dc:creator>COTOHA</dc:creator>
		<pubDate>Sun, 30 Nov 2003 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11774</guid>
		<description>At the end of the third week five finalists will be selected from all participating examples and everyone will be able to vote for the most worse code during a week (August 10 — August 16).
обман? ерка....</description>
		<content:encoded><![CDATA[<p>At the end of the third week five finalists will be selected from all participating examples and everyone will be able to vote for the most worse code during a week (August 10 — August 16).<br />
обман? ерка&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dmytro Shteflyuk</title>
		<link>http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11772</link>
		<dc:creator>Dmytro Shteflyuk</dc:creator>
		<pubDate>Fri, 30 Nov 2001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11772</guid>
		<description>Собственно и где же голосование? :-) Кажись провтыкали</description>
		<content:encoded><![CDATA[<p>Собственно и где же голосование? <img src='http://erka.kpumuk.info/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> Кажись провтыкали</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: COTOHA</title>
		<link>http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11654</link>
		<dc:creator>COTOHA</dc:creator>
		<pubDate>Thu, 30 Nov 2006 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11654</guid>
		<description>такое я тоже люблю:

&lt;code lang="java"&gt;if (logger.isDebugEnabled()) {
    logger.debug("Result = [" + result + "]");
}&lt;/code&gt;

повбивав би.</description>
		<content:encoded><![CDATA[<p>такое я тоже люблю:</p>
<div class="codecolorer-container java"><div class="codecolorer" style="font-family: monospace;"><span class="kw1">if</span> <span class="br0">&#40;</span>logger.<span class="me1">isDebugEnabled</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; logger.<span class="me1">debug</span><span class="br0">&#40;</span><span class="st0">&quot;Result = [&quot;</span> + result + <span class="st0">&quot;]&quot;</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span></div></div>
<p>повбивав би.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erka</title>
		<link>http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11646</link>
		<dc:creator>erka</dc:creator>
		<pubDate>Thu, 30 Nov 2000 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11646</guid>
		<description>Вот вершина мастерства.. метод напрямую вызывается через web services. Интересно, какая вероятность того, что я это сломаю?

Language: &lt;em&gt;Java&lt;/em&gt;

&lt;code lang="java"&gt;
    public Collection searchFreePID(String sql, String[] fields, String tableName, SearchFilter searchFilter) {
        logger.debug("#searchFreePID:enter");
        Collection result = null;
        try {
            if (tableName != null) {
                Pattern p = Pattern.compile("\\s*(SELECT\\s+)(.+)", Pattern.CASE_INSENSITIVE);
                Matcher m = p.matcher(sql);
                if (m.find()) {
                    sql = m.group(1) + OBLIGATORY_FIELDS + m.group(2);
                    StringBuffer buffer = new StringBuffer();
                    buffer.append(sql);
                    if (sql.indexOf("where") &lt; 1) {
                        buffer.append(" WHERE ");
                    }
                    buffer.append(" pid &lt;&gt; oid and pid = ");
                    if (searchFilter.getPid() != null) {
                        buffer.append(searchFilter.getPid());
                    } else {
                        buffer.append("-1");
                    }
                    sql = buffer.toString();
                    logger.debug("#sql = [" + sql + "]");
                    result = gFactory.selectFreeAll(sql, fields);
                }
            }
        } catch (Exception e) {
            logger.error("Exception in #searchAll", e);
        }
        if (logger.isDebugEnabled()) {
            logger.debug("Result = [" + result + "]");
        }
        logger.debug("#searchFreePID:exit");
        return result;
    }

&lt;/code&gt;

</description>
		<content:encoded><![CDATA[<p>Вот вершина мастерства.. метод напрямую вызывается через web services. Интересно, какая вероятность того, что я это сломаю?</p>
<p>Language: <em>Java</em></p>
<div class="codecolorer-container java"><div class="codecolorer" style="font-family: monospace;"><span class="kw2">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ACollection+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky"><span class="kw3">Collection</span></a> searchFreePID<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> sql, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a><span class="br0">&#91;</span><span class="br0">&#93;</span> fields, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> tableName, SearchFilter searchFilter<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; logger.<span class="me1">debug</span><span class="br0">&#40;</span><span class="st0">&quot;#searchFreePID:enter&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ACollection+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky"><span class="kw3">Collection</span></a> result = <span class="kw2">null</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">try</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>tableName != <span class="kw2">null</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Pattern p = Pattern.<span class="me1">compile</span><span class="br0">&#40;</span><span class="st0">&quot;<span class="es0">\\</span>s*(SELECT<span class="es0">\\</span>s+)(.+)&quot;</span>, Pattern.<span class="me1">CASE_INSENSITIVE</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Matcher m = p.<span class="me1">matcher</span><span class="br0">&#40;</span>sql<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>m.<span class="me1">find</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; sql = m.<span class="me1">group</span><span class="br0">&#40;</span><span class="nu0">1</span><span class="br0">&#41;</span> + OBLIGATORY_FIELDS + m.<span class="me1">group</span><span class="br0">&#40;</span><span class="nu0">2</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AStringBuffer+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky"><span class="kw3">StringBuffer</span></a> buffer = <span class="kw2">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AStringBuffer+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky"><span class="kw3">StringBuffer</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buffer.<span class="me1">append</span><span class="br0">&#40;</span>sql<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>sql.<span class="me1">indexOf</span><span class="br0">&#40;</span><span class="st0">&quot;where&quot;</span><span class="br0">&#41;</span> &lt; <span class="nu0">1</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buffer.<span class="me1">append</span><span class="br0">&#40;</span><span class="st0">&quot; WHERE &quot;</span><span class="br0">&#41;</span>;<br />
&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; buffer.<span class="me1">append</span><span class="br0">&#40;</span><span class="st0">&quot; pid &lt;&gt; oid and pid = &quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>searchFilter.<span class="me1">getPid</span><span class="br0">&#40;</span><span class="br0">&#41;</span> != <span class="kw2">null</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buffer.<span class="me1">append</span><span class="br0">&#40;</span>searchFilter.<span class="me1">getPid</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buffer.<span class="me1">append</span><span class="br0">&#40;</span><span class="st0">&quot;-1&quot;</span><span class="br0">&#41;</span>;<br />
&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; sql = buffer.<span class="me1">toString</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; logger.<span class="me1">debug</span><span class="br0">&#40;</span><span class="st0">&quot;#sql = [&quot;</span> + sql + <span class="st0">&quot;]&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result = gFactory.<span class="me1">selectFreeAll</span><span class="br0">&#40;</span>sql, fields<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw2">catch</span> <span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AException+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky"><span class="kw3">Exception</span></a> e<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; logger.<span class="me1">error</span><span class="br0">&#40;</span><span class="st0">&quot;Exception in #searchAll&quot;</span>, e<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>logger.<span class="me1">isDebugEnabled</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; logger.<span class="me1">debug</span><span class="br0">&#40;</span><span class="st0">&quot;Result = [&quot;</span> + result + <span class="st0">&quot;]&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; logger.<span class="me1">debug</span><span class="br0">&#40;</span><span class="st0">&quot;#searchFreePID:exit&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">return</span> result;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span></div></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: COTOHA</title>
		<link>http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11642</link>
		<dc:creator>COTOHA</dc:creator>
		<pubDate>Tue, 30 Nov 2010 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://erka.kpumuk.info/development/competition-laugh-or-cry/#comment-11642</guid>
		<description>ого. тяжолое детсво :) я до сих пор так кол-во дней в месяце проверяю :) а почему понравился в кавычках? если по отношению к коду я ещё кавычки пойму, то к истории... 

так. ну а критики конечно выдать могу больше я. можем проверить, если как-то формализовать правила проверки... но учти, что я их раскритикую!</description>
		<content:encoded><![CDATA[<p>ого. тяжолое детсво <img src='http://erka.kpumuk.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> я до сих пор так кол-во дней в месяце проверяю <img src='http://erka.kpumuk.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> а почему понравился в кавычках? если по отношению к коду я ещё кавычки пойму, то к истории&#8230; </p>
<p>так. ну а критики конечно выдать могу больше я. можем проверить, если как-то формализовать правила проверки&#8230; но учти, что я их раскритикую!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
