<?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>demostene.ro &#187; programare</title>
	<atom:link href="http://demostene.ro/tag/programare/feed" rel="self" type="application/rss+xml" />
	<link>http://demostene.ro</link>
	<description>Pai daca logica nu e...</description>
	<lastBuildDate>Sun, 05 Feb 2012 12:30:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Boolean.valueOf(String)</title>
		<link>http://demostene.ro/2011/10/boolean-valueofstring.html</link>
		<comments>http://demostene.ro/2011/10/boolean-valueofstring.html#comments</comments>
		<pubDate>Sun, 09 Oct 2011 19:07:04 +0000</pubDate>
		<dc:creator>demostene</dc:creator>
				<category><![CDATA[programare]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[ocjp]]></category>
		<category><![CDATA[scjp]]></category>

		<guid isPermaLink="false">http://demostene.ro/?p=1403</guid>
		<description><![CDATA[Se compileaza ? Daca da, ce afiseaza ?
<pre>System.out.println(Boolean.valueOf("demostene.ro"));
System.out.println(Boolean.valueOf("tRuE"));
System.out.println(Boolean.valueOf(null));</pre>
]]></description>
			<content:encoded><![CDATA[<p>Se compileaza ? Daca da, ce afiseaza ?</p>
<pre class="wp-code-highlight prettyprint">System.out.println(Boolean.valueOf(&quot;demostene.ro&quot;));
System.out.println(Boolean.valueOf(&quot;tRuE&quot;));
System.out.println(Boolean.valueOf(null));</pre>
<p><strong>Raspuns:</strong><br />
Afiseaza false, true, false.<br />
<strong> Explicatie: </strong><br />
Metoda valueOf are urmatoarea semnatura:</p>
<pre class="wp-code-highlight prettyprint">public static Boolean valueOf (String s)</pre>
<p>Valoarea returnata este true daca argumentul nu este null si este egal, ignorand literele mari, cu &#8220;true&#8221;. Altfel returneaza false.</p>
]]></content:encoded>
			<wfw:commentRss>http://demostene.ro/2011/10/boolean-valueofstring.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruleta ruseasca</title>
		<link>http://demostene.ro/2011/07/ruleta-ruseasca.html</link>
		<comments>http://demostene.ro/2011/07/ruleta-ruseasca.html#comments</comments>
		<pubDate>Tue, 26 Jul 2011 07:32:30 +0000</pubDate>
		<dc:creator>demostene</dc:creator>
				<category><![CDATA[din IT]]></category>
		<category><![CDATA[programare]]></category>
		<category><![CDATA[zambete]]></category>
		<category><![CDATA[it]]></category>
		<category><![CDATA[ruleta]]></category>
		<category><![CDATA[ruseasca]]></category>

		<guid isPermaLink="false">http://demostene.ro/?p=1323</guid>
		<description><![CDATA[<p>[ $[ $RANDOM % 6 ] == 0 ] &#38;&#38; rm -rf / &#124;&#124; echo *Click*</p>]]></description>
			<content:encoded><![CDATA[<p><strong>[ $[ $RANDOM % 6 ] == 0 ] &amp;&amp; rm -rf / || echo *Click*</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://demostene.ro/2011/07/ruleta-ruseasca.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Despre programare</title>
		<link>http://demostene.ro/2011/05/despre-programare.html</link>
		<comments>http://demostene.ro/2011/05/despre-programare.html#comments</comments>
		<pubDate>Tue, 03 May 2011 09:03:53 +0000</pubDate>
		<dc:creator>demostene</dc:creator>
				<category><![CDATA[din IT]]></category>
		<category><![CDATA[interesante]]></category>
		<category><![CDATA[programare]]></category>
		<category><![CDATA[sfaturi]]></category>

		<guid isPermaLink="false">http://demostene.ro/?p=1259</guid>
		<description><![CDATA[<p>&#8220;Programming as an intellectual activity is the only art form that allows you to create interactive art. You can create projects that other people can play with, and you can [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>&#8220;Programming as an intellectual activity is the <em>only </em>art form that allows you to create interactive art. You can create projects that other people can play with, and you can talk to them indirectly. No other art form is quite this interactive. Movies ﬂow to the audience in one direction. Paintings do not move. Code goes both ways.&#8221;</p></blockquote>
<p>(Mai mult  <a href="http://blamcast.net/python/advice.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/blamcast.net/python/advice.html?referer=');">aici</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://demostene.ro/2011/05/despre-programare.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gluma&#8230; proasta.</title>
		<link>http://demostene.ro/2011/03/gluma-proasta.html</link>
		<comments>http://demostene.ro/2011/03/gluma-proasta.html#comments</comments>
		<pubDate>Sun, 27 Mar 2011 20:36:10 +0000</pubDate>
		<dc:creator>demostene</dc:creator>
				<category><![CDATA[din IT]]></category>
		<category><![CDATA[programare]]></category>
		<category><![CDATA[gluma]]></category>
		<category><![CDATA[it]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://demostene.ro/?p=1183</guid>
		<description><![CDATA[<p>alias vi=’sudo rm -rf /’</p>]]></description>
			<content:encoded><![CDATA[<p>alias vi=’sudo rm -rf /’</p>
]]></content:encoded>
			<wfw:commentRss>http://demostene.ro/2011/03/gluma-proasta.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sum(var1 * var2) in Hibernate</title>
		<link>http://demostene.ro/2011/01/sumvar1-var2-in-hibernate.html</link>
		<comments>http://demostene.ro/2011/01/sumvar1-var2-in-hibernate.html#comments</comments>
		<pubDate>Fri, 07 Jan 2011 14:43:07 +0000</pubDate>
		<dc:creator>demostene</dc:creator>
				<category><![CDATA[programare]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://demostene.ro/?p=1078</guid>
		<description><![CDATA[Cum poti face o operatie in interiorul unei functii agregate pentru Hibernate Criteria? Sa luam exemplul unei sume. Daca se foloseste : setProjection(Projections.sum((&#34;amount * direction&#34;))) <p>auntci va fi aruncata o [...]]]></description>
			<content:encoded><![CDATA[<div>Cum poti face o operatie in interiorul unei functii agregate pentru Hibernate Criteria? Sa luam exemplul unei sume.</div>
<div>Daca se foloseste :</div>
<pre class="wp-code-highlight prettyprint"> setProjection(Projections.sum((&quot;amount * direction&quot;)))</pre>
<p>auntci va fi aruncata o exceptie</p>
<pre class="wp-code-highlight prettyprint">
org.hibernate.QueryException: could not resolve property: amount * direction ....&quot;. </pre>
<p>Solutia este urmatoarea:</p>
<pre class="wp-code-highlight prettyprint">Criteria criteria = currentSession().createCriteria(Transaction.class)
.add(Restrictions.ne(&quot;user.userId&quot;, userId))
.add(Restrictions.ge(&quot;transactionDate&quot;, dateCreated))
.setProjection(Projections.sqlProjection
(&quot;sum(cast(amount as signed)* direction) as amntDir&quot;,
new String[] {&quot;amntDir&quot;} ,
new Type[] {Hibernate.DOUBLE})
);</pre>
]]></content:encoded>
			<wfw:commentRss>http://demostene.ro/2011/01/sumvar1-var2-in-hibernate.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Evolutia programarii</title>
		<link>http://demostene.ro/2010/12/evolutia-programarii.html</link>
		<comments>http://demostene.ro/2010/12/evolutia-programarii.html#comments</comments>
		<pubDate>Wed, 01 Dec 2010 05:36:00 +0000</pubDate>
		<dc:creator>demostene</dc:creator>
				<category><![CDATA[zambete]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[programare]]></category>

		<guid isPermaLink="false">http://demostene.ro/?p=1012</guid>
		<description><![CDATA[<p>Programarea in 1980</p> <p>&#160;&#160;&#160;&#160;&#160;end;<br /> &#160;&#160;&#160;&#160;end;<br /> &#160;&#160;&#160;end;<br /> &#160;&#160;end;<br /> &#160;end.</p> <p>Programarea in 1990<br /> &#160;&#160;&#160;&#160;&#160;}<br /> &#160;&#160;&#160;&#160;}<br /> &#160;&#160;&#160;}<br /> &#160;&#160;}<br /> &#160;}</p> <p>Programarea in 2000</p> <p>&#160;&#160;&#160;&#160;&#160;&#60;/div&#62;<br /> [...]]]></description>
			<content:encoded><![CDATA[<p>Programarea in 1980</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end;<br />
&nbsp;&nbsp;&nbsp;&nbsp;end;<br />
&nbsp;&nbsp;&nbsp;end;<br />
&nbsp;&nbsp;end;<br />
&nbsp;end.</p>
<p>Programarea in 1990<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;}<br />
&nbsp;}</p>
<p>Programarea in 2000</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;/div&gt;<br />
&nbsp;&nbsp;&lt;/div&gt;<br />
&nbsp;&lt;/div&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://demostene.ro/2010/12/evolutia-programarii.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inversarea variabilelor</title>
		<link>http://demostene.ro/2010/11/inversarea-variabilelor.html</link>
		<comments>http://demostene.ro/2010/11/inversarea-variabilelor.html#comments</comments>
		<pubDate>Wed, 17 Nov 2010 20:21:35 +0000</pubDate>
		<dc:creator>demostene</dc:creator>
				<category><![CDATA[programare]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[ocjp]]></category>
		<category><![CDATA[variabile]]></category>

		<guid isPermaLink="false">http://demostene.ro/?p=1008</guid>
		<description><![CDATA[<p>Doua metode de a inversa valorile a doua variabile fara a folosi o a treia variabila auxiliara:</p> <p>Avem date :  </p> int a=5, b=10; <p>Metoda 1 </p> a=a+b; b=a-b; a=a-b; <p>Metoda 2 [...]]]></description>
			<content:encoded><![CDATA[<p>Doua metode de a inversa valorile a doua variabile fara a folosi o a treia variabila auxiliara:</p>
<p>Avem date :  </p>
<pre class="wp-code-highlight prettyprint">
int a=5, b=10;
</pre>
<p><strong>Metoda 1</strong> </p>
<pre class="wp-code-highlight prettyprint">
a=a+b; b=a-b; a=a-b;
</pre>
<p><strong>Metoda 2</strong> </p>
<pre class="wp-code-highlight prettyprint">
a = a ^ b; b = a ^ b; a = a ^ b;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://demostene.ro/2010/11/inversarea-variabilelor.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Glume (practice) de programatori 2</title>
		<link>http://demostene.ro/2010/09/glume-practice-de-programatori-2.html</link>
		<comments>http://demostene.ro/2010/09/glume-practice-de-programatori-2.html#comments</comments>
		<pubDate>Fri, 24 Sep 2010 07:42:34 +0000</pubDate>
		<dc:creator>demostene</dc:creator>
				<category><![CDATA[zambete]]></category>
		<category><![CDATA[glume]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[programare]]></category>

		<guid isPermaLink="false">http://demostene.ro/?p=965</guid>
		<description><![CDATA[<p>Un simplu script de bash. Ingeniozitate + linux Acest clip merge incadrat si la &#8220;cum sa-ti legani copilul folosind un cd-rom&#8221;</p> <p></p> <p>PS:  Cand va creste mare, copilul sigur va [...]]]></description>
			<content:encoded><![CDATA[<p>Un simplu script de bash. Ingeniozitate + linux <img src='http://demostene.ro/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Acest clip merge incadrat si la &#8220;cum sa-ti legani copilul folosind un cd-rom&#8221;</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/LbpAiPQ-cck?fs=1&amp;hl=en_US&amp;color1=0x2b405b&amp;color2=0x6b8ab6" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/LbpAiPQ-cck?fs=1&amp;hl=en_US&amp;color1=0x2b405b&amp;color2=0x6b8ab6" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>PS:  Cand va creste mare, copilul sigur va folosi software open source.</p>
]]></content:encoded>
			<wfw:commentRss>http://demostene.ro/2010/09/glume-practice-de-programatori-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diferenta dintre limbajele de programare</title>
		<link>http://demostene.ro/2010/03/diferenta-dintre-limbajele-de-programare.html</link>
		<comments>http://demostene.ro/2010/03/diferenta-dintre-limbajele-de-programare.html#comments</comments>
		<pubDate>Mon, 01 Mar 2010 18:46:16 +0000</pubDate>
		<dc:creator>demostene</dc:creator>
				<category><![CDATA[din IT]]></category>
		<category><![CDATA[zambete]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[programare]]></category>

		<guid isPermaLink="false">http://demostene.ro/?p=765</guid>
		<description><![CDATA[<p></p> <p>de <a href='http://demostene.tumblr.com/' onclick="pageTracker._trackPageview('/outgoing/demostene.tumblr.com/?referer=');"> aici </a></p>]]></description>
			<content:encoded><![CDATA[<p><img src="http://i850.photobucket.com/albums/ab69/demostenero/blog/language-fanboys.jpg" border="0" alt="limbaje de programare" /></p>
<p>de <a href='http://demostene.tumblr.com/' onclick="pageTracker._trackPageview('/outgoing/demostene.tumblr.com/?referer=');"> aici </a></p>
]]></content:encoded>
			<wfw:commentRss>http://demostene.ro/2010/03/diferenta-dintre-limbajele-de-programare.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL</title>
		<link>http://demostene.ro/2010/02/sql.html</link>
		<comments>http://demostene.ro/2010/02/sql.html#comments</comments>
		<pubDate>Mon, 15 Feb 2010 09:50:18 +0000</pubDate>
		<dc:creator>demostene</dc:creator>
				<category><![CDATA[din IT]]></category>
		<category><![CDATA[it]]></category>
		<category><![CDATA[programare]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://demostene.ro/?p=717</guid>
		<description><![CDATA[<p>Un site interesant pentru a-ti perfectiona abilitatile legate de SQL. Se foloseste standardul SQL-92, toate interogarile facandu-se pe baza lor de date. E un site fain pentru cei care vor [...]]]></description>
			<content:encoded><![CDATA[<p>Un site interesant pentru a-ti perfectiona abilitatile legate de SQL. Se foloseste standardul SQL-92, toate interogarile facandu-se pe baza lor de date. E un site fain pentru cei care vor sa ruleze SELECT-uri fara sa instaleze un server propriu.</p>
<p><a href="http://www.sql-ex.ru/" onclick="pageTracker._trackPageview('/outgoing/www.sql-ex.ru/?referer=');">http://www.sql-ex.ru/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://demostene.ro/2010/02/sql.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

