<?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>Pursuing the PhD &#187; Programación</title>
	<atom:link href="http://diegocaro.com/category/programacion/feed/" rel="self" type="application/rss+xml" />
	<link>http://diegocaro.com</link>
	<description>thinking big, like the biggest</description>
	<lastBuildDate>Sat, 31 Dec 2011 20:44:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>CSS2 Trick: Cambiar estilo de un elemento hermano</title>
		<link>http://diegocaro.com/css2-trick-cambiar-estilo-de-un-elemento-hermano/</link>
		<comments>http://diegocaro.com/css2-trick-cambiar-estilo-de-un-elemento-hermano/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 04:30:27 +0000</pubDate>
		<dc:creator>diegocaro</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css2]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://diegocaro.com/?p=395</guid>
		<description><![CDATA[Las últimas semanas he estado trabajando muchísimo con CSS, Javascript (con Jquery) y XHTML. En el camino me he preguntado si hay formas de realizar ciertas cosas de manera declarativa, es decir, solo escribiendo lo que se debería hacer, sin dar una explicación de cómo hacerlo. En particular, lo que intenté hacer es mostrar un [...]]]></description>
			<content:encoded><![CDATA[<p>Las últimas semanas he estado  trabajando muchísimo con CSS, Javascript (con Jquery) y XHTML. En el camino me he preguntado si hay formas de realizar ciertas cosas de manera declarativa, es decir, solo escribiendo lo que se debería hacer, sin dar una explicación de cómo hacerlo.<br />
<span id="more-395"></span><br />
En particular, lo que intenté hacer es mostrar un párrafo (modificador p) cuando el usuario se posiciona en un link (modificador  a:hover), en un html como el siguiente:</p>
<pre>&lt;div id="#example"&gt;
    &lt;a href="#"&gt;show paragraph&lt;/a&gt;
    &lt;p&gt;This paragraph must be shown
    when the link is in focus&lt;/p&gt;
&lt;/div&gt;</pre>
<p>Lo usual hubiese sido escribir un pequeño codigo en Javascript (Jquery) como el siguiente:</p>
<pre>$('#link').focus(function() {
    $('#paragraph').show();
});
$('#link').unfocus(function() {
    $('#paragraph').hide();
});
</pre>
<p>En el afán de hacerlo declarativo, logré deducir el siguiente estilo usando CSS 2, obteniendo exactamente el mismo comportamiento:</p>
<pre>
#example p { display:none; }
#example a:hover + p { display: block; }
</pre>
<p>La magia está en el <a href="http://www.w3.org/TR/CSS2/selector.html#adjacent-selectors">selector &#8220;+&#8221;,</a> (disponible en <a href="http://www.w3.org/TR/CSS2/">CSS 2</a>) que permite modificar el estilo de un selector hermano inmediatamente después de otro selector. Por ejemplo, en este caso permite editar el selector <em>p</em> que es hermano del selector <em>a:hover</em>. El truco está en que el selector <em>a:hover</em> está disponible solo cuando el link está en foco <img src='http://diegocaro.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>El resultado es el siguiente:</p>
<style>#example p{display:none;} #example a:hover + p {display: block;}</style>
<div id="example">
<a href="#">show paragraph</a></p>
<p>
This paragraph must be shown when the link is in focus
</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://diegocaro.com/css2-trick-cambiar-estilo-de-un-elemento-hermano/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>First report for MPTT on WordPress</title>
		<link>http://diegocaro.com/first-report-for-mptt-on-wordpress/</link>
		<comments>http://diegocaro.com/first-report-for-mptt-on-wordpress/#comments</comments>
		<pubDate>Tue, 26 May 2009 19:55:39 +0000</pubDate>
		<dc:creator>diegocaro</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC2009]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[Proyectos]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[mptt]]></category>

		<guid isPermaLink="false">http://diegocaro.com/?p=352</guid>
		<description><![CDATA[This post is a report about my proposal &#8220;Implementing MPTT technique for store hierarchical data&#8221; on WordPress, at the Google Summer of Code program. If you don&#8217;t know the MPTT algorithm, you can read this article. The plan for this proposal is understand the actual way for get tree data in categories and make the [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a report about my proposal &#8220;<a href="http://socghop.appspot.com/student_project/show/google/gsoc2009/wordpress/t124024916456">Implementing MPTT technique for store hierarchical data</a>&#8221; on WordPress, at the <a href="http://socghop.appspot.com/">Google Summer of Code</a> program. If you don&#8217;t know the MPTT algorithm, you can <a href="http://dev.mysql.com/tech-resources/articles/hierarchical-data.html">read this article</a>.</p>
<p>The plan for this proposal is understand the actual way for get tree data in categories and make the modifications for get/store the tree data. Later, when all has been ready for categories, add the code for pages.</p>
<p>My deliverable will be a plugin with a new Walker class that use MPTT algorithm, some functions for get data from the database, and a few modifications to the core, for attach the plugin functions.</p>
<p>In the last days, I read the code where WordPress has been using the actual way for get/store the tree data. For get that information, I used the <a href="http://phpdoc.wordpress.org/trunk/">phpdoc page of WordPress</a>.</p>
<p>The main class for get tree data is called &#8220;<a href="http://phpdoc.wordpress.org/trunk/WordPress/Walker.html">Walker</a>&#8220;. It have some subclasses that extend the function of Walker class, getting the html code for list categories, pages, etc&#8230;:</p>
<ul>
<li><a href="http://phpdoc.wordpress.org/trunk/WordPress/Walker_Category.html">Walker_Category</a></li>
<li><a href="http://phpdoc.wordpress.org/trunk/WordPress/Walker_CategoryDropdown.html">Walker_CategoryDropdown</a></li>
<li><a href="http://phpdoc.wordpress.org/trunk/WordPress/Template/Walker_Comment.html">Walker_Comment</a></li>
<li><a href="http://phpdoc.wordpress.org/trunk/WordPress/Walker_Page.html">Walker_Page</a></li>
<li><a href="http://phpdoc.wordpress.org/trunk/WordPress/Walker_PageDropdown.html">Walker_PageDropdown</a></li>
<li><a href="http://phpdoc.wordpress.org/trunk/WordPress/Administration/Walker_Category_Checklist.html">Walker_Category_Checklist</a></li>
</ul>
<p>But, these classes don&#8217;t get the data directly from the database. The way for get that data it&#8217;s calling the function get_terms (it&#8217;s was defined on the line 605, in the file /wp-includes/taxonomy.php) from another functions. These functions are (each function use a subclass of Walker class):</p>
<ul>
<li><a href="http://phpdoc.wordpress.org/trunk/WordPress/Template/_wp-includes---category-template.php.html#functionwalk_category_tree">walk_category_tree()</a></li>
<li><a href="http://phpdoc.wordpress.org/trunk/WordPress/Template/_wp-includes---category-template.php.html#functionwalk_category_dropdown_tree">walk_category_dropdown_tree()</a></li>
<li><a href="http://phpdoc.wordpress.org/trunk/WordPress/Template/_wp-includes---post-template.php.html#functionwalk_page_tree">walk_page_tree()</a></li>
<li><a href="http://phpdoc.wordpress.org/trunk/WordPress/Template/_wp-includes---post-template.php.html#functionwalk_page_dropdown_tree">walk_page_dropdown_tree()</a></li>
<li><a href="http://phpdoc.wordpress.org/trunk/WordPress/Template/_wp-includes---comment-template.php.html#functionwp_list_comments">wp_list_comments()</a></li>
<li> <a href="http://phpdoc.wordpress.org/trunk/WordPress/Comment/_wp-includes---comment.php.html#functionget_comment_pages_count">get_comment_pages_count()</a></li>
</ul>
<p>Now, I have an small idea about the actual scenario for get tree data in WordPress, but for to implement the MPTT, I need to modify the database. I add two new columns y the table &#8220;wp_terms_taxonomy&#8221; called <strong>left </strong>and <strong>right</strong>. These colums are for store the data for get the tree with some sql queries.</p>
<p>I wrote a few lines for start my plugin. It have the original get_terms function with a little modifications for get a tree data using the MPTT algorithm.</p>
<p>Old query:</p>
<blockquote><p>$query = &#8220;SELECT $select_this FROM $wpdb-&gt;terms AS t INNER JOIN $wpdb-&gt;term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ($in_taxonomies) $where ORDER BY $orderby $order $limit&#8221;;</p></blockquote>
<p>New query:</p>
<blockquote><p>$subquery = &#8220;SELECT node . * , ( COUNT( parent.term_id ) -1) AS depth<br />
FROM $wpdb-&gt;term_taxonomy AS node, $wpdb-&gt;term_taxonomy AS parent<br />
WHERE node.left BETWEEN parent.left AND parent.right<br />
GROUP BY node.term_id<br />
ORDER BY node.left&#8221;;<br />
$query = &#8220;SELECT $select_this FROM ($subquery) AS tt INNER JOIN $wpdb-&gt;terms AS t ON t.term_id = tt.term_id WHERE tt.taxonomy IN ($in_taxonomies) $where ORDER BY $orderby $order $limit&#8221;;</p></blockquote>
<p>It&#8217;s works, but it need some modifications for get the tree data with options (get a sub-tree, show only when is a not empty tree, etc&#8230;).</p>
<p>The next step is make a new Walker class for print the tree data of categories.</p>
<p>Note: if my post have a mistake, just let me know for fix it <img src='http://diegocaro.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://diegocaro.com/first-report-for-mptt-on-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to develop in WordPress using Netbeans</title>
		<link>http://diegocaro.com/how-to-develop-in-wordpress-using-netbeans/</link>
		<comments>http://diegocaro.com/how-to-develop-in-wordpress-using-netbeans/#comments</comments>
		<pubDate>Tue, 12 May 2009 03:52:08 +0000</pubDate>
		<dc:creator>diegocaro</dc:creator>
				<category><![CDATA[Computación]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC2009]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://diegocaro.com/?p=347</guid>
		<description><![CDATA[Easy, read configuring Netbeans project for WordPress and download the last beta of Netbeans 6.7 . That&#8217;s all folks.]]></description>
			<content:encoded><![CDATA[<p>Easy, read <a href="http://wiki.netbeans.org/ConfiguringNetBeansProjectForWordPress">configuring Netbeans project for WordPress</a> and <a href="http://download.netbeans.org/netbeans/6.7/beta/">download the last beta of Netbeans 6.7</a> <img src='http://diegocaro.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>That&#8217;s all folks.</p>
]]></content:encoded>
			<wfw:commentRss>http://diegocaro.com/how-to-develop-in-wordpress-using-netbeans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cómo desarrollar en WordPress usando Netbeans</title>
		<link>http://diegocaro.com/como-desarrollar-en-wordpress-usando-netbeans/</link>
		<comments>http://diegocaro.com/como-desarrollar-en-wordpress-usando-netbeans/#comments</comments>
		<pubDate>Tue, 12 May 2009 03:47:44 +0000</pubDate>
		<dc:creator>diegocaro</dc:creator>
				<category><![CDATA[Computación]]></category>
		<category><![CDATA[GSoC2009]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://diegocaro.com/?p=343</guid>
		<description><![CDATA[Fácil, leyendo configurando un proyecto Netbeans para WordPress y bajando la última beta de Netbeans 6.7 . That&#8217;s all folks.]]></description>
			<content:encoded><![CDATA[<p>Fácil, leyendo <a href="http://wiki.netbeans.org/ConfiguringNetBeansProjectForWordPress">configurando un proyecto Netbeans para WordPress</a> y <a href="http://download.netbeans.org/netbeans/6.7/beta/">bajando la última beta de Netbeans 6.7</a> <img src='http://diegocaro.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>That&#8217;s all folks.</p>
]]></content:encoded>
			<wfw:commentRss>http://diegocaro.com/como-desarrollar-en-wordpress-usando-netbeans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programación en Talca</title>
		<link>http://diegocaro.com/programacion-en-talca/</link>
		<comments>http://diegocaro.com/programacion-en-talca/#comments</comments>
		<pubDate>Fri, 10 Nov 2006 03:14:02 +0000</pubDate>
		<dc:creator>diegocaro</dc:creator>
				<category><![CDATA[Computación]]></category>
		<category><![CDATA[Programación]]></category>

		<guid isPermaLink="false">http://diego.bloog.cl/blog/2006/11/09/programacion-en-talca/</guid>
		<description><![CDATA[Saludos terrícolas, soy Diego contándoles que mañana me voy a Talca a participar en el campeonato nacional de programación de la ACM, representando al DIICC (Departamento de Ingeniería Informática y Ciencias de la Computación) de la Universidad de Concepción. El campeonato nacional de programación de la ACM (Chile) se realiza cada año en alguna Universidad [...]]]></description>
			<content:encoded><![CDATA[<p>Saludos terrícolas, soy Diego contándoles que mañana me voy a Talca a participar en el <a href="http://2006.encuentrolinux.cl/acm.php">campeonato nacional de programación de la ACM</a>, representando al <a href="http://www.inf.udec.cl">DIICC</a> (Departamento de Ingeniería Informática y Ciencias de la Computación) de la <a href="http://www.udec.cl">Universidad de Concepción</a>.</p>
<p>El campeonato nacional de programación de la ACM (Chile) se realiza cada año en alguna Universidad de nuestro Chilito lindo, para poder seleccionar al <em>mejor de los mejores</em> en programación/algoritmos/codificación y mandarlo con todas sus petacas al campeonato mundial <a href="http://icpc.baylor.edu/icpc/">ACM-ICPC</a> (ACM International Collegiate Programming Contest).</p>
<p>Pero no voy solo&#8230; Voy con mi gran equipo conformado por los señores <a href="http://marenaso.blogspot.com/">Mauricio Arenas</a> y Rodrigo Torres.</p>
<p>Esperamos ganar, así que cuidado!. Después les cuento como nos fue&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://diegocaro.com/programacion-en-talca/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Renovando la Bitácora De Letras</title>
		<link>http://diegocaro.com/renovando-la-bitacora-de-letras/</link>
		<comments>http://diegocaro.com/renovando-la-bitacora-de-letras/#comments</comments>
		<pubDate>Tue, 04 Apr 2006 03:34:24 +0000</pubDate>
		<dc:creator>diegocaro</dc:creator>
				<category><![CDATA[Bitácora de Letras]]></category>
		<category><![CDATA[Computación]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[What I see?]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Desde el verano que tengo planeada una nueva versión de la Bitácora de letras. No he tenido mucho tiempo extra para cambiar el diseño o agregarle funciones al estilo &#34;web 2.0&#34;. En grandes rasgos lo que hice fue modular el código, crear plantillas para el diseño, además de abstraer la capa de base de datos [...]]]></description>
			<content:encoded><![CDATA[<p>Desde el verano que tengo planeada una nueva versión de la <a href="http://atenea.inf.udec.cl/~diegocaro/de.letras/" target="_blank" >Bitácora de letras</a>. No he tenido mucho tiempo extra para cambiar el diseño o agregarle funciones al estilo &quot;web 2.0&quot;.</p>
<p>En grandes rasgos lo que hice fue modular el código, crear plantillas para el diseño, además de abstraer la capa de base de datos y plantillas. Todo programado por mí (no todo, pero la gran mayoría, pues el usar adodb + smarty hacía muy lenta la carga de la página). Además logré hacerla funcionar con <a href="http://www.sqlite.org" target="_blank" >sqlite</a> y mySQL (así puedo correrla en <a href="http://atenea.inf.udec.cl" target="_blank" >atenea</a> sin andar rogando una cuenta mysql en el diicc&#8230;&#8230;&#8230; ?=)(/&amp;%$·&quot;!··).</p>
<p>Muchas gracias a <a href="http://www.linfati.cl" target="_blank" >Rodrigo Linfati</a> por la paciencia de tenerme como usuario de <a href="http://tarro.linfati.cl" target="_blank" >tarro</a> y aguantar mis peticiones durante taaaaanto tiempo.</p>
<p>Saludos!</p>
]]></content:encoded>
			<wfw:commentRss>http://diegocaro.com/renovando-la-bitacora-de-letras/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error al escribir en sqlite</title>
		<link>http://diegocaro.com/error-al-escribir-en-sqlite/</link>
		<comments>http://diegocaro.com/error-al-escribir-en-sqlite/#comments</comments>
		<pubDate>Sat, 01 Apr 2006 05:20:34 +0000</pubDate>
		<dc:creator>diegocaro</dc:creator>
				<category><![CDATA[Programación]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Como algunos saben (alguien sabe?), estoy escribiendo la BitacoraDeLetras (codename xxxx, por ahora , no me vayan a registrar el dominio!) para que sea utilizada por mysql y sqlite. Estaba yo probando probando, hasta que recibo un error como este: Warning: sqlite_query(): unable to open database file in /home/emcnabb/public_html/mydb/index.php on line 26 14: unable to [...]]]></description>
			<content:encoded><![CDATA[<p>Como algunos saben (alguien sabe?), estoy escribiendo la BitacoraDeLetras (codename xxxx, por ahora <img src='http://diegocaro.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> , no me vayan a registrar el dominio!) para que sea utilizada por mysql y sqlite.</p>
<p>Estaba yo probando probando, hasta que recibo un error como este:<br />
<br /><code>Warning: sqlite_query(): unable to open database file in /home/emcnabb/public_html/mydb/index.php on line 26<br />
<br />14: unable to open database file</code></p>
<p>El problema no es el hecho de que no se pueda escribir en el archivo (con permisos 666), si no, que no se puede escribir en el directorio donde está algojada la base de datos (sqlite crea unos archivos temporales en el directorio de la base de datos para poder trabajar).</p>
<h2>Solución</h2>
<p>La solución es darle permisos de escritura al grupo apache al directorio en cuestion, o en su defecto, cambiar los permisos del directorio donde está la base de datos a 777.</p>
<p>Fuente: <a href="http://72.14.203.104/search?q=cache:1BL3jGz0Z58J:evan.mcnabbs.org/linux-oss/compblog/compblog.php%3Fid%3D15" target="_blank" >caché de google</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://diegocaro.com/error-al-escribir-en-sqlite/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ArchivadorPHP</title>
		<link>http://diegocaro.com/archivadorphp/</link>
		<comments>http://diegocaro.com/archivadorphp/#comments</comments>
		<pubDate>Sat, 26 Mar 2005 01:08:16 +0000</pubDate>
		<dc:creator>diegocaro</dc:creator>
				<category><![CDATA[Programación]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Acabo de lanzar la versión 0.3 de este mini script . http://chileforge.cl/projects/archivador/]]></description>
			<content:encoded><![CDATA[<p>Acabo de lanzar la versión 0.3 de este mini script <img src='http://diegocaro.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .</p>
<p><a href="http://chileforge.cl/projects/archivador/" target="_blank" >http://chileforge.cl/projects/archivador/</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://diegocaro.com/archivadorphp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

