<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>El blog de Juan Palómez</title>
	<atom:link href="http://juanpalomez.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://juanpalomez.wordpress.com</link>
	<description>Yo me lo guiso...</description>
	<lastBuildDate>Fri, 23 Dec 2011 16:36:42 +0000</lastBuildDate>
	<language>es</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='juanpalomez.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>El blog de Juan Palómez</title>
		<link>http://juanpalomez.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://juanpalomez.wordpress.com/osd.xml" title="El blog de Juan Palómez" />
	<atom:link rel='hub' href='http://juanpalomez.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Wappo solver</title>
		<link>http://juanpalomez.wordpress.com/2011/12/23/wappo-solver/</link>
		<comments>http://juanpalomez.wordpress.com/2011/12/23/wappo-solver/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 16:22:07 +0000</pubDate>
		<dc:creator>thisisoneball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ai]]></category>
		<category><![CDATA[clisp]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[lisp]]></category>
		<category><![CDATA[wappo]]></category>

		<guid isPermaLink="false">http://juanpalomez.wordpress.com/?p=204</guid>
		<description><![CDATA[This is a Lisp program that solves any level of the game Wappo. It&#8217;s a Java game that came with Siemens mobile phones. You have to code the layout of the level you want to solve. At the end of the program you can see the example for the first three levels of the game. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=204&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a Lisp program that solves any level of the game <a title="Wappo" href="http://www.softexdigital.com/wappo.htm">Wappo</a>. It&#8217;s a Java game that came with Siemens mobile phones.</p>
<p>You have to code the layout of the level you want to solve. At the end of the program you can see the example for the first three levels of the game. You have to enter the starting coordinates of Wappo, one or more Yumchaks (the enemies), the pits, the walls (in this case you enter the coordinates of the two tiles that surround the wall), and the exit.</p>
<p>It will print the sequence of moves you have to make. Works at least with CLISP for Windows</p>
<p>&nbsp;</p>
<pre>

;; (board wappo (yumchaks) (pits) (walls))
;; (setq state (cons (make-list 6 :initial-element (make-list 6)) '((3 4) ((5 4)) ((1 4)) ((1 3 1 4) (3 4 3 5) (5 4 5 5) (5 4 4 4) (5 0 4 0)))))

(defun allowed (state from to)
(let (wall pit)
  (setq from (subseq from 0 2))
  (if
    (or
      (&gt; (first to) 5)
      (&lt; (first to) 0)
      (&gt; (second to) 5)
      (&lt; (second to) 0)
    )
    nil
    (if
      (dolist (wall (fourth state) t)
        (if (or (equal (append from to) wall) (equal (append to from) wall))
            (return nil)))
      (if (equal from (first state))
        (dolist (pit (third state) t)
	  (if (equal to pit)
	      (return nil)))
	t)
    )
  )
)
)

(defun randomize-list (l)
  (if (not (null l))
    (let ((element (nth (random (length l)) l)))
      (cons element (randomize-list (remove element l)))
    )
  )
)

(defun depth-search (state)
  (let ((offsets '((1 0) (0 1) (-1 0) (0 -1))) offset destination yumchak i j return-value state2 pit)
    (if (equal (first state) (fifth state))
      t
      (dolist (offset (randomize-list offsets))
(format t "~%&gt;&gt;~A ~A&lt;&lt;" (first state) offset)
;	(setq return-value nil)
        (setq destination (mapcar #'+ offset (first state)))
        (if (allowed state (first state) destination)
  	  (progn
	    (setq state2 (copy-tree state))
	    (setf (first state2) destination)
	    (if (dotimes (j (length (second state2)) t)
		  (decf (third (nth j (second state2))))
	          (dolist (i '(1 2))
		    (if (&lt;= (third (nth j (second state2))) 0) (progn
	              (setq yumchak (nth j (second state2)))
	              (cond
		        ((and
		          (&lt; (first yumchak) (first (first state2)))
		          (allowed state2 yumchak (list (+ 1 (first yumchak)) (second yumchak))))
			 (incf (first (nth j (second state2)))))
		        ((and
		          (&gt; (first yumchak) (first (first state2)))
		          (allowed state2 yumchak (list (- (first yumchak) 1) (second yumchak))))
			 (decf (first (nth j (second state2)))))
		        ((and
		          (&lt; (second yumchak) (second (first state2)))
		          (allowed state2 yumchak (list (first yumchak) (+ 1 (second yumchak)))))
			 (incf (second (nth j (second state2)))))
		        ((and
		          (&gt; (second yumchak) (second (first state2)))
		          (allowed state2 yumchak (list (first yumchak) (- (second yumchak) 1))))
			 (decf (second (nth j (second state2)))))
	              )
		      (dolist (pit (third state2) t)
	                (if (equal (subseq (nth j (second state2)) 0 2) pit) (progn (print 'pozo)
	                  (setf (third (nth j (second state2))) 4)))         )
		    ))
	          )
	          (if (equal (first state2) (subseq (nth j (second state2)) 0 2))
(progn (print 'yumchak) (return nil)))
;		    (return nil))
	        )
;(progn (break)
	        (setq return-value (depth-search state2))
;(break))
            )
	    (if return-value (return (cons (first state) return-value)))
	  )))
    )
  )
)

; (wappo (yumchaks) (pits) (walls) (exit))
(let (state)
  (setq level1 '((3 4) ((5 4 0)) ((1 4)) ((1 3 1 4) (3 4 3 5) (5 4 5 5) (5 4 4 4) (5 0 4 0)) (3 0)))
  (setq level2 '((4 1) ((5 0 0)) ((2 4)) ((0 0 0 1) (1 0 1 1) (4 0 4 1) (3 1 3 2) (0 3 0 4)) (1 0)))
  (setq level3 '((5 0) ((3 3 0)) ((3 1) (5 2)) ((0 0 1 0) (1 0 2 0) (3 0 4 0) (3 0 3 1) (4 0 4 1) (3 1 3 2) (3 2 3 3) (2 2 2 3) (0 3 1 3) (2 4 2 5) (4 4 4 5) (4 4 3 4)) (2 0)))
;  (trace depth-search)
  (print (depth-search level3))
)
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/juanpalomez.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/juanpalomez.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/juanpalomez.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/juanpalomez.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/juanpalomez.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/juanpalomez.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/juanpalomez.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/juanpalomez.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/juanpalomez.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/juanpalomez.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/juanpalomez.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/juanpalomez.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/juanpalomez.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/juanpalomez.wordpress.com/204/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=204&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://juanpalomez.wordpress.com/2011/12/23/wappo-solver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3745f2594a0fd922d844740fe58b685?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">thisisoneball</media:title>
		</media:content>
	</item>
		<item>
		<title>Comprobar memoria sin reiniciar (Unix)</title>
		<link>http://juanpalomez.wordpress.com/2011/12/03/comprobar-memoria-sin-reiniciar-unix/</link>
		<comments>http://juanpalomez.wordpress.com/2011/12/03/comprobar-memoria-sin-reiniciar-unix/#comments</comments>
		<pubDate>Sat, 03 Dec 2011 11:35:32 +0000</pubDate>
		<dc:creator>thisisoneball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[memoria]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://juanpalomez.wordpress.com/?p=200</guid>
		<description><![CDATA[memtester es un programa para Unix al estilo de memtest86 o memtest86+ pero corre en espacio de usuario, es decir, es un programa normal y corriente que se instala en el S.O. Esto tiene el inconveniente de que no se puede comprobar toda la memoria, solo la que esté libre, pero se puede comprobar la [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=200&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://pyropus.ca/software/memtester/" title="memtester" target="_blank">memtester</a> es un programa para Unix al estilo de memtest86 o memtest86+ pero corre en espacio de usuario, es decir, es un programa normal y corriente que se instala en el S.O.<br />
	Esto tiene el inconveniente de que no se puede comprobar toda la memoria, solo la que esté libre, pero se puede comprobar la mayor parte. La ventaja es que funciona en cualquier equipo en el que tengas ya un Unix instalado (memtest86 por ejemplo solo funciona en x86), que no hay que reiniciar el equipo y que se puede hacer en remoto.<br />
	Como referencia, me ha tardado 7 horas en comprobar 7.5 GB de memoria DDR2-533 en un Itanium 9120N</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/juanpalomez.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/juanpalomez.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/juanpalomez.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/juanpalomez.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/juanpalomez.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/juanpalomez.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/juanpalomez.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/juanpalomez.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/juanpalomez.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/juanpalomez.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/juanpalomez.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/juanpalomez.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/juanpalomez.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/juanpalomez.wordpress.com/200/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=200&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://juanpalomez.wordpress.com/2011/12/03/comprobar-memoria-sin-reiniciar-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3745f2594a0fd922d844740fe58b685?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">thisisoneball</media:title>
		</media:content>
	</item>
		<item>
		<title>Compilar mysql-udf-regexp en RHEL 6 x86_64</title>
		<link>http://juanpalomez.wordpress.com/2011/09/06/compilar-mysql-udf-regexp-en-rhel-6-x86_64/</link>
		<comments>http://juanpalomez.wordpress.com/2011/09/06/compilar-mysql-udf-regexp-en-rhel-6-x86_64/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 20:14:53 +0000</pubDate>
		<dc:creator>thisisoneball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[expresiones regulares]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[regexp]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[rhel6]]></category>
		<category><![CDATA[udf]]></category>

		<guid isPermaLink="false">http://juanpalomez.wordpress.com/?p=191</guid>
		<description><![CDATA[Instrucciones para compilar las UDFs de expresiones regulares de https://launchpad.net/mysql-udf-regexp en RHEL 6 para x86_64 En la web no proporcionan ningún archivo donde se pueda bajar todo el paquete con las fuentes. Sugieren ejecutar el comando bzr branch lp:mysql-udf-regexp pero a mí no me funcionaba, solo me funcionó de esta manera: bzr branch http://bazaar.launchpad.net/~vcs-imports/mysql-udf-regexp/trunk En [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=191&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Instrucciones para compilar las UDFs de expresiones regulares de <a href="https://launchpad.net/mysql-udf-regexp" title="https://launchpad.net/mysql-udf-regexp" target="_blank">https://launchpad.net/mysql-udf-regexp</a> en RHEL 6 para x86_64</p>
<p>En la web no proporcionan ningún archivo donde se pueda bajar todo el paquete con las fuentes. Sugieren ejecutar el comando</p>
<p><code>bzr branch lp:mysql-udf-regexp</code></p>
<p>pero a mí no me funcionaba, solo me funcionó de esta manera:</p>
<p><code>bzr branch http://bazaar.launchpad.net/~vcs-imports/mysql-udf-regexp/trunk</code></p>
<p>En mi red tengo que salir a través de un proxy, y bzr requiere proxy HTTP y HTTPS, así que tuve que configurarlo en las variables de entorno http_proxy y https_proxy, instalar el paquete &#8220;bzr&#8221;, que viene en el repositorio principal de RHEL6, y ejecutar el comando anterior.</p>
<p>Esto deja las fuentes del proyecto en el directorio ./trunk/regexp</p>
<p>El programa requiere las fuentes de Mysql, o al menos los archivos include (.h) de éste para poder compilar. Si has instalado Mysql desde fuentes deberías tener estos archivos. En mi caso tengo instalado el paquete de binarios, pero he podido bajar el paquete de fuentes correspondiente a la misma versión de Mysql que tengo instalada, y ha funcionado.</p>
<p>Pero no basta con los ficheros .h del paquete de ficheros fuente, también necesita otros del paquete de binarios, sobre todo porque esa es la versión que se está ejecutando en el sistema, y contiene información de cómo está configurado el servidor. El script ./configure solo deja especificar uno de estos dos directorios, con la opcion <code>--with-mysql-src</code>, así que la única manera de especificar ambos que he encontrado es</p>
<p>(/usr/local/percona es donde está instalado el paquete de binarios, y /usr/local/Percona-Server-5.1.54-rel12.5 el de fuentes):</p>
<p><code>CFLAGS='-I/usr/local/percona/include/mysql' ./configure --with-mysql-src=/usr/local/Percona-Server-5.1.54-rel12.5</p>
<p>CFLAGS='-I/usr/local/percona/include/mysql' make</code></p>
<p>De esta manera ya compila, solo falta instalar la biblioteca. Por alguna razón la crea en un directorio oculto llamado .libs</p>
<p>Una forma de instalarlo es copiar la biblioteca dinámica al directorio plugin de Mysql:</p>
<p><code>cp .libs/regexp.so /usr/local/percona/lib/mysql/plugin/</code></p>
<p>Y crear las funciones en Mysql:</p>
<p><code><br />
CREATE FUNCTION regexp_like RETURNS INTEGER SONAME "regexp.so";<br />
CREATE FUNCTION regexp_substr RETURNS STRING SONAME "regexp.so";<br />
CREATE FUNCTION regexp_instr RETURNS INTEGER SONAME "regexp.so";<br />
CREATE FUNCTION regexp_replace RETURNS STRING SONAME "regexp.so";<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/juanpalomez.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/juanpalomez.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/juanpalomez.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/juanpalomez.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/juanpalomez.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/juanpalomez.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/juanpalomez.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/juanpalomez.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/juanpalomez.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/juanpalomez.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/juanpalomez.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/juanpalomez.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/juanpalomez.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/juanpalomez.wordpress.com/191/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=191&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://juanpalomez.wordpress.com/2011/09/06/compilar-mysql-udf-regexp-en-rhel-6-x86_64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3745f2594a0fd922d844740fe58b685?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">thisisoneball</media:title>
		</media:content>
	</item>
		<item>
		<title>Detecting charsets with recode</title>
		<link>http://juanpalomez.wordpress.com/2011/05/13/detecting-charsets-with-recode/</link>
		<comments>http://juanpalomez.wordpress.com/2011/05/13/detecting-charsets-with-recode/#comments</comments>
		<pubDate>Fri, 13 May 2011 12:07:33 +0000</pubDate>
		<dc:creator>thisisoneball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[charsets]]></category>
		<category><![CDATA[encodings]]></category>
		<category><![CDATA[recode]]></category>

		<guid isPermaLink="false">http://juanpalomez.wordpress.com/?p=176</guid>
		<description><![CDATA[- source.txt is the file containing unreadable characters - &#8216;Ñ&#8217; is one character that we now that appears inside source.txt and is not readable - recode is a free program that translates text between different encodings This just tries to recode source.txt using every encoding supported by recode, then checks the recoded file for the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=176&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>- source.txt is the file containing unreadable characters<br />
- &#8216;Ñ&#8217; is one character that we now that appears inside source.txt and is not readable<br />
- <a href="http://www.gnu.org/software/recode/">recode</a> is a free program that translates text between different encodings</p>
<p>This just tries to recode source.txt using every encoding supported by recode, then checks the recoded file for the special character, if it is found, it means that the character was recoded correctly, so it prints the name of the encoding</p>
<pre>for a in $(recode --list | cut -f1 -d\ )
do
    if recode $a &lt; source.txt 2&gt; /dev/null | grep 'Ñ' &gt; /dev/null
    then
       echo $a
    fi
done</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/juanpalomez.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/juanpalomez.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/juanpalomez.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/juanpalomez.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/juanpalomez.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/juanpalomez.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/juanpalomez.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/juanpalomez.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/juanpalomez.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/juanpalomez.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/juanpalomez.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/juanpalomez.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/juanpalomez.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/juanpalomez.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=176&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://juanpalomez.wordpress.com/2011/05/13/detecting-charsets-with-recode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3745f2594a0fd922d844740fe58b685?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">thisisoneball</media:title>
		</media:content>
	</item>
		<item>
		<title>Parallel grep on a single file</title>
		<link>http://juanpalomez.wordpress.com/2011/04/08/parallel-grep-on-a-single-file/</link>
		<comments>http://juanpalomez.wordpress.com/2011/04/08/parallel-grep-on-a-single-file/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 11:24:43 +0000</pubDate>
		<dc:creator>thisisoneball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[multicore]]></category>
		<category><![CDATA[parallel]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://juanpalomez.wordpress.com/?p=171</guid>
		<description><![CDATA[I have a very large text file which I need to grep a lot of times, and it takes 4 minutes. The grep command only uses one core, so it could take much less time if I parallelize the command. If you have GNU Parallel this will do the trick (tested on Linux and Cygwin): [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=171&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have a very large text file which I need to grep a lot of times, and it takes 4 minutes. The grep command only uses one core, so it could take much less time if I parallelize the command.</p>
<p>If you have <a href="http://savannah.gnu.org/projects/parallel">GNU Parallel</a> this will do the trick (tested on Linux and Cygwin):</p>
<pre>$ cat dump.sql | parallel -k --pipe grep -i pattern</pre>
<p>&#8212;</p>
<p>This is a different method, using xargs, which is present in most Unices, but it uses temporary files (the original file splitted).</p>
<p>This command splits the big file into 6 smaller ones, as I want to use 6 cores in parallel. The -C switch limits the size of each splitted file, and ensures that no lines are splitted between one file and the next one, the split will always occur at the end of one line:</p>
<pre>$ split -C 320000000 dump.sql
 -rw-r--r--. 1 bd users 319999897 Apr 7 16:55 xaa
 -rw-r--r--. 1 bd users 319999939 Apr 7 16:55 xab
 -rw-r--r--. 1 bd users 319999801 Apr 7 16:55 xac
 -rw-r--r--. 1 bd users 319999988 Apr 7 16:55 xad
 -rw-r--r--. 1 bd users 319999595 Apr 7 16:55 xae
 -rw-r--r--. 1 bd users 308677345 Apr 7 16:55 xaf</pre>
<p>And this command runs one grep process for each of the splitted files:</p>
<pre>$ ls xa* | xargs -P 6 -n 1 grep -i 'pattern'</pre>
<p>For differences between this kind of programs, see <a href="http://www.gnu.org/software/parallel/man.html#differences_between_xargs_and_gnu_parallel">the Parallel man page</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/juanpalomez.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/juanpalomez.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/juanpalomez.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/juanpalomez.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/juanpalomez.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/juanpalomez.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/juanpalomez.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/juanpalomez.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/juanpalomez.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/juanpalomez.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/juanpalomez.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/juanpalomez.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/juanpalomez.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/juanpalomez.wordpress.com/171/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=171&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://juanpalomez.wordpress.com/2011/04/08/parallel-grep-on-a-single-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3745f2594a0fd922d844740fe58b685?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">thisisoneball</media:title>
		</media:content>
	</item>
		<item>
		<title>RRDs.pm / perl-rrdtool for RHEL 6 x86_64</title>
		<link>http://juanpalomez.wordpress.com/2011/03/01/rrds-pm-perl-rrdtool-for-rhel-6-x86_64/</link>
		<comments>http://juanpalomez.wordpress.com/2011/03/01/rrds-pm-perl-rrdtool-for-rhel-6-x86_64/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 20:26:31 +0000</pubDate>
		<dc:creator>thisisoneball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[red hat]]></category>

		<guid isPermaLink="false">http://juanpalomez.wordpress.com/?p=165</guid>
		<description><![CDATA[If you&#8217;re looking for the file RRDs.pm for Red Hat Enterprise Linux 6, as far as I know it&#8217;s not included in the official Red Hat packages or in the EPEL ones (there is a rrdtool package but not a perl-rrdtool one) I downloaded and compiled the sources for the whole rrdtool program, the same [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=165&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re looking for the file RRDs.pm for Red Hat Enterprise Linux 6, as far as I know it&#8217;s not included in the official Red Hat packages or in the EPEL ones (there is a rrdtool package but not a perl-rrdtool one)</p>
<p>I downloaded and compiled the sources for the whole rrdtool program, the same version that comes with RHEL 6, and uploaded just the necessary files for RRDs.pm: (rename the file to .tar.gz)</p>
<p><a href='http://juanpalomez.files.wordpress.com/2011/03/perl-rrd-1-3-8-rhel6-tar-gz.doc'>perl-rrd-1.3.8-rhel6.tar.gz</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/juanpalomez.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/juanpalomez.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/juanpalomez.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/juanpalomez.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/juanpalomez.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/juanpalomez.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/juanpalomez.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/juanpalomez.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/juanpalomez.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/juanpalomez.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/juanpalomez.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/juanpalomez.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/juanpalomez.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/juanpalomez.wordpress.com/165/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=165&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://juanpalomez.wordpress.com/2011/03/01/rrds-pm-perl-rrdtool-for-rhel-6-x86_64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3745f2594a0fd922d844740fe58b685?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">thisisoneball</media:title>
		</media:content>
	</item>
		<item>
		<title>Upload multiple files to tumblr</title>
		<link>http://juanpalomez.wordpress.com/2010/11/22/upload-multiple-files-to-tumblr/</link>
		<comments>http://juanpalomez.wordpress.com/2010/11/22/upload-multiple-files-to-tumblr/#comments</comments>
		<pubDate>Mon, 22 Nov 2010 18:13:28 +0000</pubDate>
		<dc:creator>thisisoneball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[shell scripts]]></category>
		<category><![CDATA[tumblr]]></category>

		<guid isPermaLink="false">http://juanpalomez.wordpress.com/?p=141</guid>
		<description><![CDATA[This is an example of a photo upload using the Tumblr API and cURL: curl -s -F "email=me@hotmail.com" -F "password=mypass" -F "type=photo" -F "tags=tag1,tag2" \ -F "data=@picture.jpg"  http://www.tumblr.com/api/write If nothing goes wrong, this will print the tumblr post ID of the post you have just created. See here for other parameters that you can change or add to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=141&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is an example of a photo upload using the <a title="Tumblr API" href="http://www.tumblr.com/docs/en/api" target="_blank">Tumblr API</a> and <a title="cURL" href="http://curl.haxx.se/" target="_blank">cURL</a>:</p>
<pre>curl -s -F "email=me@hotmail.com" -F "password=mypass" -F "type=photo" -F "tags=tag1,tag2" \
-F "data=@picture.jpg"  http://www.tumblr.com/api/write</pre>
<p>If nothing goes wrong, this will print the tumblr post ID of the post you have just created.</p>
<p>See <a title="here" href="http://www.tumblr.com/docs/en/api#api_write" target="_blank">here</a> for other parameters that you can change or add to that command (queuing the post, setting a caption, uploading different types of content &#8230;)</p>
<p>This is a simple bash script that uploads all the JPG files in the current folder, in a random order, adding them to your tumblr queue (instead of posting them now):</p>
<pre>IFS=$'\n'     # needed if the jpg filenames contain spaces (restore the value later with  IFS=$' \t\n'  or close the terminal)

for file in $(ls *.JPG *.jpg | shuf)       # shuf randomizes the jpg filenames
do</pre>
<pre style="padding-left:30px;">
echo $file
curl -s -F "email=me@hotmail.com" -F "password=mypass" -F "type=photo" -F "state=queue"  \
-F "data=@$file"  http://www.tumblr.com/api/write
echo
sleep 5s                               # waits between uploads
</pre>
<pre>done</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/juanpalomez.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/juanpalomez.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/juanpalomez.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/juanpalomez.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/juanpalomez.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/juanpalomez.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/juanpalomez.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/juanpalomez.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/juanpalomez.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/juanpalomez.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/juanpalomez.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/juanpalomez.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/juanpalomez.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/juanpalomez.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=141&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://juanpalomez.wordpress.com/2010/11/22/upload-multiple-files-to-tumblr/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3745f2594a0fd922d844740fe58b685?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">thisisoneball</media:title>
		</media:content>
	</item>
		<item>
		<title>Servidores SSH gratuitos para Windows</title>
		<link>http://juanpalomez.wordpress.com/2010/11/12/servidores-ssh-gratuitos-para-windows/</link>
		<comments>http://juanpalomez.wordpress.com/2010/11/12/servidores-ssh-gratuitos-para-windows/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 00:02:15 +0000</pubDate>
		<dc:creator>thisisoneball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://juanpalomez.wordpress.com/?p=120</guid>
		<description><![CDATA[Basados en Cygwin y OpenSSH: - Cygwin + paquete OpenSSH Probablemente la mejor opción pero la más complicada de instalar. Recomendable si ya tenías una instalación de Cygwin en esa máquina. Está bien actualizada y una vez que haces el login remoto tienes disponibles todas las utilidades de Cygwin, y esto es muy útil ya que [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=120&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div></div>
<p><div><strong>Basados en Cygwin y OpenSSH:</strong></div>
<div><strong><br />
</strong></div>
<div>- <a title="Cygwin" href="http://www.cygwin.com/">Cygwin</a> + paquete OpenSSH</div>
<div>Probablemente la mejor opción pero la más complicada de instalar. Recomendable si ya tenías una instalación de Cygwin en esa máquina.</div>
<div>Está bien actualizada y una vez que haces el login remoto tienes disponibles todas las utilidades de Cygwin, y esto es muy útil ya que por SSH solo puedes usar comandos de texto.</div>
<div>Aparte del servidor, trae los clientes ssh.exe y scp.exe, útiles para acceder a otros servidores SSH desde línea de comandos, y para hacer pruebas con el servidor local.</div>
<div>- <a title="copssh" href="http://www.itefix.no/i2/copssh">copssh</a> y sshwindows</div>
<div>También están basadas en Cygwin y en OpenSSH, y de hecho pueden dar problemas si tienes ya Cygwin instalado.</div>
<div>
<div>Lo bueno es que es más cómodo de instalar que la opción anterior. Es el típico instalador, por lo que es útil para una máquina sin acceso a Internet.</div>
</div>
<div>sshwindows está bastante desactualizada, y esto puede ser bastante peligroso sobre todo si tu servidor SSH va a estar abierto a Internet.</div>
<div></div>
</p>
<p><div><strong>Servidores nativos para Windows, no utilizan Cygwin:</strong></div>
<div><strong><br />
</strong></div>
<div><a href="http://www.freesshd.com/" target="_blank">http://www.freesshd.com/</a></div>
<div><a href="http://mobassh.mobatek.net/en/" target="_blank">http://mobassh.mobatek.net/en/</a></div>
<div><a href="http://www.bitvise.com/winsshd" target="_blank">http://www.bitvise.com/winsshd</a></div>
</p>
<p><div>Se agradecen sugerencias de otros programas y opiniones si usáis alguna de las opciones anteriores (por ejemplo si soporta SCP, SFTP, túneles, &#8230;)</div>
</p>
<p><div>Puede que para un servidor Windows sea más conveniente un escritorio remoto tipo VNC, ya que son gráficos y también permiten transferir archivos. Las ventajas de usar SSH son:</div>
<div>- Permite tunelizar conexiones y hacer port forwarding</div>
<div>- Las transferencias de archivos se pueden utilizar con clientes típicos como Filezilla o WinSCP</div>
<div>- Es cómodo para ejecutar comandos en el servidor o transferir archivos de forma no interactiva, por ejemplo desde scripts o desde un programador de tareas</div></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/juanpalomez.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/juanpalomez.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/juanpalomez.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/juanpalomez.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/juanpalomez.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/juanpalomez.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/juanpalomez.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/juanpalomez.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/juanpalomez.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/juanpalomez.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/juanpalomez.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/juanpalomez.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/juanpalomez.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/juanpalomez.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=120&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://juanpalomez.wordpress.com/2010/11/12/servidores-ssh-gratuitos-para-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3745f2594a0fd922d844740fe58b685?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">thisisoneball</media:title>
		</media:content>
	</item>
		<item>
		<title>Cómo comprar billetes de ALSA sin comisión</title>
		<link>http://juanpalomez.wordpress.com/2010/08/21/como-comprar-billetes-de-alsa-sin-comision/</link>
		<comments>http://juanpalomez.wordpress.com/2010/08/21/como-comprar-billetes-de-alsa-sin-comision/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 16:35:48 +0000</pubDate>
		<dc:creator>thisisoneball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://juanpalomez.wordpress.com/?p=114</guid>
		<description><![CDATA[Si utilizas regularmente los autobuses de ALSA sabrás que cobran una comisión muy alta por comprar los billetes por internet (p.ej. 2,50 euros por un billete de 16,30 euros).  Éstas son las formas de comprar un billete sin pasar por la taquilla: www.movelia.es: 2,50 euros de comisión (&#8220;gastos de gestión&#8221; según ellos) www.alsa.es: 1 euro [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=114&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Si utilizas regularmente los autobuses de ALSA sabrás que cobran una comisión muy alta por comprar los billetes por internet (p.ej. 2,50 euros por un billete de 16,30 euros).  Éstas son las formas de comprar un billete sin pasar por la taquilla:</p>
<ul>
<li>www.movelia.es: 2,50 euros de comisión (&#8220;gastos de gestión&#8221; según ellos)</li>
<li>www.alsa.es: 1 euro para compras inferiores a 10 euros; 2,50 euros para compras superiores a 10 euros.</li>
<li>Cajeros de La Caixa: creo que 2 euros de comisión. Útil si no tienes conexión a Internet y no tienes cerca una taquilla de Alsa.</li>
<li>Tarjeta Bus Plus de Alsa: permite comprar en www.alsa.es sin comisión. Es una tarjeta monedero, en la cual cargas dinero y luego al comprar el billete te coge el dinero de ahí. Se saca y se recarga en las taquillas de Alsa. Aparte de la comisión también tiene otras ventajas:
<ul>
<li>Te da descuentos cuanto más dinero cargues:</li>
</ul>
</li>
</ul>
<p style="padding-left:90px;">más de 100 euros: 5%<br />
más de 200 euros: 10%<br />
más de 300 euros: 15%<br />
más de 500 euros: 20%</p>
<p style="padding-left:90px;">Según la web, cuanto más cargues en la tarjeta mayor descuento obtendrás. Pero esto no funciona como parece, de hecho puede que cargando más dinero en la tarjeta tu descuento se vea reducido.<br />
Por ejemplo: Cargas 200 euros, el descuento es de 10%. Después de hacer algunos viajes, tu saldo ha bajado a 150 euros. Entonces cargas otros 100 euros, y te quedan 250. Lo lógico es que tu descuento siga en el 10%, pero en realidad te ha bajado, ya que la carga de 100 euros supone un descuento del 5%, y hacen la media entre el 10% y el 5%</p>
<p style="padding-left:90px;">Por lo tanto lo que deberías haber hecho es cargar 200 euros, gastarlos completamente, y entonces cargar los 100 euros. Pregunta por si acaso en la taquilla cuando vayas a cargarlo. </p>
<ul>
<li> 
<ul>
<li>Si pierdes el autobús puedes ir a la taquilla de la estación en la media hora siguiente y te darán plaza en el siguiente, si quedan plazas.</li>
<li>Puedes usar la tarjeta para comprar billetes para cualquier persona. Por lo tanto puede ser interesante cargarla entre varias personas y coger todos los billetes con ella (para comprar un billete solo hace falta el número de la tarjeta y el NIF del titular).</li>
<li>Te envían el número de localizador en un SMS, junto con otros datos del viaje. No hace falta imprimir nada, con dar el número o tu nombre al conductor suele valer, o en todo caso puede pedirte el DNI.</li>
<li>En dos ocasiones me han cobrado un viaje 2 veces. Recomiendo vigilar el saldo de vez en cuando (lo puedes ver en la página de Alsa en la sección Mi Bus Plus. Lo gestioné por e-mail y me devolvieron el dinero sin problemas.</li>
<li>Recuerda desmarcar la casilla del Seguro de viaje al comprar cada billete, a no ser que quieras el seguro. Es 1 euro más por trayecto.</li>
</ul>
</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/juanpalomez.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/juanpalomez.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/juanpalomez.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/juanpalomez.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/juanpalomez.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/juanpalomez.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/juanpalomez.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/juanpalomez.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/juanpalomez.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/juanpalomez.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/juanpalomez.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/juanpalomez.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/juanpalomez.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/juanpalomez.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=114&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://juanpalomez.wordpress.com/2010/08/21/como-comprar-billetes-de-alsa-sin-comision/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3745f2594a0fd922d844740fe58b685?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">thisisoneball</media:title>
		</media:content>
	</item>
		<item>
		<title>Copiar tablas / crear tablas con una SELECT / Copy tables</title>
		<link>http://juanpalomez.wordpress.com/2009/10/28/copiar-tablas-crear-tablas-con-una-select-copy-tables/</link>
		<comments>http://juanpalomez.wordpress.com/2009/10/28/copiar-tablas-crear-tablas-con-una-select-copy-tables/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 00:37:25 +0000</pubDate>
		<dc:creator>thisisoneball</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bases de datos]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://juanpalomez.wordpress.com/?p=104</guid>
		<description><![CDATA[Hay varias formas diferentes de copiar una tabla rápidamente, en una sola consulta SQL. Evitan tener que hacer un CREATE TABLE especificando todos los nombres y tipos de datos de los campos. No obstante sólo copian los campos, no los índices ni las constraints. Esta es una comparativa de ellas y los SGBD en los [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=104&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hay varias formas diferentes de copiar una tabla rápidamente, en una sola consulta SQL. Evitan tener que hacer un CREATE TABLE especificando todos los nombres y tipos de datos de los campos. No obstante sólo copian los campos, no los índices ni las constraints. Esta es una comparativa de ellas y los SGBD en los que funciona cada una:</p>
<table border="1">
<tbody>
<tr>
<td><strong>Consulta</strong></td>
<td><strong>Mysql</strong></td>
<td><strong>Postgres</strong></td>
<td><strong>Oracle</strong></td>
<td><strong>Access</strong></td>
<td><strong>Copia estructura</strong></td>
<td><strong>Copia datos</strong></td>
</tr>
<tr>
<td>CREATE TABLE destino AS SELECT * FROM origen</td>
<td>Si</td>
<td>Si</td>
<td>Si</td>
<td>No</td>
<td>Si</td>
<td>Si</td>
</tr>
<tr>
<td>CREATE TABLE destino LIKE origen</td>
<td>Si**</td>
<td>Si</td>
<td>No</td>
<td>No</td>
<td>Si</td>
<td>No</td>
</tr>
<tr>
<td>INSERT INTO destino SELECT * FROM origen</td>
<td>Si</td>
<td>Si</td>
<td>Si</td>
<td>Si</td>
<td>No</td>
<td>Si</td>
</tr>
<tr>
<td>SELECT * INTO destino FROM origen</td>
<td>No</td>
<td>Si*</td>
<td>No</td>
<td>Si</td>
<td>Si</td>
<td>Si</td>
</tr>
</tbody>
</table>
<p>* La documentación de Postgres recomienda usar CREATE TABLE AS mejor que SELECT INTO<br />
<br />
** En MySQL esta instrucción copia todas las características de la tabla origen, incluidos los índices, comentarios, &#8230; Por lo tanto para hacer una copia idéntica lo mejor es CREATE TABLE destino LIKE origen + INSERT INTO destino SELECT * FROM origen</p>
<p>Esto también puede servir para copiar tablas entre distintos esquemas. Por ejemplo en MySQL:</p>
<p>CREATE TABLE esquema2.tabla AS SELECT * FROM esquema1.tabla;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/juanpalomez.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/juanpalomez.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/juanpalomez.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/juanpalomez.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/juanpalomez.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/juanpalomez.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/juanpalomez.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/juanpalomez.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/juanpalomez.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/juanpalomez.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/juanpalomez.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/juanpalomez.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/juanpalomez.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/juanpalomez.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=juanpalomez.wordpress.com&amp;blog=3904881&amp;post=104&amp;subd=juanpalomez&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://juanpalomez.wordpress.com/2009/10/28/copiar-tablas-crear-tablas-con-una-select-copy-tables/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3745f2594a0fd922d844740fe58b685?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">thisisoneball</media:title>
		</media:content>
	</item>
	</channel>
</rss>
