<?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>Dave Ruiz Blog</title>
	<atom:link href="http://blog.daveruiz.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.daveruiz.net</link>
	<description>Freelance Web Developer</description>
	<lastBuildDate>Sat, 21 Jan 2012 12:24:04 +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>JSPopViewer v1.1</title>
		<link>http://blog.daveruiz.net/general/jspopviewer-v1-1/</link>
		<comments>http://blog.daveruiz.net/general/jspopviewer-v1-1/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 12:45:45 +0000</pubDate>
		<dc:creator>Dave Ruiz</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programación]]></category>

		<guid isPermaLink="false">http://blog.daveruiz.net/?p=407</guid>
		<description><![CDATA[Por fín, he decidido meter mano a este viejo script. Visto que se está empleando en varios sitios he intentado arreglar algunos problemas que tenía, y he añadido algunas mejoras. Añadido soporte de pie de foto: Segundo parámetro de la funcion open() o el atributo &#8216;title&#8217; de la imagen. Añadido atributo &#8216;effect&#8217; para definir la [...]]]></description>
			<content:encoded><![CDATA[<p>Por fín, he decidido meter mano a este viejo script. Visto que se está empleando en varios sitios he intentado arreglar algunos problemas que tenía, y he añadido algunas mejoras.</p>
<ul>
<li>Añadido soporte de pie de foto: Segundo parámetro de la funcion open() o el atributo &#8216;title&#8217; de la imagen.</li>
<li>Añadido atributo &#8216;effect&#8217; para definir la animación al aparecer/desaparecer. De momento disponibles &#8216;bounce&#8217; (por defecto) o &#8216;easeout&#8217;.</li>
<li>Haciendo click fuera de la imagen esta se cierra (ya no se cierra al hacer click en ella).</li>
<li>Ya no es necesario declarar el objeto JSPopViewer al final del documento.</li>
<li>Corregido problema comprobar si la imagen ha cargado.</li>
<li>Corregido problema comprobar el tamaño de la imagen en IE.</li>
<li>Corregidos algunos problemas con los estilos.</li>
</ul>
<p>Se puede descargar en el siguiente enlace: [<a href="http://lab.daveruiz.net/webapp.jspopviewer/" target="_blank">Descargar</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.daveruiz.net/general/jspopviewer-v1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery: Evento &#8216;onResize&#8217; para cualquier elemento HTML</title>
		<link>http://blog.daveruiz.net/programacion/jquery-evento-onresize-para-cualquier-elemento-html/</link>
		<comments>http://blog.daveruiz.net/programacion/jquery-evento-onresize-para-cualquier-elemento-html/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 10:49:37 +0000</pubDate>
		<dc:creator>Dave Ruiz</dc:creator>
				<category><![CDATA[Programación]]></category>

		<guid isPermaLink="false">http://blog.daveruiz.net/?p=400</guid>
		<description><![CDATA[El evento &#8216;onresize&#8217; se lanza cuando un elemento HTML cambia de tamaño. Pero tenemos el problema de que sólo Internet Explorer lo lanza en el momento del cambio de tamaño del elemento, mientras que el resto de navegadores lo hace solo al cambiar el tamaño de la ventana del navegador. Este pequeño plugin jQuery ayudará [...]]]></description>
			<content:encoded><![CDATA[<p>El evento <strong>&#8216;onresize&#8217; </strong> se lanza cuando un elemento HTML cambia de tamaño. Pero tenemos el problema de que sólo Internet Explorer lo lanza en el momento del cambio de tamaño del elemento, mientras que el resto de navegadores lo hace solo al cambiar el tamaño de la ventana del navegador.</p>
<p>Este pequeño plugin <strong>jQuery</strong> ayudará a detectar cambios de tamaño en cualquier elemento HTML, lanzando un evento onResize &#8216;casi&#8217; en el momento del cambio.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$.<span style="color: #660066;">fn</span>.<span style="color: #660066;">addOnResizeEvent</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>custom_options<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> options <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
		timeInterval <span style="color: #339933;">:</span> <span style="color: #CC0000;">100</span><span style="color: #339933;">,</span>
		forceIE <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	$.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span> custom_options<span style="color: #339933;">,</span> options <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// Soporte nativo IE</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$.<span style="color: #660066;">browser</span>.<span style="color: #660066;">ie</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #339933;">!</span>options.<span style="color: #660066;">forceIE</span><span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> target <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> lw<span style="color: #339933;">,</span> lh<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> interval <span style="color: #339933;">=</span> setInterval<span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
			<span style="color: #003366; font-weight: bold;">var</span> w <span style="color: #339933;">=</span> target.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				h <span style="color: #339933;">=</span> target.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><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><span style="color: #339933;">!</span>lw <span style="color: #339933;">==</span> undefined<span style="color: #009900;">&#41;</span> lw <span style="color: #339933;">=</span> w<span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>lh <span style="color: #339933;">==</span> undefined<span style="color: #009900;">&#41;</span> lh <span style="color: #339933;">=</span> h<span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> lw <span style="color: #339933;">!=</span> w <span style="color: #339933;">||</span> lh <span style="color: #339933;">!=</span> h <span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				lw <span style="color: #339933;">=</span> w<span style="color: #339933;">;</span>
				lh <span style="color: #339933;">=</span> h<span style="color: #339933;">;</span>
				target.<span style="color: #660066;">trigger</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">&quot;resize&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span> 
&nbsp;
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> options.<span style="color: #660066;">timeInterval</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Y su modo de uso:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div.miDiv&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addOnResizeEvent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
&nbsp;
$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div.miDiv&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">resize</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Cambié de tamaño&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>En caso de estar navegando con Internet Explorer este plugin no tendrá efecto dejando la activación del evento nativa. Sin embargo, puede forzarse pasandole un parametro &#8216;<strong>forceIE</strong>&#8216; como &#8216;<em>true</em>&#8216;.</p>
<p>Además, permite modificar el tiempo entre chequeos de tamaño por el parámetro &#8216;<strong>timeInterval</strong>&#8216;, indicando la espera en milisegundos.</p>
<p>El modo de asignar los parámetros es el siguiente:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;div.miDiv&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addOnResizeEvent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	timeInterval <span style="color: #339933;">:</span> <span style="color: #CC0000;">200</span><span style="color: #339933;">,</span>
	forceIE <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>Una última recomendación, y por temas de rendimiento, es la de asignar esta función solamente a aquellos elementos que quiera registrarse un cambio de tamaño.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.daveruiz.net/programacion/jquery-evento-onresize-para-cualquier-elemento-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery: Subrayar automáticamente las letras de acceso rápido (accesskey) en los enlaces.</title>
		<link>http://blog.daveruiz.net/programacion/jquery-subrayar-automaticamente-las-letras-de-acceso-rapido-accesskey-en-los-enlaces/</link>
		<comments>http://blog.daveruiz.net/programacion/jquery-subrayar-automaticamente-las-letras-de-acceso-rapido-accesskey-en-los-enlaces/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 13:14:45 +0000</pubDate>
		<dc:creator>Dave Ruiz</dc:creator>
				<category><![CDATA[Programación]]></category>

		<guid isPermaLink="false">http://blog.daveruiz.net/?p=380</guid>
		<description><![CDATA[Otro pequeño aporte para resaltar las teclas de acceso rápido (el atributo &#8216;accesskey&#8217;) de los enlaces, cómo no, con la ayuda de jQuery (en este caso pequeña). Muy útil, por ejemplo, para la realización de menús de navegación sin tener que &#8216;ensuciar&#8217; el HTML. Primero, necesitamos asignar un estilo a la letra a resaltar. Optaremos [...]]]></description>
			<content:encoded><![CDATA[<p>Otro pequeño aporte para resaltar las teclas de acceso rápido (el atributo &#8216;accesskey&#8217;) de los enlaces, cómo no, con la ayuda de jQuery (en este caso pequeña). Muy útil, por ejemplo, para la realización de menús de navegación sin tener que &#8216;ensuciar&#8217; el HTML.</p>
<p>Primero, necesitamos asignar un estilo a la letra a resaltar. Optaremos por un simple subrayado.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">a <span style="color: #6666ff;">.accesskey</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Y ahora viene la magia. Realizamos un recorrido por los enlaces de la página y realizamos el cambio:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> html<span style="color: #339933;">,</span> reg<span style="color: #339933;">,</span> rep<span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">accessKey</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		html <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><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><span style="color: #339933;">!/&lt;/</span>g.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>html<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span> 	<span style="color: #006600; font-style: italic;">// No contiene HTML</span>
			reg <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> RegExp<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;(&quot;</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">accessKey</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;)&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;i&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			rep <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;span class='accesskey'&gt;$1&lt;/span&gt;&quot;</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> 	<span style="color: #006600; font-style: italic;">// Contiene HTML</span>
			reg <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> RegExp<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;(&lt;[^&gt;]*&gt;.*)(&quot;</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">accessKey</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;)(.*&lt;/[^&gt;]*&gt;)&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;i&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			rep <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;$1&lt;span class='accesskey'&gt;$2&lt;/span&gt;$3&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span> html.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span> reg<span style="color: #339933;">,</span> rep <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: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Evidentemente, será requisito que el texto del enlace contenga la letra equivalente a la tecla de acceso rápido.</p>
<p>Y muy importante, por supuesto, realizar este escaneo una vez sea accesible el DOM completo de la página.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// Nuestro script</span>
&nbsp;
<span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.daveruiz.net/programacion/jquery-subrayar-automaticamente-las-letras-de-acceso-rapido-accesskey-en-los-enlaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery: Colocar puntos suspensivos cuando un texto no cabe en una linea.</title>
		<link>http://blog.daveruiz.net/programacion/jquery-colocar-puntos-suspensivos-cuando-un-texto-no-cabe-en-una-linea/</link>
		<comments>http://blog.daveruiz.net/programacion/jquery-colocar-puntos-suspensivos-cuando-un-texto-no-cabe-en-una-linea/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 10:07:02 +0000</pubDate>
		<dc:creator>Dave Ruiz</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[ellipsis]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[puntos suspensivos]]></category>
		<category><![CDATA[textoverflow]]></category>

		<guid isPermaLink="false">http://blog.daveruiz.net/?p=356</guid>
		<description><![CDATA[Un pequeño script rápido y muy sencillo que he elaborado para jQuery, que hace lo que el título de esta entrada. Hasta ahora estaba usando uno de los textOverflow que andan por ahí, pero me estaban dando algún problema. $.fn.ellipsis = function&#40;&#41; &#123; return this.each&#40; function&#40;&#41; &#123; &#160; var tar = $&#40;this&#41;, ow, ls, tg, [...]]]></description>
			<content:encoded><![CDATA[<p>Un pequeño script rápido y muy sencillo que he elaborado para <strong>jQuery</strong>, que hace lo que el título de esta entrada. Hasta ahora estaba usando uno de los <em>textOverflow</em> que andan <a href="http://www.google.es/search?hl=es&amp;q=jquery+textoverflow&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;gs_rfai=" target="_blank">por ahí</a>, pero me estaban dando algún problema.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$.<span style="color: #660066;">fn</span>.<span style="color: #660066;">ellipsis</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">var</span> tar <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		ow<span style="color: #339933;">,</span> ls<span style="color: #339933;">,</span> tg<span style="color: #339933;">,</span> 
		tw<span style="color: #339933;">=</span>tar.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;display&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;block&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;white-space&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;nowrap&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
		ot<span style="color: #339933;">=</span>tar.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> pt<span style="color: #339933;">=</span>ot<span style="color: #339933;">,</span>
		alt<span style="color: #339933;">=</span>tar.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		ok<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span> 
		ct<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
		el<span style="color: #339933;">=</span><span style="color: #3366CC;">' &amp;hellip;'</span><span style="color: #339933;">;</span>
&nbsp;
	tar.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;position&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;absolute&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>ok<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		ow <span style="color: #339933;">=</span> tar.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;width&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;auto&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><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>ow <span style="color: #339933;">&gt;</span> tw<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			ls <span style="color: #339933;">=</span> pt.<span style="color: #660066;">lastIndexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot; &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			tg <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> RegExp<span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">&quot;&lt;[^&gt;]*$&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;g&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span> pt.<span style="color: #660066;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> ls<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>ls <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
				pt <span style="color: #339933;">=</span> pt.<span style="color: #660066;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> ls<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				tar.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span> pt <span style="color: #339933;">+</span> el <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				ct<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">true</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>
				tar.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span> el <span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #339933;">,</span> alt<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				ok<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">true</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span>tg<span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span> 
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>ct<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				tar.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #339933;">,</span> alt<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				tar.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;display&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;block&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;width&quot;</span><span style="color: #339933;">:</span>tw<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;px&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			ok <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
	tar.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;position&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Y para usarlo.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.textodeunalinea&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ellipsis</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p><strong>Actualización 27-10-2010:</strong> Se han hecho algunas correcciones. Y un detalle; se porta un poquito mal cuando hay Html en el texto. Pendiente de corregir.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.daveruiz.net/programacion/jquery-colocar-puntos-suspensivos-cuando-un-texto-no-cabe-en-una-linea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JS: Convertir un objeto en una cadena XML</title>
		<link>http://blog.daveruiz.net/programacion/js-convertir-un-objeto-en-una-cadena-xml/</link>
		<comments>http://blog.daveruiz.net/programacion/js-convertir-un-objeto-en-una-cadena-xml/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 09:53:33 +0000</pubDate>
		<dc:creator>Dave Ruiz</dc:creator>
				<category><![CDATA[Programación]]></category>

		<guid isPermaLink="false">http://blog.daveruiz.net/?p=308</guid>
		<description><![CDATA[Os dejo una pequeña y sencilla función para realizar esta tarea en Javascript. Evidentemente, está sujeto a las mejoras que creáis convenientes. function XMLString&#40; object, name, recursiveCall &#41; &#123; var xml = &#34;&#34;, i; var isArray = typeof&#40;object&#41; === 'object' &#38;&#38; typeof&#40;object.length&#41; === 'number' &#38;&#38; !&#40;object.propertyIsEnumerable&#40;'length'&#41;&#41; &#38;&#38; typeof&#40;object.splice === 'function'&#41;; &#160; if &#40;!recursiveCall&#41; &#123; xml += &#34;&#60;?xml [...]]]></description>
			<content:encoded><![CDATA[<p>Os dejo una pequeña y sencilla función para realizar esta tarea en Javascript. Evidentemente, está sujeto a las mejoras que creáis convenientes.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> XMLString<span style="color: #009900;">&#40;</span> object<span style="color: #339933;">,</span> <span style="color: #000066;">name</span><span style="color: #339933;">,</span> recursiveCall <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> xml <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">,</span> i<span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> isArray <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">typeof</span><span style="color: #009900;">&#40;</span>object<span style="color: #009900;">&#41;</span> <span style="color: #339933;">===</span> <span style="color: #3366CC;">'object'</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000066; font-weight: bold;">typeof</span><span style="color: #009900;">&#40;</span>object.<span style="color: #660066;">length</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">===</span> <span style="color: #3366CC;">'number'</span> <span style="color: #339933;">&amp;&amp;</span>  <span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span>object.<span style="color: #660066;">propertyIsEnumerable</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'length'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000066; font-weight: bold;">typeof</span><span style="color: #009900;">&#40;</span>object.<span style="color: #660066;">splice</span> <span style="color: #339933;">===</span> <span style="color: #3366CC;">'function'</span><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><span style="color: #339933;">!</span>recursiveCall<span style="color: #009900;">&#41;</span>	<span style="color: #009900;">&#123;</span>
		xml <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&lt;?xml version=<span style="color: #000099; font-weight: bold;">\&quot;</span>1.0<span style="color: #000099; font-weight: bold;">\&quot;</span> ?&gt;&quot;</span><span style="color: #339933;">;;</span>
		xml <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&lt;&quot;</span><span style="color: #339933;">+</span><span style="color: #000066;">name</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot; xmlns:xsi=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://www.w3.org/2001/XMLSchema-instance<span style="color: #000099; font-weight: bold;">\&quot;</span> xmlns:xsd=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://www.w3.org/2001/XMLSchema<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>isArray<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		xml <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&lt;&quot;</span><span style="color: #339933;">+</span><span style="color: #000066;">name</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span><span style="color: #009900;">&#40;</span>object<span style="color: #009900;">&#41;</span> <span style="color: #339933;">===</span> <span style="color: #3366CC;">&quot;undefined&quot;</span> <span style="color: #339933;">||</span> object <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">//Nada</span>
	<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span><span style="color: #009900;">&#40;</span>object<span style="color: #009900;">&#41;</span> <span style="color: #339933;">===</span> <span style="color: #3366CC;">&quot;object&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #000066; font-weight: bold;">in</span> object<span style="color: #009900;">&#41;</span> xml <span style="color: #339933;">+=</span> XMLString<span style="color: #009900;">&#40;</span> object<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> isArray<span style="color: #339933;">?</span><span style="color: #000066;">name</span><span style="color: #339933;">:</span>i<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Un objeto o array</span>
	<span style="color: #000066; font-weight: bold;">else</span> xml <span style="color: #339933;">+=</span> object<span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Un texto</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>isArray <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>recursiveCall<span style="color: #009900;">&#41;</span> xml <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&lt;/&quot;</span><span style="color: #339933;">+</span><span style="color: #000066;">name</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">return</span> xml<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Y un ejemplo de uso sería:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> objeto <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
	campo1 <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;valor1&quot;</span><span style="color: #339933;">,</span>
	campo2 <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;valor2&quot;</span><span style="color: #339933;">,</span>
	campo3 <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;valor3&quot;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span> XMLString<span style="color: #009900;">&#40;</span> objeto<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;XML&quot;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Donde el <strong>primer parámetro</strong> es el <span style="text-decoration: underline;">objeto a convertir</span>, y el <strong>segundo</strong> es el <span style="text-decoration: underline;">nombre del elemento raíz</span>. Con el ejemplo anterior obtendríamos como salida la siguiente cadena:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;XML</span> <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span> <span style="color: #000066;">xmlns:xsd</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;campo1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>valor1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/campo1<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;campo2<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>valor2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/campo2<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;campo3<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>valor3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/campo3<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/XML<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Con 4 cambios es posible convertirlo en código AS2 o AS3. Aunque en estos casos creo que hay métodos mejores y nativos para hacer esta función.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.daveruiz.net/programacion/js-convertir-un-objeto-en-una-cadena-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manifiesto: En defensa de los derechos fundamentales en internet</title>
		<link>http://blog.daveruiz.net/general/manifiesto-en-defensa-de-los-derechos-fundamentales-en-internet/</link>
		<comments>http://blog.daveruiz.net/general/manifiesto-en-defensa-de-los-derechos-fundamentales-en-internet/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 08:17:05 +0000</pubDate>
		<dc:creator>Dave Ruiz</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.daveruiz.net/?p=302</guid>
		<description><![CDATA[Ante la inclusión en el Anteproyecto de Ley de Economía sostenible de modificaciones legislativas que afectan al libre ejercicio de las libertades de expresión, información y el derecho de acceso a la cultura a través de Internet, los periodistas, bloggers, usuarios, profesionales y creadores de Internet manifestamos nuestra firme oposición al proyecto, y declaramos que: [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Ante la inclusión en el Anteproyecto de Ley de Economía sostenible de modificaciones legislativas que afectan al libre ejercicio de las libertades de expresión, información y el derecho de acceso a la cultura a través de Internet, los periodistas, bloggers, usuarios, profesionales y creadores de Internet manifestamos nuestra firme oposición al proyecto, y declaramos que:</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Los derechos de autor no pueden situarse por encima de los derechos fundamentales de los ciudadanos, como el derecho a la privacidad, a la seguridad, a la presunción de inocencia, a la tutela judicial efectiva y a la libertad de expresión.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">La suspensión de derechos fundamentales es y debe seguir siendo competencia exclusiva del poder judicial. Ni un cierre sin sentencia. Este anteproyecto, en contra de lo establecido en el artículo 20.5 de la Constitución, pone en manos de un órgano no judicial -un organismo dependiente del ministerio de Cultura-, la potestad de impedir a los ciudadanos españoles el acceso a cualquier página web.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">La nueva legislación creará inseguridad jurídica en todo el sector tecnológico español, perjudicando uno de los pocos campos de desarrollo y futuro de nuestra economía, entorpeciendo la creación de empresas, introduciendo trabas a la libre competencia y ralentizando su proyección internacional.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">La nueva legislación propuesta amenaza a los nuevos creadores y entorpece la creación cultural. Con Internet y los sucesivos avances tecnológicos se ha democratizado extraordinariamente la creación y emisión de contenidos de todo tipo, que ya no provienen prevalentemente de las industrias culturales tradicionales, sino de multitud de fuentes diferentes.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Los autores, como todos los trabajadores, tienen derecho a vivir de su trabajo con nuevas ideas creativas, modelos de negocio y actividades asociadas a sus creaciones. Intentar sostener con cambios legislativos a una industria obsoleta que no sabe adaptarse a este nuevo entorno no es ni justo ni realista. Si su modelo de negocio se basaba en el control de las copias de las obras y en Internet no es posible sin vulnerar derechos fundamentales, deberían buscar otro modelo.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Consideramos que las industrias culturales necesitan para sobrevivir alternativas modernas, eficaces, creíbles y asequibles y que se adecuen a los nuevos usos sociales, en lugar de limitaciones tan desproporcionadas como ineficaces para el fin que dicen perseguir.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Internet debe funcionar de forma libre y sin interferencias políticas auspiciadas por sectores que pretenden perpetuar obsoletos modelos de negocio e imposibilitar que el saber humano siga siendo libre.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Exigimos que el Gobierno garantice por ley la neutralidad de la Red en España, ante cualquier presión que pueda producirse, como marco para el desarrollo de una economía sostenible y realista de cara al futuro.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Proponemos una verdadera reforma del derecho de propiedad intelectual orientada a su fin: devolver a la sociedad el conocimiento, promover el dominio público y limitar los abusos de las entidades gestoras.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">En democracia las leyes y sus modificaciones deben aprobarse tras el oportuno debate público y habiendo consultado previamente a todas las partes implicadas. No es de recibo que se realicen cambios legislativos que afectan a derechos fundamentales en una ley no orgánica y que versa sobre otra materia.</div>
<p>Ante la inclusión en el Anteproyecto de Ley de Economía sostenible de modificaciones legislativas que afectan al libre ejercicio de las libertades de expresión, información y el derecho de acceso a la cultura a través de Internet, los periodistas, bloggers, usuarios, profesionales y creadores de Internet manifestamos nuestra firme oposición al proyecto, y declaramos que:</p>
<ol>
<li>Los derechos de autor no pueden situarse por encima de los derechos fundamentales de los ciudadanos, como el derecho a la privacidad, a la seguridad, a la presunción de inocencia, a la tutela judicial efectiva y a la libertad de expresión.</li>
<li>La suspensión de derechos fundamentales es y debe seguir siendo competencia exclusiva del poder judicial. Ni un cierre sin sentencia. Este anteproyecto, en contra de lo establecido en el artículo 20.5 de la Constitución, pone en manos de un órgano no judicial -un organismo dependiente del ministerio de Cultura-, la potestad de impedir a los ciudadanos españoles el acceso a cualquier página web.</li>
<li>La nueva legislación creará inseguridad jurídica en todo el sector tecnológico español, perjudicando uno de los pocos campos de desarrollo y futuro de nuestra economía, entorpeciendo la creación de empresas, introduciendo trabas a la libre competencia y ralentizando su proyección internacional.</li>
<li>La nueva legislación propuesta amenaza a los nuevos creadores y entorpece la creación cultural. Con Internet y los sucesivos avances tecnológicos se ha democratizado extraordinariamente la creación y emisión de contenidos de todo tipo, que ya no provienen prevalentemente de las industrias culturales tradicionales, sino de multitud de fuentes diferentes.</li>
<li>Los autores, como todos los trabajadores, tienen derecho a vivir de su trabajo con nuevas ideas creativas, modelos de negocio y actividades asociadas a sus creaciones. Intentar sostener con cambios legislativos a una industria obsoleta que no sabe adaptarse a este nuevo entorno no es ni justo ni realista. Si su modelo de negocio se basaba en el control de las copias de las obras y en Internet no es posible sin vulnerar derechos fundamentales, deberían buscar otro modelo.</li>
<li>Consideramos que las industrias culturales necesitan para sobrevivir alternativas modernas, eficaces, creíbles y asequibles y que se adecuen a los nuevos usos sociales, en lugar de limitaciones tan desproporcionadas como ineficaces para el fin que dicen perseguir.</li>
<li>Internet debe funcionar de forma libre y sin interferencias políticas auspiciadas por sectores que pretenden perpetuar obsoletos modelos de negocio e imposibilitar que el saber humano siga siendo libre.</li>
<li>Exigimos que el Gobierno garantice por ley la neutralidad de la Red en España, ante cualquier presión que pueda producirse, como marco para el desarrollo de una economía sostenible y realista de cara al futuro.</li>
<li>Proponemos una verdadera reforma del derecho de propiedad intelectual orientada a su fin: devolver a la sociedad el conocimiento, promover el dominio público y limitar los abusos de las entidades gestoras.</li>
<li>En democracia las leyes y sus modificaciones deben aprobarse tras el oportuno debate público y habiendo consultado previamente a todas las partes implicadas. No es de recibo que se realicen cambios legislativos que afectan a derechos fundamentales en una ley no orgánica y que versa sobre otra materia.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.daveruiz.net/general/manifiesto-en-defensa-de-los-derechos-fundamentales-en-internet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Invitaciones Google Wave</title>
		<link>http://blog.daveruiz.net/general/invitaciones-google-wave/</link>
		<comments>http://blog.daveruiz.net/general/invitaciones-google-wave/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 09:47:22 +0000</pubDate>
		<dc:creator>Dave Ruiz</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.daveruiz.net/?p=297</guid>
		<description><![CDATA[Gracias a Ruben Colomer (http://www.online.com.es) he tenido oportunidad de probar este nuevo servicio de Google. Por ahora no hay mucho que ver; es una idea de cómo podría funcionar, pero está interesante. El caso es que me acaban de llegar 8 invitaciones. ¿Quieres una? Pídelo comentando esta entrada...]]></description>
			<content:encoded><![CDATA[<p>Gracias a Ruben Colomer (<a href="http://www.online.com.es">http://www.online.com.es</a>) he tenido oportunidad de probar este nuevo servicio de Google. Por ahora no hay mucho que ver; es una idea de cómo podría funcionar, pero está interesante.</p>
<p>El caso es que me acaban de llegar 8 invitaciones. ¿Quieres una? <strong>Pídelo comentando esta entrada.</strong>..</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.daveruiz.net/general/invitaciones-google-wave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript: Habilitar :hover en todos los elementos para Internet Explorer con jQuery</title>
		<link>http://blog.daveruiz.net/programacion/javascript-habilitar-hover-en-todos-los-elementos-para-internet-explorer-con-jquery/</link>
		<comments>http://blog.daveruiz.net/programacion/javascript-habilitar-hover-en-todos-los-elementos-para-internet-explorer-con-jquery/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 15:49:28 +0000</pubDate>
		<dc:creator>Dave Ruiz</dc:creator>
				<category><![CDATA[Programación]]></category>

		<guid isPermaLink="false">http://blog.daveruiz.net/?p=286</guid>
		<description><![CDATA[De todos es conocido el problema de emplear la pseudo-clase :hover con Internet Explorer 6. Este funciona solamente con los hipervínculos (&#60;a&#62;&#60;/a&#62;) dejando fuera al resto de elementos. Con la ayuda de jQuery, podemos solventar de manera fácil este problema añadiendo unas lineas al inicio del script, y teniendo en cuenta una regla en el [...]]]></description>
			<content:encoded><![CDATA[<p>De todos es conocido el problema de emplear la pseudo-clase <strong>:hover</strong> con Internet Explorer 6. Este funciona solamente con los hipervínculos (<em>&lt;a&gt;&lt;/a&gt;</em>) dejando fuera al resto de elementos.</p>
<p>Con la ayuda de <strong>jQuery</strong>, podemos solventar de manera fácil este problema añadiendo unas lineas al inicio del script, y teniendo en cuenta una regla en el CSS que contenga los estilos.</p>
<p>Por ejemplo, teniendo el siguiente CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#menu</span> li<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">underline</span><span style="color: #00AA00;">:</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Habría que modificarlo tal que:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#menu</span> li<span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#menu</span> li<span style="color: #6666ff;">.hover</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span><span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>De manera que podamos acceder a dicho estilo mediante una clase.</p>
<p>Y ahora, solo quedaría realizar un script que añada la clase o la elimine según el evento llamado. Para ello emplearemos la función hover(mouseOver, mouseOut) que nos facilita jQuery.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$.<span style="color: #660066;">browser</span>.<span style="color: #660066;">msie</span><span style="color: #009900;">&#41;</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;*&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hover</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;hover&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;hover&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Y a funcionar <img src='http://blog.daveruiz.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.daveruiz.net/programacion/javascript-habilitar-hover-en-todos-los-elementos-para-internet-explorer-con-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indexado selectivo de los buscadores en tus páginas</title>
		<link>http://blog.daveruiz.net/general/indexado-selectivo-de-los-buscadores/</link>
		<comments>http://blog.daveruiz.net/general/indexado-selectivo-de-los-buscadores/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 08:00:50 +0000</pubDate>
		<dc:creator>Dave Ruiz</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[buscadores]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[indexado]]></category>
		<category><![CDATA[posicionamiento]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://blog.daveruiz.net/?p=273</guid>
		<description><![CDATA[A veces interesa que los buscadores no indexen determinada parte de una página o incluso determinada palabra, ya sea porque repetimos contenidos (puede penalizarnos), o porque no queremos que nos relacionen con un determinado término. Cada buscador implementa un método para realizar esta función. Los siguientes enlaces recopilan información de cómo usarlo con Google o [...]]]></description>
			<content:encoded><![CDATA[<p>A veces interesa que los buscadores <strong>no indexen</strong> <strong>determinada parte de una página</strong> o incluso <strong>determinada palabra</strong>, ya sea porque repetimos contenidos (puede penalizarnos), o porque no queremos que nos relacionen con un determinado término.</p>
<p>Cada buscador implementa un método para realizar esta función. Los siguientes enlaces recopilan información de cómo usarlo con <strong>Google</strong> o <strong>Yahoo!</strong>, entre otros.</p>
<p>Recopilación de los métodos de indexado selectivo de varios buscadores<a href="http://wunderwood.org/most_casual_observer/2007/05/selective_page_indexing_direct.html"></p>
<p>http://wunderwood.org/most_casual_observer/2007/05/selective_page_indexing_direct.html</a></p>
<p>Propuesta de indexado selectivo por Microformats (usado por Yahoo!)<a href="http://microformats.org/wiki/robots-exclusion"></p>
<p>http://microformats.org/wiki/robots-exclusion</a></p>
<p>Ampliación de los métodos usados por Google<br />
<a href="http://code.google.com/intl/es-ES/apis/searchappliance/documentation/46/admin_crawl/Preparing.html#pagepart">http://code.google.com/intl/es-ES/apis/searchappliance/documentation/46/admin_crawl/Preparing.html#pagepart</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.daveruiz.net/general/indexado-selectivo-de-los-buscadores/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3: Detener descarga del componente FLVPlayback</title>
		<link>http://blog.daveruiz.net/programacion/as3-detener-descarga-del-componente-flvplayback/</link>
		<comments>http://blog.daveruiz.net/programacion/as3-detener-descarga-del-componente-flvplayback/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 07:19:07 +0000</pubDate>
		<dc:creator>Dave Ruiz</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[componente]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[flvcomponent]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.daveruiz.net/?p=257</guid>
		<description><![CDATA[Por alguna razón, Adobe no implementó un método para detener la descarga de un archivo FLV cuando queremos eliminar un componente FLVPlayback. Puedes crear un reproductor FLV dinámicamente y luego destruirlo, pero si ha comenzado la reproducción el fichero FLV continuará descargándose hasta que termine. La clase FLVPlayback implementa el método closeVideoPlayer( índice ) que [...]]]></description>
			<content:encoded><![CDATA[<p>Por alguna razón, Adobe no implementó un método para detener la descarga de un archivo FLV cuando queremos eliminar un componente FLVPlayback. Puedes crear un reproductor FLV dinámicamente y luego destruirlo, pero si ha comenzado la reproducción el fichero FLV continuará descargándose hasta que termine.</p>
<p>La clase FLVPlayback implementa el método <em>closeVideoPlayer( índice ) </em>que permite detener la descarga del archivo FLV que esté descargando, pero está limitado a cuando abres múltiples vídeos en un solo componente. La limitación consiste en no dejarte eliminar la conexión de video con la que creaste el reproductor.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Creamos el reproductor y lo ponemos a reproducir</span>
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">video</span>:FlvPlayback = <span style="color: #000000; font-weight: bold;">new</span> FlvPlayback<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">video</span>.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;video.flv&quot;</span> <span style="color: #66cc66;">&#41;</span>;</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Ahora intentamos cerrar el reproductor</span>
<span style="color: #0066CC;">video</span>.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">video</span>.<span style="color: #006600;">closeVideoPlayer</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// Debería detener la descarga, pero nos lanza un error</span>
<span style="color: #0066CC;">video</span> = <span style="color: #000000; font-weight: bold;">null</span>; <span style="color: #808080; font-style: italic;">// Para que el Garbage Collector lo elimine de memoria</span></pre></div></div>

<p>Si en el ejemplo omitimos <em>video.closeVideoPlayer(0)</em>, el reproductor se elimina, pero el vídeo continúa descargándose y consumiendo ancho de banda.</p>
<p>Esto puede ser un problema cuando haces uso de varias instancias de este componente, y debido a las circunstancias no puedes usar uno solo. Cada una de ellas llamará a la descarga de un FLV, y puede darse el caso de estar descargando varios FLV a la vez, con el consiguiente consumo de ancho de banda.</p>
<p>La solución, acceder a la primera instancia VideoPlayer y detenerlo uno mismo:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Ahora intentamos cerrar el reproductor</span>
<span style="color: #0066CC;">video</span>.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">video</span>.<span style="color: #006600;">getVideoPlayer</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// Ahora sí, detiene la descarga del archivo FLV</span>
<span style="color: #0066CC;">video</span> = <span style="color: #000000; font-weight: bold;">null</span>; <span style="color: #808080; font-style: italic;">// Para que el Garbage Collector lo elimine de memoria</span></pre></div></div>

<p>Algo muy sencillo, pero que ya me ha hecho perder algo de tiempo buscándolo <img src='http://blog.daveruiz.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> .  Aquí lo dejo como apunte.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.daveruiz.net/programacion/as3-detener-descarga-del-componente-flvplayback/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

