<?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>k40s.org &#187; Informática</title>
	<atom:link href="http://www.k40s.org/category/informatica/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.k40s.org</link>
	<description></description>
	<lastBuildDate>Thu, 19 Jan 2012 20:04:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>El FBI cierra Megaupload y detiene a sus responsables</title>
		<link>http://www.k40s.org/2012/01/19/el-fbi-cierra-megaupload-y-detiene-a-sus-responsables/</link>
		<comments>http://www.k40s.org/2012/01/19/el-fbi-cierra-megaupload-y-detiene-a-sus-responsables/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 20:02:54 +0000</pubDate>
		<dc:creator>k40s</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[censura]]></category>
		<category><![CDATA[FBI]]></category>
		<category><![CDATA[libertad]]></category>
		<category><![CDATA[megaupload]]></category>
		<category><![CDATA[SOPA]]></category>

		<guid isPermaLink="false">http://www.k40s.org/?p=1397</guid>
		<description><![CDATA[Se nos empieza a atragantar la SOPA. Toda la información en ALT1040. Comunicado de prensa del FBI: WASHINGTON &#8211; Seven individuals and two corporations have been charged in the United States with running an international organized criminal enterprise allegedly responsible for massive worldwide online piracy of numerous types of copyrighted works, through Megaupload.com and other [...]]]></description>
			<content:encoded><![CDATA[<p>Se nos empieza a atragantar la <a href="http://es.wikipedia.org/wiki/Stop_Online_Piracy_Act" title="SOPA en la wikipedia">SOPA</a>. Toda la información en <a href="http://alt1040.com/2012/01/megaupload-cierra" title="ALT1040 cierra megaupload">ALT1040</a>.</p>
<p>Comunicado de prensa del FBI:</p>
<blockquote><p>WASHINGTON &#8211; Seven individuals and two corporations have been charged in the United States with running an international organized criminal enterprise allegedly responsible for massive worldwide online piracy of numerous types of copyrighted works, through Megaupload.com and other related sites, generating more than $175 million in criminal proceeds and causing more than half a billion dollars in harm to copyright owners, the U.S. Justice Department and FBI announced today.</p>
<p>This action is among the largest criminal copyright cases ever brought by the United States and directly targets the misuse of a public content storage and distribution site to commit and facilitate intellectual property crime.</p>
<p>The individuals and two corporations &#8211; Megaupload Limited and Vestor Limited &#8211; were indicted by a grand jury in the Eastern District of Virginia on Jan. 5, 2012, and charged with engaging in a racketeering conspiracy, conspiring to commit copyright infringement, conspiring to commit money laundering and two substantive counts of criminal copyright infringement. The individuals each face a maximum penalty of 20 years in prison on the charge of conspiracy to commit racketeering, five years in prison on the charge of conspiracy to commit copyright infringement, 20 years in prison on the charge of conspiracy to commit money laundering and five years in prison on each of the substantive charges of criminal copyright infringement.</p>
<p>The indictment alleges that the criminal enterprise is led by Kim Dotcom, aka Kim Schmitz and Kim Tim Jim Vestor, 37, a resident of both Hong Kong and New Zealand. Dotcom founded Megaupload Limited and is the director and sole shareholder of Vestor Limited, which has been used to hold his ownership interests in the Mega-affiliated sites.</p>
<p>In addition, the following alleged members of the Mega conspiracy were charged in the indictment:</p>
<ul>
<li>Finn Batato, 38, a citizen and resident of Germany, who is the chief marketing officer;</li>
<li>Julius Bencko, 35, a citizen and resident of Slovakia, who is the graphic designer;</li>
<li>Sven Echternach, 39, a citizen and resident of Germany, who is the head of business development;</li>
<li>Mathias Ortmann, 40, a citizen of Germany and resident of both Germany and Hong Kong, who is the chief technical officer, co-founder and director;</li>
<li>Andrus Nomm, 32, a citizen of Estonia and resident of both Turkey and Estonia, who is a software programmer and head of the development software division;</li>
<li>Bram van der Kolk, aka Bramos, 29, a Dutch citizen and resident of both the Netherlands and New Zealand, who oversees programming and the underlying network structure for the Mega conspiracy websites.</li>
</ul>
</blockquote>

	Etiquetas: <a href="http://www.k40s.org/tag/censura/" title="censura" rel="tag">censura</a>, <a href="http://www.k40s.org/tag/fbi/" title="FBI" rel="tag">FBI</a>, <a href="http://www.k40s.org/tag/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.k40s.org/tag/libertad/" title="libertad" rel="tag">libertad</a>, <a href="http://www.k40s.org/tag/megaupload/" title="megaupload" rel="tag">megaupload</a>, <a href="http://www.k40s.org/tag/sopa/" title="SOPA" rel="tag">SOPA</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.k40s.org/2012/01/19/el-fbi-cierra-megaupload-y-detiene-a-sus-responsables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Método para recorrer todos los componentes Swing</title>
		<link>http://www.k40s.org/2010/10/09/metodo-para-recorrer-y-habilitardeshabilitar-todos-los-componentes-swing/</link>
		<comments>http://www.k40s.org/2010/10/09/metodo-para-recorrer-y-habilitardeshabilitar-todos-los-componentes-swing/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 15:50:15 +0000</pubDate>
		<dc:creator>k40s</dc:creator>
				<category><![CDATA[Programacion]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[programacion]]></category>
		<category><![CDATA[swing]]></category>

		<guid isPermaLink="false">http://www.k40s.org/?p=1337</guid>
		<description><![CDATA[Método recursivo para setear propiedades a todos los componentes swing contenidos en el que se mande. Por ejemplo le mandas el nombre de un panel y todos los que estén dentro de el quedarán a no editable. Pero puedes aplicar los cambios que quieras y solo a determinadas instancias. Por ejemplo, si solo quieres poner [...]]]></description>
			<content:encoded><![CDATA[<p>Método recursivo para setear propiedades a todos los componentes swing contenidos en el que se mande. Por ejemplo le mandas el nombre de un panel y todos los que estén dentro de el quedarán a no editable. Pero puedes aplicar los cambios que quieras y solo a determinadas instancias. Por ejemplo, si solo quieres poner en rojo la letra de las JLabel borras todo excepto la llamada recursiva y pones:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>component <span style="color: #000000; font-weight: bold;">instanceof</span> <span style="color: #003399;">JLabel</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">JLabel</span><span style="color: #009900;">&#41;</span> component<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setForeground</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Color</span>.<span style="color: #006633;">RED</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>NOTA: IntegerField, LimitedTextField y DecimalField no son componentes propios de swing, si no variaciones del JTextField creadas por un compañero y yo mismo para determinados propósitos. Y el componente JDateChooser está sacado del JCalendar, puedes encontrar la librería en <a href="http://www.toedter.com/en/jcalendar/index.html">esta web</a>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">void</span> enableFields<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">boolean</span> option, <span style="color: #003399;">JComponent</span> jCompo<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003399;">Component</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> arrayCompo <span style="color: #339933;">=</span> jCompo.<span style="color: #006633;">getComponents</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Component</span> component <span style="color: #339933;">:</span> arrayCompo<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>component <span style="color: #000000; font-weight: bold;">instanceof</span> IntegerField<span style="color: #009900;">&#41;</span>       <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>IntegerField<span style="color: #009900;">&#41;</span> component<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setEnabled</span><span style="color: #009900;">&#40;</span>option<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>component <span style="color: #000000; font-weight: bold;">instanceof</span> LimitedTextField<span style="color: #009900;">&#41;</span>   <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>LimitedTextField<span style="color: #009900;">&#41;</span> component<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setEnabled</span><span style="color: #009900;">&#40;</span>option<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>component <span style="color: #000000; font-weight: bold;">instanceof</span> DecimalField<span style="color: #009900;">&#41;</span>       <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>DecimalField<span style="color: #009900;">&#41;</span> component<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setEnabled</span><span style="color: #009900;">&#40;</span>option<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>component <span style="color: #000000; font-weight: bold;">instanceof</span> <span style="color: #003399;">JTextField</span><span style="color: #009900;">&#41;</span>         <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">JTextField</span><span style="color: #009900;">&#41;</span> component<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setEnabled</span><span style="color: #009900;">&#40;</span>option<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>component <span style="color: #000000; font-weight: bold;">instanceof</span> <span style="color: #003399;">JTextArea</span><span style="color: #009900;">&#41;</span>          <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">JTextArea</span><span style="color: #009900;">&#41;</span> component<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setEnabled</span><span style="color: #009900;">&#40;</span>option<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>component <span style="color: #000000; font-weight: bold;">instanceof</span> <span style="color: #003399;">JComboBox</span><span style="color: #009900;">&#41;</span>          <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">JComboBox</span><span style="color: #009900;">&#41;</span> component<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setEnabled</span><span style="color: #009900;">&#40;</span>option<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>component <span style="color: #000000; font-weight: bold;">instanceof</span> <span style="color: #003399;">JButton</span><span style="color: #009900;">&#41;</span>            <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">JButton</span><span style="color: #009900;">&#41;</span> component<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setEnabled</span><span style="color: #009900;">&#40;</span>option<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>component <span style="color: #000000; font-weight: bold;">instanceof</span> JDateChooser<span style="color: #009900;">&#41;</span>       <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>JDateChooser<span style="color: #009900;">&#41;</span> component<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getDateEditor</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setEnabled</span><span style="color: #009900;">&#40;</span>option<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>component <span style="color: #000000; font-weight: bold;">instanceof</span> <span style="color: #003399;">JRadioButton</span><span style="color: #009900;">&#41;</span>       <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">JRadioButton</span><span style="color: #009900;">&#41;</span> component<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setEnabled</span><span style="color: #009900;">&#40;</span>option<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>component <span style="color: #000000; font-weight: bold;">instanceof</span> <span style="color: #003399;">JCheckBox</span><span style="color: #009900;">&#41;</span>          <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">JCheckBox</span><span style="color: #009900;">&#41;</span> component<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setEnabled</span><span style="color: #009900;">&#40;</span>option<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>component <span style="color: #000000; font-weight: bold;">instanceof</span> <span style="color: #003399;">JSlider</span><span style="color: #009900;">&#41;</span>            <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">JSlider</span><span style="color: #009900;">&#41;</span> component<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setEnabled</span><span style="color: #009900;">&#40;</span>option<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>component <span style="color: #000000; font-weight: bold;">instanceof</span> JSpinner<span style="color: #009900;">&#41;</span>           <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>JSpinner<span style="color: #009900;">&#41;</span> component<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setEnabled</span><span style="color: #009900;">&#40;</span>option<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>component <span style="color: #000000; font-weight: bold;">instanceof</span> <span style="color: #003399;">JComponent</span><span style="color: #009900;">&#41;</span>         enableFields<span style="color: #009900;">&#40;</span>option, <span style="color: #009900;">&#40;</span><span style="color: #003399;">JComponent</span><span style="color: #009900;">&#41;</span>component<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//habilitar</span>
enableFields<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span>,MiPanel.<span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//deshabilitar</span>
enableFields<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">false</span>,MiPanel.<span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>


	Etiquetas: <a href="http://www.k40s.org/tag/java/" title="Java" rel="tag">Java</a>, <a href="http://www.k40s.org/tag/programacion/" title="programacion" rel="tag">programacion</a>, <a href="http://www.k40s.org/tag/swing/" title="swing" rel="tag">swing</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.k40s.org/2010/10/09/metodo-para-recorrer-y-habilitardeshabilitar-todos-los-componentes-swing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Imagen aleatoria al recargar la web con javascript</title>
		<link>http://www.k40s.org/2010/08/07/imagen-aleatoria-al-recargar-la-web-con-javascript/</link>
		<comments>http://www.k40s.org/2010/08/07/imagen-aleatoria-al-recargar-la-web-con-javascript/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 19:01:14 +0000</pubDate>
		<dc:creator>k40s</dc:creator>
				<category><![CDATA[Programacion]]></category>
		<category><![CDATA[Web2.0]]></category>
		<category><![CDATA[diseño web]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[programacion]]></category>

		<guid isPermaLink="false">http://www.k40s.org/?p=1312</guid>
		<description><![CDATA[Este snippet lo tenía guardado hace bastante tiempo y aun no lo había probado, y ahora lo estoy usando en una web que estoy diseñando, y como funciona a las mil maravillas pues lo comparto. Funciona simplemente con añadir este código dentro de las etiquetas body de la web: 1 2 3 4 5 6 [...]]]></description>
			<content:encoded><![CDATA[<p>Este <em>snippet</em> lo tenía guardado hace bastante tiempo y aun no lo había probado, y ahora lo estoy usando en una web que estoy diseñando, y como funciona a las mil maravillas pues lo comparto.<br />
Funciona simplemente con añadir este código dentro de las etiquetas <em>body</em> de la web:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;javascript&quot;</span><span style="color: #339933;">&gt;</span>
      <span style="color: #003366; font-weight: bold;">function</span> RandomImage<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         n<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
         <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span>n<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;img01.jpg&quot;</span><span style="color: #339933;">;</span>
         <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span>n<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;img02.jpg&quot;</span><span style="color: #339933;">;</span>
         <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span>n<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;img03.jpg&quot;</span><span style="color: #339933;">;</span>
         <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span>n<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;img04.jpg&quot;</span><span style="color: #339933;">;</span>
         <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">N</span><span style="color: #339933;">=</span>n<span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
      <span style="color: #003366; font-weight: bold;">var</span> Imagenes <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> RandomImage<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      src <span style="color: #339933;">=</span> Imagenes<span style="color: #009900;">&#91;</span> Math.<span style="color: #660066;">floor</span><span style="color: #009900;">&#40;</span>Math.<span style="color: #660066;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> Imagenes.<span style="color: #660066;">N</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#93;</span> <span style="color: #339933;">;</span>
      document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;img src='&quot;</span><span style="color: #339933;">+</span>src<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;'&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Desconozco la fuente de donde lo saqué tiempo atrás. Pero mio el código no es.</p>

	Etiquetas: <a href="http://www.k40s.org/tag/diseno-web/" title="diseño web" rel="tag">diseño web</a>, <a href="http://www.k40s.org/tag/javascript/" title="javascript" rel="tag">javascript</a>, <a href="http://www.k40s.org/tag/programacion/" title="programacion" rel="tag">programacion</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.k40s.org/2010/08/07/imagen-aleatoria-al-recargar-la-web-con-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java vs .Net</title>
		<link>http://www.k40s.org/2010/08/07/java-vs-net/</link>
		<comments>http://www.k40s.org/2010/08/07/java-vs-net/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 16:57:44 +0000</pubDate>
		<dc:creator>k40s</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Informática]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programacion]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[programacion]]></category>

		<guid isPermaLink="false">http://www.k40s.org/?p=1310</guid>
		<description><![CDATA[En los mejores cines: Etiquetas: .net, Humor, Informática, Java, programacion]]></description>
			<content:encoded><![CDATA[<p>En los mejores cines:<br />
<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/znTKuCyMrsk&amp;hl=es_ES&amp;fs=1?rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/znTKuCyMrsk&amp;hl=es_ES&amp;fs=1?rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>

	Etiquetas: <a href="http://www.k40s.org/tag/net/" title=".net" rel="tag">.net</a>, <a href="http://www.k40s.org/tag/humor/" title="Humor" rel="tag">Humor</a>, <a href="http://www.k40s.org/tag/informatica/" title="Informática" rel="tag">Informática</a>, <a href="http://www.k40s.org/tag/java/" title="Java" rel="tag">Java</a>, <a href="http://www.k40s.org/tag/programacion/" title="programacion" rel="tag">programacion</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.k40s.org/2010/08/07/java-vs-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clase Java para conexión y uso de base de datos</title>
		<link>http://www.k40s.org/2010/04/16/clase-java-para-conexion-y-uso-de-base-de-datos/</link>
		<comments>http://www.k40s.org/2010/04/16/clase-java-para-conexion-y-uso-de-base-de-datos/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 10:49:54 +0000</pubDate>
		<dc:creator>k40s</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[base de datos]]></category>
		<category><![CDATA[programacion]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.k40s.org/?p=1267</guid>
		<description><![CDATA[Tengo esto muy abandonado, pero entre estudios y otras situaciones no dispongo de demasiado tiempo y ganas. Ahora mismo estoy de practicas en una empresa de software, de momento estoy haciendo pruebas y leyendo documentación de Java, JSP y demás derivados. Hoy he hecho una clase para conectar a base de datos, y la pongo [...]]]></description>
			<content:encoded><![CDATA[<p>Tengo esto muy abandonado, pero entre estudios y otras situaciones no dispongo de demasiado tiempo y ganas. Ahora mismo estoy de practicas en una empresa de software, de momento estoy haciendo pruebas y leyendo documentación de Java, JSP y demás derivados.</p>
<p>Hoy he hecho una clase para conectar a base de datos, y la pongo aquí para compartirla y revivir un poco el blog:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.Connection</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.DriverManager</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.ResultSet</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.SQLException</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.sql.Statement</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Conectadb<span style="color: #009900;">&#123;</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">//variables miembro</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> usuario<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> clave<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> url<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> driverClassName<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">Connection</span> conn <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">Statement</span> estancia<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//CONSTRUCTORES</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//Constructor que toma los datos de conexion por medio de parametros</span>
    <span style="color: #000000; font-weight: bold;">public</span> Conectadb<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> usuario, <span style="color: #003399;">String</span> clave, <span style="color: #003399;">String</span> url, <span style="color: #003399;">String</span> driverClassName<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">usuario</span> <span style="color: #339933;">=</span> usuario<span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">clave</span> <span style="color: #339933;">=</span> clave<span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">url</span> <span style="color: #339933;">=</span> url<span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">driverClassName</span> <span style="color: #339933;">=</span> driverClassName<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//Constructor que crea la conexion sin parametros con unos definidos en la clase</span>
    <span style="color: #666666; font-style: italic;">//(meter los datos correspondientes)</span>
    <span style="color: #000000; font-weight: bold;">public</span> Conectadb<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">//poner los datos apropiados</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">usuario</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;usuario&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">clave</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;clave&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;xxxx:xxxx://url:puerto/lugar&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">driverClassName</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;el.driver.de.la.base.datos&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//metodos para recuperar los datos de conexion</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> getClave<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> clave<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> getUrl<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> url<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> getUsuario<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> usuario<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">Connection</span> getConn<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> conn<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> getDriverClassName<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">return</span> driverClassName<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//metodos para establecer los valores de conexion</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setClave<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> clave<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">clave</span> <span style="color: #339933;">=</span> clave<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setUrl<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> url<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">url</span> <span style="color: #339933;">=</span> url<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setUsuario<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> usuario<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">SQLException</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">usuario</span> <span style="color: #339933;">=</span> usuario<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setConn<span style="color: #009900;">&#40;</span><span style="color: #003399;">Connection</span> conn<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">conn</span> <span style="color: #339933;">=</span> conn<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> setDriverClassName<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> driverClassName<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">driverClassName</span> <span style="color: #339933;">=</span> driverClassName<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//la conexion propiamente dicha</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> conectar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">SQLException</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">Class</span>.<span style="color: #006633;">forName</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">driverClassName</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">newInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">conn</span> <span style="color: #339933;">=</span> <span style="color: #003399;">DriverManager</span>.<span style="color: #006633;">getConnection</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">url</span>, <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">usuario</span>, <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">clave</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> err<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Error &quot;</span> <span style="color: #339933;">+</span> err.<span style="color: #006633;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #666666; font-style: italic;">//Cerrar la conexion</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> cierraConexion<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">SQLException</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">conn</span>.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//METODOS PARA TRABAJAR CON LA BASE DE DATOS</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">ResultSet</span> consulta<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> consulta<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">SQLException</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">estancia</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Statement</span><span style="color: #009900;">&#41;</span> conn.<span style="color: #006633;">createStatement</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">estancia</span>.<span style="color: #006633;">executeQuery</span><span style="color: #009900;">&#40;</span>consulta<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> actualizar<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> actualiza<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">SQLException</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">estancia</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Statement</span><span style="color: #009900;">&#41;</span> conn.<span style="color: #006633;">createStatement</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        estancia.<span style="color: #006633;">executeUpdate</span><span style="color: #009900;">&#40;</span>actualiza<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">ResultSet</span> borrar<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> borra<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">SQLException</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003399;">Statement</span> st <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Statement</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">conn</span>.<span style="color: #006633;">createStatement</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">ResultSet</span><span style="color: #009900;">&#41;</span> st.<span style="color: #006633;">executeQuery</span><span style="color: #009900;">&#40;</span>borra<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">int</span> insertar<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> inserta<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">SQLException</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003399;">Statement</span> st <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Statement</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">conn</span>.<span style="color: #006633;">createStatement</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">return</span> st.<span style="color: #006633;">executeUpdate</span><span style="color: #009900;">&#40;</span>inserta<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


	Etiquetas: <a href="http://www.k40s.org/tag/base-de-datos/" title="base de datos" rel="tag">base de datos</a>, <a href="http://www.k40s.org/tag/java/" title="Java" rel="tag">Java</a>, <a href="http://www.k40s.org/tag/programacion/" title="programacion" rel="tag">programacion</a>, <a href="http://www.k40s.org/tag/sql/" title="sql" rel="tag">sql</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.k40s.org/2010/04/16/clase-java-para-conexion-y-uso-de-base-de-datos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mejoras en el &#8220;Mark all as read&#8221; de Google Reader</title>
		<link>http://www.k40s.org/2009/08/13/mejoras-en-el-mark-all-as-read-de-google-reader/</link>
		<comments>http://www.k40s.org/2009/08/13/mejoras-en-el-mark-all-as-read-de-google-reader/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 13:21:01 +0000</pubDate>
		<dc:creator>k40s</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[feeds]]></category>
		<category><![CDATA[google reader]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.k40s.org/?p=1250</guid>
		<description><![CDATA[Poco a poco van produciéndose mejoras en el lector de feeds de Google; esta vez es el turno del botón &#8220;mark all as read&#8221; (marcar todos como leídos). En la siguiente captura se ven las mejoras: Ahora no sólo podemos marcar todas como leídas si no sólo las mas viejas dependiendo de su fecha de [...]]]></description>
			<content:encoded><![CDATA[<p>Poco a poco  van produciéndose mejoras en el lector de feeds de Google; esta vez es el turno del botón &#8220;mark all as read&#8221; (marcar todos como leídos). En la siguiente captura se ven las mejoras:</p>
<p><center><br />
<img src="http://farm4.static.flickr.com/3524/3816982277_0c41ebf41e_o.png" alt="MAAR" /><br />
</center></p>
<p>Ahora no sólo podemos marcar todas como leídas si no sólo las mas viejas dependiendo de su fecha de publicación.</p>
<p>A mi parecer deberían haber añadido también las opciones &#8220;excepto con estrella&#8221; y &#8220;excepto compartidas&#8221; ya que yo me guardo como estrellas las que quiero volver sobre ellas más adelante; o cuando sólo leo los titulares para eliminar las que no me interesan. Pero bueno, tiempo al tiempo, que tarde o temprano pondrán algo que me ayude en ese tema.</p>
<p>Vía: yo mismo lo he descubierto <img src='http://www.k40s.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

	Etiquetas: <a href="http://www.k40s.org/tag/feeds/" title="feeds" rel="tag">feeds</a>, <a href="http://www.k40s.org/tag/google/" title="Google" rel="tag">Google</a>, <a href="http://www.k40s.org/tag/google-reader/" title="google reader" rel="tag">google reader</a>, <a href="http://www.k40s.org/tag/internet/" title="Internet" rel="tag">Internet</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.k40s.org/2009/08/13/mejoras-en-el-mark-all-as-read-de-google-reader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Si los sistemas operativos fueran comida</title>
		<link>http://www.k40s.org/2009/07/24/si-los-sistemas-operativos-fueran-comida/</link>
		<comments>http://www.k40s.org/2009/07/24/si-los-sistemas-operativos-fueran-comida/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 11:58:04 +0000</pubDate>
		<dc:creator>k40s</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Informática]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[sistemas operativos]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.k40s.org/?p=1221</guid>
		<description><![CDATA[Si los sistemas operativos fueran comida, sería más o menos así: Si Windows fuera comida sería comida rápida: Es fácil de conseguir Las condiciones higiénicas y sanitarias de preparación (seguridad) son dudosas. La publicidad sobre el producto raramente refleja el producto real (prometen mucho más de lo que el comprador recibe al adquirirla). Si algún [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm4.static.flickr.com/3461/3751414901_2a794a65a9_m.jpg" alt="" align="right"/>Si los sistemas operativos fueran comida, sería más o menos así:<br />
<strong>Si Windows fuera comida sería comida rápida:</strong></p>
<ul>
<li>Es fácil de conseguir</li>
<li>Las condiciones higiénicas y sanitarias de preparación (seguridad) son dudosas.</li>
<li>La publicidad sobre el producto raramente refleja el producto real (prometen mucho más de lo que el comprador recibe al adquirirla).</li>
<li>Si algún plato te desagradó, estaba mal preparado y te sentó mal, no te explicarán qué pasó. Te dirán que en el nuevo menú de la carta ya no existe tal problema.</li>
</ul>
<p><strong>Si Mac fuera comida sería comida Gourmet:</strong></p>
<ul>
<li>Es cara.</li>
<li>El usuario no puede aderezar libremente la comida. Tiene que comerla como se la sirven y si cuestiona el sabor, generalmente se le tachará de tener mal gusto.</li>
<li>Mucha gente la come no porque crea que es más sabrosa, sino porque al hacerlo aparenta ser un entendido culinario frente a sus amigos.</li>
<li>Si algún plato te desagradó, estaba mal preparado o te sentó mal, no te explicarán qué pasó, aunque te regalarán un descuento para tu próxima comida.</li>
</ul>
<p><strong>Si Linux fuera comida sería comida casera:</strong></p>
<ul>
<li>Siempre estuvo ahí, no se inventó por negocio, sino por necesidad y por placer.</li>
<li>Se ajusta a todos los bolsillos, puede ser barata, cara o incluso gratuita.</li>
<li>Los utensilios y productos que necesitarás para prepararla están disponibles en cualquier tienda, o incluso puedes utilizar utensilios caseros y antiguos que tengas en casa.</li>
<li>Una vez que la tienes servida en tu plato, lista para comerla, te darás cuenta que nada de lo que puedas comprar por ahí se compara con tu propia comida casera, preparada a tu gusto.</li>
</ul>
<p>Aunque con la de gourmet no estoy totalmente de acuerdo&#8230;</p>
<p>Visto en <a href="http://www.puntogeek.com/2009/07/24/si-los-sistemas-operativos-fuesen-comidas" target="_blank">PuntoGeek</a></p>

	Etiquetas: <a href="http://www.k40s.org/tag/humor/" title="Humor" rel="tag">Humor</a>, <a href="http://www.k40s.org/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.k40s.org/tag/mac/" title="Mac" rel="tag">Mac</a>, <a href="http://www.k40s.org/tag/mac-os-x/" title="mac os x" rel="tag">mac os x</a>, <a href="http://www.k40s.org/tag/sistemas-operativos/" title="sistemas operativos" rel="tag">sistemas operativos</a>, <a href="http://www.k40s.org/tag/windows/" title="windows" rel="tag">windows</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.k40s.org/2009/07/24/si-los-sistemas-operativos-fueran-comida/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google es un cachondo</title>
		<link>http://www.k40s.org/2009/07/23/google-es-un-cachondo/</link>
		<comments>http://www.k40s.org/2009/07/23/google-es-un-cachondo/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 17:18:46 +0000</pubDate>
		<dc:creator>k40s</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Humor]]></category>
		<category><![CDATA[lost]]></category>

		<guid isPermaLink="false">http://www.k40s.org/?p=1218</guid>
		<description><![CDATA[Rellenando mi perfil en Google, hay un campo que pone: &#8220;lo que no encuentras con Google&#8221;. Y atentos a las sugerencias: Click para ampliar Aunque bueno Google si que lo encuentra Etiquetas: Google, Humor, lost]]></description>
			<content:encoded><![CDATA[<p>Rellenando mi perfil en Google, hay un campo que pone: &#8220;lo que no encuentras con Google&#8221;. Y atentos a las sugerencias:<br />
<center><br />
<a href="http://farm3.static.flickr.com/2462/3749942500_8bc90cee2f_o.png" rel="lightbox[1218]"><img src="http://farm3.static.flickr.com/2462/3749942500_1883395c09.jpg" alt="" /></a><br />
Click para ampliar<br />
</center></p>
<p>Aunque bueno Google <a href="http://www.google.es/search?q=oceanic+815&#038;ie=utf-8&#038;oe=utf-8&#038;aq=t&#038;rls=org.mozilla:es-ES:official&#038;client=firefox-a" target="_blank">si que lo encuentra</a></p>

	Etiquetas: <a href="http://www.k40s.org/tag/google/" title="Google" rel="tag">Google</a>, <a href="http://www.k40s.org/tag/humor/" title="Humor" rel="tag">Humor</a>, <a href="http://www.k40s.org/tag/lost/" title="lost" rel="tag">lost</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.k40s.org/2009/07/23/google-es-un-cachondo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android en Weeds</title>
		<link>http://www.k40s.org/2009/07/17/android-en-weeds/</link>
		<comments>http://www.k40s.org/2009/07/17/android-en-weeds/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 12:33:21 +0000</pubDate>
		<dc:creator>k40s</dc:creator>
				<category><![CDATA[Aparatos]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[tv]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Moviles]]></category>
		<category><![CDATA[series tv]]></category>
		<category><![CDATA[Weeds]]></category>

		<guid isPermaLink="false">http://www.k40s.org/?p=1175</guid>
		<description><![CDATA[Como la casi mayoría de las series y películas utilizan móviles extraños (o muy simples o unos pedazo de aparatos que ni en 2100) y con una serie de soniditos que , por lo menos el mio no los hace; siempre es agradable ver tu móvil en la pantalla. En este caso es &#8220;El Andy&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Como la casi mayoría de las series y películas utilizan móviles extraños (o muy simples o unos pedazo de aparatos que ni en 2100) y con una serie de soniditos que , por lo menos el mio no los hace; siempre es agradable ver tu móvil en la pantalla. En este caso es &#8220;<a href="http://www.universityofandy.com/site/universityofandy/home.do" target="_blank">El Andy</a>&#8221; de <a href="http://www.sho.com/site/weeds/home.do" target="_blank">Weeds</a> que usa <a href="http://code.google.com/intl/es/android/" target="_blank">Android</a> (aunque no es el <a href="http://www.k40s.org/2009/05/16/mi-nuevo-movil-htc-magic-unboxing/" target="_blank">HTC Magic</a>, es un detalle).</p>
<p><center><a href="http://farm3.static.flickr.com/2628/3728681119_d0ca6971c1_o.png" rel="lightbox[1175]"><img src="http://farm3.static.flickr.com/2628/3728681119_2dfc108097.jpg" alt="" /></a><br />
click para ampliar</center></p>

	Etiquetas: <a href="http://www.k40s.org/tag/android/" title="Android" rel="tag">Android</a>, <a href="http://www.k40s.org/tag/moviles/" title="Moviles" rel="tag">Moviles</a>, <a href="http://www.k40s.org/tag/series-tv/" title="series tv" rel="tag">series tv</a>, <a href="http://www.k40s.org/tag/weeds/" title="Weeds" rel="tag">Weeds</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.k40s.org/2009/07/17/android-en-weeds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP Plugins: WP-Syntax, resalta código en WordPress</title>
		<link>http://www.k40s.org/2009/07/16/wp-plugins-wp-syntax-resalta-codigo-en-wordpress/</link>
		<comments>http://www.k40s.org/2009/07/16/wp-plugins-wp-syntax-resalta-codigo-en-wordpress/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 09:53:49 +0000</pubDate>
		<dc:creator>k40s</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[codigo]]></category>
		<category><![CDATA[desarrollo]]></category>
		<category><![CDATA[programacion]]></category>
		<category><![CDATA[wp-plugins]]></category>
		<category><![CDATA[wp-sintax]]></category>

		<guid isPermaLink="false">http://www.k40s.org/?p=1154</guid>
		<description><![CDATA[Acabo de instalar el plugin WP-Syntax en este blog. Este plugin sirve para resaltar código según sea el lenguaje que estamos utilizando. Instalación Descargarlo y descomprimirlo Subir el plugin a wp-content/plugins/wp-syntax/ Activarlo desde el menú plugins del panel de WordPress Uso Hay que encerrar el código entre las etiquetas &#60;pre&#62; y &#60;/pre&#62;. Y los atributos [...]]]></description>
			<content:encoded><![CDATA[<p>Acabo de instalar el plugin <a href="http://wordpress.org/extend/plugins/wp-syntax/" target="_blank"><strong>WP-Syntax</strong></a> en este blog. Este <a href="./tag/wp-plugins">plugin</a> sirve para <strong>resaltar código</strong> según sea el lenguaje que estamos utilizando.</p>
<h4>Instalación</h4>
<ol>
<li><a href="http://downloads.wordpress.org/plugin/wp-syntax.0.9.8.zip">Descargarlo</a> y descomprimirlo</li>
<li>Subir el plugin a <code>wp-content/plugins/wp-syntax/</code></li>
<li>Activarlo desde el menú <em>plugins</em> del panel de WordPress</li>
</ol>
<h4>Uso</h4>
<p>Hay que encerrar el código entre las etiquetas &lt;pre&gt; y &lt;/pre&gt;. Y los atributos posibles son <em>lang=&#8221;lenguaje&#8221;</em>, pudiendo ser cualquiera de la lista que hay abajo y el atributo opcional <em>line=&#8221;línea_comienzo&#8221;</em> para indicar el numero de línea en la que empieza el código.</p>
<h4>Lenguajes soportados</h4>
<blockquote><p>abap, actionscript, actionscript3, ada, apache, applescript, aptsources, asm, asp, autoit, avisynth, bash, bf, bibtex, blitzbasic, bnf, boo, c, cmac, caddcl, cadlisp, cil, cfdg, cfm, cmake, cobol, cpp-qt, cpp, csharp, css, d, dcs, delphi, diff, div, dos, dot, eiffel, email, erlang, fo, fortran, freebasic, genero, gettext, glsl, gml, bnuplot, groovy, haskell, hq9plus, html4strict, idl, ini, inno, intercal, io, java, java5, javascript, kixtart, klonec, klonecpp, latex, lisp, locobasic, lolcode lotusformulas, lotusscript, lscript, lsl2, lua, m68k, make, matlab, mirc, modula3, mpasm, mxml, mysql, nsis, oberon2, objc, ocaml-brief, ocaml, oobas, oracle11, oracle8, pascal, per, pic16, pixelbender, perl, php-brief, php, plsql, povray, powershell, progress, prolog, properties, providex, python, qbasic, rails, rebol, reg, robots, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, tcl, teraterm, text, thinbasic, tsql, typoscript, vb, vbnet, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xml, xorg_conf, xpp, z80</p></blockquote>
<p>Después del salto ejemplos de como queda.<br />
<span id="more-1154"></span></p>
<h4>HTML/Javascript</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&gt;
&lt;title&gt;Ejercicio 14 - DOM b?sico y atributos XHTML&lt;/title&gt;
&nbsp;
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #003366; font-weight: bold;">function</span> muestraOculta<span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">/*
 A partir de la pagina web proporcionada, completar el codigo JavaScript para que:
&nbsp;
   1. Cuando se pinche sobre el primer enlace, 
       se oculte su seccion relacionada
   2. Cuando se vuelva a pinchar sobre el mismo enlace, 
       se muestre otra vez esa seccion de contenidos
   3. Completar el resto de enlaces de la pagina para que su 
        comportamiento sea identico al del primer enlace
   4. Cuando una seccion se oculte, 
       debe cambiar el mensaje del enlace asociado
&nbsp;
*/</span>
	<span style="color: #003366; font-weight: bold;">var</span> elemento <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'contenidos_'</span><span style="color: #339933;">+</span>id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #003366; font-weight: bold;">var</span> enlace <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'enlace_'</span><span style="color: #339933;">+</span>id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>elemento.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;&quot;</span> <span style="color: #339933;">||</span> elemento.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;block&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    elemento.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;none&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    enlace.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">nodeValue</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'Mostrar contenidos'</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
    elemento.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;block&quot;</span><span style="color: #339933;">;</span>
    enlace.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">nodeValue</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'Ocultar contenidos'</span><span style="color: #339933;">;</span> 
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
&lt;/head&gt;
&nbsp;
&lt;body&gt;
&nbsp;
&lt;p id=&quot;contenidos_1&quot;&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit.&lt;/p&gt;
&lt;a id=&quot;enlace_1&quot; href=&quot;#&quot; onclick=&quot;muestraOculta('1');&quot;&gt;Ocultar contenidos&lt;/a&gt;
&nbsp;
&lt;br/&gt;
&nbsp;
&lt;p id=&quot;contenidos_2&quot;&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit.&lt;/p&gt;
&lt;a id=&quot;enlace_2&quot; href=&quot;#&quot; onclick=&quot;muestraOculta('2');&quot;&gt;Ocultar contenidos&lt;/a&gt;
&nbsp;
&lt;br/&gt;
&nbsp;
&lt;p id=&quot;contenidos_3&quot;&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit.&lt;/p&gt;
&lt;a id=&quot;enlace_3&quot; href=&quot;#&quot; onclick=&quot;muestraOculta('3');&quot;&gt;Ocultar contenidos&lt;/a&gt;
&nbsp;
&lt;/body&gt;
&nbsp;
&lt;/html&gt;</pre></td></tr></table></div>

<h4>PHP</h4>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'usuario'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'clave'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$c</span><span style="color: #339933;">=</span><span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mysql_server</span><span style="color: #339933;">,</span><span style="color: #000088;">$mysql_login</span><span style="color: #339933;">,</span><span style="color: #000088;">$mysql_pass</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Could not connect: '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Conexion correcta&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;tienda&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$consulta</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SELECT email, contra FROM cliente WHERE email=&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$consulta</span><span style="color: #339933;">.=</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'usuario'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$consulta</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;;&quot;</span><span style="color: #339933;">;</span>	
&nbsp;
<span style="color: #000088;">$resultado</span><span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$consulta</span><span style="color: #339933;">,</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$cont</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$linea</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_row</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resultado</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>					
	<span style="color: #000088;">$dato</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$cont</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #000088;">$linea</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$cont</span><span style="color: #339933;">++;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #000088;">$cont</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$dato</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><strong>NOTA: </strong><em>los códigos son míos de diversos ejercicios que he hecho este curso, los he recuperado sin comprobar si eran las versiones correctas, así que es posible que no funcionen bien</em></p>

	Etiquetas: <a href="http://www.k40s.org/tag/codigo/" title="codigo" rel="tag">codigo</a>, <a href="http://www.k40s.org/tag/desarrollo/" title="desarrollo" rel="tag">desarrollo</a>, <a href="http://www.k40s.org/tag/programacion/" title="programacion" rel="tag">programacion</a>, <a href="http://www.k40s.org/tag/wp-plugins/" title="wp-plugins" rel="tag">wp-plugins</a>, <a href="http://www.k40s.org/tag/wp-sintax/" title="wp-sintax" rel="tag">wp-sintax</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.k40s.org/2009/07/16/wp-plugins-wp-syntax-resalta-codigo-en-wordpress/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

