<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2742915094358781041</id><updated>2024-11-01T04:10:10.202-07:00</updated><category term="android"/><category term="Oracle"/><category term="utilidades"/><category term="Java"/><category term="SQL"/><category term="tutorial"/><category term="jDeveloper"/><category term="ADF"/><category term="Chrome"/><category term="Eclipse"/><category term="Net Beans"/><category term="Swing"/><category term="divagaciones"/><category term="ADT"/><category term="Exception"/><category term="Internet"/><category term="J2SE"/><category term="Jasper Reports"/><category term="Pentaho"/><category term="iReport"/><category term="videojuegos"/><category term="Business Intelligence"/><category term="ESB"/><category term="Google"/><category term="Google Play"/><category term="Jaspersoft"/><category term="Java FX"/><category term="JavaHispano"/><category term="Windows"/><category term="Windows XP"/><category term="jar"/><category term="móvil"/><category term="navegador"/><category term="Banana Campus"/><category term="Business Components"/><category term="ETL"/><category term="ITIL"/><category term="Internet Explorer"/><category term="JVM"/><category term="Jasper Server"/><category term="Media Center"/><category term="OpenESB"/><category term="Opera"/><category term="SAF"/><category term="Swing Application Framework"/><category term="Synergy"/><category term="Unix"/><category term="Word"/><category term="bug"/><category term="correo"/><category term="error"/><category term="gmail"/><category term="hardware"/><category term="htpc"/><category term="lib"/><category term="log"/><category term="sonidos"/><category term="tip"/><category term="API"/><category term="Adobe"/><category term="Barquitos"/><category term="Battleship"/><category term="Bpel"/><category term="CAU"/><category term="DSL"/><category term="EJB"/><category term="Enterprise Service Bus"/><category term="Event"/><category term="Excel"/><category term="File"/><category term="Firefox"/><category term="Flash"/><category term="GMF"/><category term="GTD"/><category term="Glassfish"/><category term="Groovy"/><category term="Hundir la flota"/><category term="Identidad Corporativa"/><category term="Input Director"/><category term="Inteligencia Empresarial"/><category term="J2EE"/><category term="JBI"/><category term="JDK"/><category term="JLabel"/><category term="JNI"/><category term="JPanel"/><category term="JSF"/><category term="JSR-203"/><category term="JSR-296"/><category term="KM Software"/><category term="KPI"/><category term="LG"/><category term="Logger"/><category term="MDD"/><category term="MVC"/><category term="Memory Battle"/><category term="Mofscript"/><category term="Movilbank"/><category term="Nokia"/><category term="OAS"/><category term="OpenOffice"/><category term="Reader"/><category term="SQL Server"/><category term="SQLDeveloper"/><category term="Safari"/><category term="Siemens"/><category term="Spoon"/><category term="Thread"/><category term="UML"/><category term="WebLogic"/><category term="Youtube"/><category term="Yuzz"/><category term="configuración"/><category term="dataSource"/><category term="debug"/><category term="encoding"/><category term="escritorio"/><category term="flv"/><category term="frames"/><category term="gestión del tiempo"/><category term="impresora"/><category term="jdbc"/><category term="libgdx"/><category term="maven"/><category term="media"/><category term="pantalla"/><category term="pdf"/><category term="planificación"/><category term="portapapeles"/><category term="proxy"/><category term="review"/><category term="teclado"/><category term="xml"/><title type='text'>Tecno-Aspirinas</title><subtitle type='html'>Contra los dolores de cabeza tecnológicos</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>104</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-5988292283607721707</id><published>2014-10-30T11:03:00.005-07:00</published><updated>2014-10-30T11:03:37.444-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="UML"/><category scheme="http://www.blogger.com/atom/ns#" term="Word"/><title type='text'>Uso de comillas angulares en Word</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 14px; white-space: pre-wrap;&quot;&gt;En la notación &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 14px; white-space: pre-wrap;&quot;&gt;&lt;i&gt;UML&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 14px; white-space: pre-wrap;&quot;&gt;, los estereotipos se definen con su nombre entre comillas angulares (o francesas, o latinas, o guillemets): &lt;i&gt;«Estereotipo»&lt;/i&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 14px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 14px; white-space: pre-wrap;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;
Como estas comillas no aparecen en los teclados, es habitual utilizar dos signos de mayor o menor para sustituirlas (&amp;lt;&amp;lt; y &amp;gt;&amp;gt;), pero sí que podemos escribirlas mediante la combinación de teclas &lt;i&gt;alt + 174&lt;/i&gt; y &lt;i&gt;alt + 175&lt;/i&gt;, respectivamente.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Si tenemos un documento &lt;i&gt;Word &lt;/i&gt;en el que hemos utilizado &amp;lt;&amp;lt; y &amp;gt;&amp;gt;, y queremos reemplazarlos por los caracteres « y », podemos tener problemas con las opciones de autocorrección. Lo habitual si usamos la opción reemplazar, es que &lt;i&gt;Word &lt;/i&gt;utilice las comillas tipográficas o inglesas. Para evitar este comportamiento, podemos acceder a las opciones de &lt;i&gt;Word &lt;/i&gt;(&lt;i&gt;Archivo &lt;/i&gt;- &lt;i&gt;Opciones&lt;/i&gt;, en &lt;i&gt;Word 2010&lt;/i&gt;), al apartado &lt;i&gt;Revisión&lt;/i&gt;, y abrir el cuadro de configuración &lt;i&gt;Opciones de Autocorrección&lt;/i&gt;. En las pestañas &lt;i&gt;Autoformato &lt;/i&gt;y &lt;i&gt;Autoformato mientras escribe&lt;/i&gt;, se debe desmarcar la opción &lt;i&gt;Comillas rectas como comillas tipográficas&lt;/i&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
De esta forma, si usamos la opción de reemplazar con los caracteres « y », &lt;i&gt;Word &lt;/i&gt;los respetará.&lt;/div&gt;
&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/5988292283607721707/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2014/10/uso-de-comillas-angulares-en-word.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/5988292283607721707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/5988292283607721707'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2014/10/uso-de-comillas-angulares-en-word.html' title='Uso de comillas angulares en Word'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-358566945904115657</id><published>2014-03-13T09:11:00.000-07:00</published><updated>2014-03-13T09:11:43.214-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><title type='text'>ArtifactTransferException: Failure to transfer</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Al crear un proyecto con Maven en Eclipse, me encontré que el pom.xml marcaba montones de errores del tipo:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ArtifactTransferException: Failure to transfer...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
La solución al problema la encontré rápidamente en &lt;a href=&quot;http://stackoverflow.com/questions/5074063/maven-error-failure-to-transfer&quot;&gt;stackoverflow&lt;/a&gt;. Basta con eliminar todos los ficheros con extensión lastUpdated del repositorio maven, y actualizar el proyecto. Lo primero lo puedes hacer con los comandos:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;white-space: inherit;&quot;&gt;cd %userprofile%\.m2\repository&lt;/span&gt;&lt;/div&gt;
&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;white-space: inherit;&quot;&gt;for /r %i in (*.lastUpdated) do del %i&lt;/span&gt;&lt;/div&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Y luego basta con ir a Eclipse y, sobre el proyecto, seleccionar Maven - Update project, y aceptar el diálogo.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/358566945904115657/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2014/03/artifacttransferexception-failure-to.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/358566945904115657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/358566945904115657'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2014/03/artifacttransferexception-failure-to.html' title='ArtifactTransferException: Failure to transfer'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-1179711514016544170</id><published>2014-02-27T07:25:00.000-08:00</published><updated>2014-02-27T07:25:01.226-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="log"/><category scheme="http://www.blogger.com/atom/ns#" term="Logger"/><title type='text'>Escribiendo un log</title><content type='html'>Podemos añadir un fichero de log a nuestra aplicación Java muy fácilmente utilizando la clase &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Logger&lt;/span&gt;.

&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;1
2
3
4
5&lt;/pre&gt;
&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;FileHandler fh &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;new&lt;/span&gt; FileHandler&lt;span style=&quot;color: #333333;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;Log.log&quot;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;);&lt;/span&gt;
Logger logger &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Logger&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000cc;&quot;&gt;getLogger&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;TestLog&quot;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;);&lt;/span&gt;
logger&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000cc;&quot;&gt;addHandler&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;(&lt;/span&gt;fh&lt;span style=&quot;color: #333333;&quot;&gt;);&lt;/span&gt;
SimpleFormatter formatter &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;new&lt;/span&gt; SimpleFormatter&lt;span style=&quot;color: #333333;&quot;&gt;();&lt;/span&gt;
fh&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000cc;&quot;&gt;setFormatter&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;(&lt;/span&gt;formatter&lt;span style=&quot;color: #333333;&quot;&gt;);&lt;/span&gt; 
&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;br /&gt;
Con este código creamos el &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Logger&lt;/span&gt;, y podemos añadir mensajes con la sentencia:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;1&lt;/pre&gt;
&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;logger&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000cc;&quot;&gt;info&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;Mensaje de log&quot;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;);&lt;/span&gt;
&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;br /&gt;
Este tipo de mensajes incluye información sobre la fecha, clase y método en que se está escribiendo el log. En general esta información es muy útil, pero si quieres escribir un log con muchas entradas, y vas a tener que procesarlas, puede que prefieras que no aparezca. Si es así, puedes crear tu propio formateador extendiendo de la clase &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Formatter&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;br /&gt;
&lt;div style=&quot;background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12&lt;/pre&gt;
&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #bb0066; font-weight: bold;&quot;&gt;MySimpleFormatter&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;extends&lt;/span&gt; Formatter 
&lt;span style=&quot;color: #333333;&quot;&gt;{&lt;/span&gt;   
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;MySimpleFormatter&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;()&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;{&lt;/span&gt; 
        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;super&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;();&lt;/span&gt; 
    &lt;span style=&quot;color: #333333;&quot;&gt;}&lt;/span&gt;

    &lt;span style=&quot;color: #555555; font-weight: bold;&quot;&gt;@Override&lt;/span&gt; 
    &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;public&lt;/span&gt; String &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;format&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;final&lt;/span&gt; LogRecord record&lt;span style=&quot;color: #333333;&quot;&gt;)&lt;/span&gt; 
    &lt;span style=&quot;color: #333333;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; record&lt;span style=&quot;color: #333333;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000cc;&quot;&gt;getMessage&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;();&lt;/span&gt;
    &lt;span style=&quot;color: #333333;&quot;&gt;}&lt;/span&gt;   
&lt;span style=&quot;color: #333333;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;br /&gt;
Basta con cambiar el &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;SimpleFormatter &lt;/span&gt;estándar por el nuestro, y ya tendremos los mensajes a nuestro gusto.&lt;br /&gt;
&lt;br /&gt;
Por supuesto, podemos modificar el método &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;format&lt;/span&gt; para configurar la información del log como queramos.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/1179711514016544170/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2014/02/escribiendo-un-log.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/1179711514016544170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/1179711514016544170'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2014/02/escribiendo-un-log.html' title='Escribiendo un log'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-1312495056635120533</id><published>2013-07-10T12:07:00.000-07:00</published><updated>2013-07-10T12:09:07.844-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="J2SE"/><category scheme="http://www.blogger.com/atom/ns#" term="Swing"/><title type='text'>Referencia a la clase contenedora en una clase anónima</title><content type='html'>Al programar interfaces gráficas, es muy habitual el uso de clases anónimas para definir el listener de algún componente.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-image: none; font-size: 1em; line-height: 1.2em; padding: 0px; vertical-align: top;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;JButton button = &lt;span style=&quot;font-weight: bold;&quot;&gt;new&lt;/span&gt; JButton(&quot;OK&quot;);
button.addActionListener(&lt;span style=&quot;font-weight: bold;&quot;&gt;new&lt;/span&gt; ActionListener() {
&lt;span style=&quot;font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;font-weight: bold;&quot;&gt;void&lt;/span&gt; actionPerformed(ActionEvent e)
{
   System.out.println(&quot;Ok!&quot;);
}&lt;span style=&quot;font-size: 1em; line-height: 1.2em;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-size: 1em; line-height: 1.2em;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-size: 1em; line-height: 1.2em;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 1em; line-height: 1.2em;&quot;&gt;    &lt;span style=&quot;color: #333333;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-image: none; color: #333333; font-size: 1em; line-height: 1.2em; padding: 0px; vertical-align: top;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
Tampoco es raro que desde la clase anónima, queramos acceder a algún elemento de la clase contenedora. En ese caso, podemos vernos tentados de usar &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;this&lt;/span&gt;; pero, obviamente, si estamos dentro de la clase anónima, &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;this &lt;/span&gt;hará referencia a la instancia de esa clase, no a la de la contenedora.&lt;br /&gt;
&lt;br /&gt;
En este caso podemos usar como alternativa &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ClaseContenedor.this&lt;/span&gt;, quedando algo así.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public class ClaseContenedora extends JPanel{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;int value = 0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;public ClaseContenedora() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;JButton&lt;span style=&quot;line-height: 1.2em;&quot;&gt; button = &lt;/span&gt;&lt;span style=&quot;line-height: 1.2em;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;line-height: 1.2em;&quot;&gt; &lt;/span&gt;JButton&lt;span style=&quot;line-height: 1.2em;&quot;&gt;(&quot;OK&quot;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-image: none; line-height: 1.2em; padding: 0px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;      button.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e)
         {
            ClaseContenedora.this.value++;
         }&lt;span style=&quot;line-height: 1.2em;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;line-height: 1.2em;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;line-height: 1.2em;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;line-height: 1.2em;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-image: none; line-height: 1.2em; padding: 0px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;line-height: 1.2em;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-image: none; padding: 0px; vertical-align: top;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;line-height: 19.1875px;&quot;&gt;      ...&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/1312495056635120533/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/07/referencia-la-clase-contenedora-en-una.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/1312495056635120533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/1312495056635120533'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/07/referencia-la-clase-contenedora-en-una.html' title='Referencia a la clase contenedora en una clase anónima'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-967951980828759109</id><published>2013-07-07T23:03:00.000-07:00</published><updated>2013-07-07T23:03:22.914-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Un único Toast en Android</title><content type='html'>Los Toasts de Android son una opción muy socorrida cuando se quieren mostrar mensajes al usuario sin molestar demasiado. Por ejemplo, cada vez que el usuario modifica una opción de la aplicación.&lt;br /&gt;
&lt;br /&gt;
Los Toast se pueden crear mediante la llamada:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Toast.makeText(context, context.getString(id), Toast.LENGTH_SHORT)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
El último parámetro indica el tiempo durante el que el Toast será visible en pantalla, y generalmente se usan las contastes&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;LENGTH_SHORT &lt;/span&gt;y &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;LENGTH_LONG &lt;/span&gt;de la propia clase Toast para darle valor.&lt;br /&gt;
&lt;br /&gt;
Hasta aquí todo muy bien, pero un problema habitual se produce cuando se quieren mostrar varios Toast de forma consecutiva. En ese caso el sistema encola los Toast, y cada uno se va mostrando cuando desaparece el anterior. Esto implica que, seguramente, el usuario esté viendo en pantalla un mensaje correspondiente a una acción que no es la última que ha realizado.&lt;br /&gt;
&lt;br /&gt;
Ante esto, yo prefiero la opción de que cada nuevo Toast se presente inmediatamente en pantalla, haciendo desaparecer al anterior. Así, adaptamos la información mostrada al ritmo al que el usuario utiliza la aplicación.&lt;br /&gt;
&lt;br /&gt;
Viendo el API de la clase Toast, parece que la opción más lógica para conseguir esto es utilizar el método &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;cancel&lt;/span&gt;. Pero la verdad es que por lo que lo he podido probar, no siempre da el resultado esperado.&lt;br /&gt;
&lt;br /&gt;
Así que la solución que me he planteado es hacer una especie de Singleton sobre los Toast. La idea es que sólo exista un Toast en mi aplicación; así, cada vez que tengo que mostrar un mensaje, en lugar de crear una nueva instancia, que acabaría encolada si había otras anteriores, cojo mi única instancia, le cambio el texto, y la vuelvo a mostrar.&lt;br /&gt;
&lt;br /&gt;
El resultado es una clase tal que así.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public class Toasts {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private static Toast myToast = null;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public static void showToast(Context context, int id) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if (myToast != null) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;myToast.setText(context.getString(id));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} else {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;myToast = Toast.makeText(context, context.getString(id),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;Toast.LENGTH_SHORT);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;myToast.show();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Esta clase puedo usarla de forma sencilla desde cualquier actividad de mi aplicación, simplificando además la &amp;nbsp;llamada al necesitar sólo el contexto y el texto.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Toasts.showToast(this, R.string.text);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
Una posible mejora sería crear un segundo método que permitiese especificar también la duración del Toast, pero eso ya depende de las necesidades de cada uno.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/967951980828759109/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/07/un-unico-toast-en-android.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/967951980828759109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/967951980828759109'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/07/un-unico-toast-en-android.html' title='Un único Toast en Android'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-4924520030627803932</id><published>2013-07-02T03:48:00.000-07:00</published><updated>2013-07-02T03:48:09.665-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><title type='text'>Android Tip: setVisibility y Animations</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
En los últimos días he tenido que lidiar con uno de esos problemas simplotes que te cuesta horas solucionar.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Tengo un &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;RelativeLayout&lt;/span&gt;, invoco el método &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;setVisibility(View.INVISIBLE)&lt;/span&gt; sobre él, y no desaparece.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
En mi caso esto se debía a que había ejecutado previamente una animación sobre ese &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;RelativeLayout&lt;/span&gt; y, al parecer, la visibilidad de una vista queda bloqueada hasta que las animaciones son limpiadas.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Con añadir una llamada a &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;clearAnimation()&lt;/span&gt; sobre el &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;RelativeLayout &lt;/span&gt;se soluciona el problema.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/4924520030627803932/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/07/android-tip-setvisibility-y-animations.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/4924520030627803932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/4924520030627803932'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/07/android-tip-setvisibility-y-animations.html' title='Android Tip: setVisibility y Animations'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-2945837834749976249</id><published>2013-06-12T06:10:00.000-07:00</published><updated>2013-06-12T06:10:10.322-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Event"/><category scheme="http://www.blogger.com/atom/ns#" term="J2SE"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="JPanel"/><category scheme="http://www.blogger.com/atom/ns#" term="Swing"/><title type='text'>Key Adapter y JPanel</title><content type='html'>El método &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;addKeyListener &lt;/span&gt;de la clase &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Component &lt;/span&gt;de &lt;i&gt;Swing &lt;/i&gt;nos permite agregar oyentes de teclado a cualquier componente. Por tanto, si estamos creando un &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;JPanel&lt;/span&gt;, perfectamente podríamos intentar hacer algo así:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public class MyPanel extends JPanel {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public MyPanel() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MyKeyAdapter keyAdapter = new MyKeyAdapter();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;this.addKeyListener(keyAdapter);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Siendo &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;MyKeyAdapter &lt;/span&gt;algo de este estilo.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public MyKeyAdapter extends KeyAdapter {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void onKeyPressed(KeyEvent event) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Pero si probamos este código, nos encontramos que por más que aporreemos el teclado,&lt;b&gt; los eventos no se lanzan&lt;/b&gt;. El motivo es simple. Los eventos de teclado se lanzan siempre sobre el elemento de la interfaz que &lt;b&gt;tiene el foco&lt;/b&gt;, y los &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;JPanel&lt;/span&gt;, por defecto, no son &lt;i&gt;enfocables &lt;/i&gt;(focusables). Así que una solución rápida al problema sería hacer el &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;JPanel &lt;/span&gt;&lt;i&gt;focusable &lt;/i&gt;de la siguiente manera.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public MyPanel() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;this.setFocusable(true);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MyKeyAdapter keyAdapter = new MyKeyAdapter();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;this.addKeyListener(keyAdapter);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Ahora, al hacer click sobre el panel, ganará el foco. Si queremos dárselo desde algún rincón de nuestro código, también podemos hacerlo con la llamada &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;panel.requestFocus()&lt;/span&gt;.</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/2945837834749976249/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/06/key-adapter-y-jpanel.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/2945837834749976249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/2945837834749976249'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/06/key-adapter-y-jpanel.html' title='Key Adapter y JPanel'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-2005583521255190040</id><published>2013-06-01T03:39:00.001-07:00</published><updated>2013-06-01T03:39:32.755-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="Exception"/><category scheme="http://www.blogger.com/atom/ns#" term="tip"/><title type='text'>Android Tip: NullPointerException en android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:355)</title><content type='html'>Este error me ha traído de cabeza más de una vez, y tanto su causa como su solución son muy simples. Seguramente tengas en tu aplicación un &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ListView&amp;nbsp;&lt;/span&gt;con un &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ArrayAdapter&lt;/span&gt;, y le estés añadiendo un valor nulo.&lt;br /&gt;
&lt;br /&gt;
En mi caso suelo usar esta solución para mostrar valores sacados de la base de datos como, por ejemplo, una lista de jugadores. Si hay algún registro con el valor vacío, se recuperará como &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;null&lt;/span&gt;, y al agregarlo al &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ArrayAdapter &lt;/span&gt;provocará la excepción.&lt;br /&gt;
&lt;br /&gt;
Basta con controlar los valores nulos con algo tan simple como esto:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;if (player != null) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;playersArrayAdapter.add(player);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/2005583521255190040/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/06/android-tip-nullpointerexception-en.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/2005583521255190040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/2005583521255190040'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/06/android-tip-nullpointerexception-en.html' title='Android Tip: NullPointerException en android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:355)'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-7739526772529359433</id><published>2013-05-22T02:09:00.000-07:00</published><updated>2013-05-22T02:09:38.728-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="tip"/><title type='text'>Android Tip: Impedir que se puedan seleccionar las filas de un ListView</title><content type='html'>No es exactamente lo indicado en el título, pero el caso es que al mostrar una lista con un ListView, si el usuario pulsa sobre un elemento éste se selecciona y queda resaltado. Si lo único que queremos es evitar este efecto, basta con añadir estas propiedades en la etiqueta ListView.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;android:cacheColorHint=&quot;@android:color/transparent&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;android:listSelector=&quot;@android:color/transparent&quot;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/7739526772529359433/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/05/android-tip-impedir-que-se-puedan.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/7739526772529359433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/7739526772529359433'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/05/android-tip-impedir-que-se-puedan.html' title='Android Tip: Impedir que se puedan seleccionar las filas de un ListView'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-1073492173441980736</id><published>2013-05-09T00:56:00.000-07:00</published><updated>2013-05-09T00:56:16.196-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="Exception"/><category scheme="http://www.blogger.com/atom/ns#" term="Thread"/><title type='text'>CalledFromWrongThreadException</title><content type='html'>&lt;br /&gt;
Uno de los requisitos clásicos de Android es que cualquier modificación sobre una vista debe ser realizada desde el hilo que la creó (generalmente referido como el &lt;i&gt;UI Thread&lt;/i&gt;). Esto hace que no sea raro que cuando empecemos a trabajar con hilos acabemos encontrándonos con la excepción:&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Ante esta excepción lo primero que tenemos que preguntarnos es si realmente queremos modificar la vista desde donde lo estamos haciendo. Si la respuesta es afirmativa, podemos recurrir al método &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;runOnUiThread &lt;/span&gt;de la clase &lt;i&gt;Activity&lt;/i&gt;. Un posible ejemplo de uso sería el siguiente.&lt;br /&gt;
&lt;br /&gt;
Tenemos una actividad de una aplicación que permite conexiones por bluetooth. En pantalla se muestra un botón, y cuando lo pulsamos, ponemos en marcha un servidor, que se mantiene a la espera de conexiones. Este trabajo se realiza en un hilo independiente que es lanzado desde nuestra actividad. Lo que queremos conseguir es mostrar un texto informando de que el servidor está esperando conexiones, y ocultarlo cuando éste se detenga.&lt;br /&gt;
&lt;br /&gt;
Damos a nuestro hilo una referencia a la actividad, y en ésta añadimos un método para mostrar u ocultar el texto informativo. Al final del método &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;run()&lt;/span&gt; del hilo añadimos una llamada a ese nuevo método.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public class XXX extends Thread {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;....&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public void run() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;activity.setTextVisible(false);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public class XXX extends Activity {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public void setTextVisible(boolean visible) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;text.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Excepción asegurada.&lt;br /&gt;
&lt;br /&gt;
Pero si cambiamos la implementación del método setTextVisible a:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public void setTextVisible(boolean visible) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;runOnUiThread(new Runnable() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;public void run(){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;text.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;});&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Todo marchará como la seda.&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/1073492173441980736/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/05/calledfromwrongthreadexception.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/1073492173441980736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/1073492173441980736'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/05/calledfromwrongthreadexception.html' title='CalledFromWrongThreadException'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-6216920618303185270</id><published>2013-05-07T13:49:00.002-07:00</published><updated>2013-05-09T00:57:12.003-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="libgdx"/><category scheme="http://www.blogger.com/atom/ns#" term="videojuegos"/><title type='text'>Abrir una url usando LibGDX</title><content type='html'>&lt;br /&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;Cuando hacemos un juego en Android, es muy normal que queramos dar al usuario la posibilidad de abrir una página Web. Por ejemplo, para tratar de convencer a nuestros jugadores de que pierdan un minuto en valorar nuestro trabajo en Google Play.

Abrir una url desde Android no tiene ningún misterio; basta con ejecutar este código desde alguna actividad.

&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(myIntent);&lt;/span&gt;
  
Pero, ¿qué pasa si hemos desarrollado nuestro juego con LibGDX? Pues que la librería nos abstrae de la implementación concreta (Android en nuestro caso), por lo que cuando estemos programando una pantalla no tendremos acceso a las clases de Android, ni actividades, ni ninguna de esas historias. Y además, a día de hoy, que yo conozca, la librería no provee ningún método que se encargue de esto.

Una posible solución sería hacer que nuestro juego delegue la acción de abrir la url en el componente encargado de lanzarlo para cada implementación (una actividad para Android, una clase para escritorio...). Para conseguirlo, crearemos una interfaz en el proyecto principal de nuestro juego, que declarará el método para abrir una url.

&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public interface IOperations {
 public void openUrl(String url);
}&lt;/span&gt;

A continuación, añadiremos a nuestro juego una atributo de tipo IOperations, y modificaremos el constructor para que requiera este valor como parámetro.

&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public class MyGame extends Game {

 private IOperations myOperations;
 
 public SaveMeGame(IOperations myOperations){
  this.myOperations = myOperations;
 }
 
 //... Resto de la clase ...
}&lt;/span&gt;
 
Ahora podemos agregar a la clase MyGame un método que delegue en IOperations la apertura de la url.

&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public void openUrl(String url){
 myOperations.openUrl(url);
}&lt;/span&gt;
 
Una vez hecho esto, tendremos que modificar los lanzadores de las distintas tecnologías (Android, HTML5, J2SE...) para implementar la interfaz IOperations, y proveer por tanto una implementación concreta del método que abre una url. Para el caso de Android sería algo así.

&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public class MyActivity extends AndroidApplication implements
  IOperations {

 @Override
 public void onCreate(Bundle savedInstanceState) {
  // ... Preparación del juego ... 

  View gameView = initializeForView(new MyGame(this), config);

  setContentView(gameView);
 }

 @Override
 public void openUrl(String url) {
  Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
        startActivity(myIntent);
 }
}&lt;/span&gt;

Con esto tendríamos la estructura completa, y podemos usar este método desde cualquier pantalla de nuestro juego.

&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;public class MyScreen implements Screen {

 private final String gameURI = &quot;http://play.google.com/store/apps/details?id=package.game&quot;;
 private Game game;

 //... En algún lugar de la pantalla ...
 
 ((MyGame) game).openUrl(gameURI);
 
 //...
}&lt;/span&gt;
 
Y eso sería todo. Una vez completado el círculo, un pequeño repaso para asentar la idea.

En nuestra situación de partida estamos escribiendo código en una pantalla de nuestro juego (implementación de Screen), y queremos abrir una url, pero la librería no nos ofrece un método para hacerlo, y la forma de conseguirlo depende de la tecnología en que despleguemos finalmente el juego.&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;Por tanto, definimos una interfaz IOperations con un método para abrir una url. En esta interfaz podríamos añadir cualquier otro método que necesitemos, y que sea dependiente de la tecnología.&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;Añadimos a nuestra clase Game un nuevo atributo de tipo IOperations, y modificamos el constructor para que requiera un objeto que implemente la interfaz.&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;Por último, implementamos la interfaz IOperations en los proyectos correspondientes a cada una de las tecnologías en que vayamos a desplegar nuestro juego. En el ejemplo hemos visto una forma de hacerlo para Android, con la actividad de inicio implementando directamente IOperations. También se podría haber creado una nueva clase que contuviese exclusivamente la implementación de IOperations (y de hecho sería recomendable, sobre todo si empieza a crecer el número de operaciones disponibles).&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;Y ya podemos invocar el método openUrl sobre una instancia de nuestro juego.&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/6216920618303185270/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/05/abrir-una-url-usando-libgdx.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/6216920618303185270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/6216920618303185270'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/05/abrir-una-url-usando-libgdx.html' title='Abrir una url usando LibGDX'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-7490042150833203141</id><published>2013-04-05T08:47:00.001-07:00</published><updated>2013-04-16T04:33:08.649-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Play"/><category scheme="http://www.blogger.com/atom/ns#" term="móvil"/><category scheme="http://www.blogger.com/atom/ns#" term="videojuegos"/><title type='text'>Save Me!</title><content type='html'>Ya está disponible en Google Play mi nuevo juego:&lt;b&gt; Save Me!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
La idea del juego es muy simple; Me es un personaje que avanza sin pausa por la pantalla, y tu objetivo es conseguir que llegue al final de cada nivel. Para ello tendrás que preparar el terreno, moviendo bloques y activando distintos dispositivos.&lt;br /&gt;
&lt;br /&gt;
Parece fácil, ¿no?&lt;br /&gt;
&lt;br /&gt;
Esta primera versión cuenta con 6 niveles cuya dificultad va creciendo desde el primero, que simplemente servirá para que el jugador se familiarice con los controles, hasta el último, que pondrá de verdad a prueba sus habilidades.&lt;br /&gt;
&lt;br /&gt;
Mi intención es ir haciendo nuevas versiones que incluyan nuevos niveles y nuevos elementos en el mundo de Me.&lt;br /&gt;
&lt;br /&gt;
Como siempre, cualquier comentario que pueda ayudar a hacer de Save Me! un juego mejor será bienvenido.&lt;br /&gt;
&lt;br /&gt;
¡Todo el mundo a salvar a Me!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://play.google.com/store/apps/details?id=jvel.android.games.saveme&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhibfLOuKqeTzhU3w_gloXId23ZdARg58Qi1szPDMrAII4ejSfyUT5TUgNZVERHB2rwBR0UFoTO_76k3ydBxjZITz5M-LfsTnKXJQJDXMid8edvfkSLGW1l0NV1KsyC_Pi3IwV5vi-Cc_w/s320/icon_512_play.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/7490042150833203141/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/04/save-me.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/7490042150833203141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/7490042150833203141'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/04/save-me.html' title='Save Me!'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhibfLOuKqeTzhU3w_gloXId23ZdARg58Qi1szPDMrAII4ejSfyUT5TUgNZVERHB2rwBR0UFoTO_76k3ydBxjZITz5M-LfsTnKXJQJDXMid8edvfkSLGW1l0NV1KsyC_Pi3IwV5vi-Cc_w/s72-c/icon_512_play.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-5575537817886442890</id><published>2013-01-25T07:44:00.002-08:00</published><updated>2013-01-25T08:37:03.361-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="Barquitos"/><category scheme="http://www.blogger.com/atom/ns#" term="Battleship"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Play"/><category scheme="http://www.blogger.com/atom/ns#" term="Hundir la flota"/><category scheme="http://www.blogger.com/atom/ns#" term="móvil"/><category scheme="http://www.blogger.com/atom/ns#" term="videojuegos"/><title type='text'>Los barquitos o battleship</title><content type='html'>Pues nada, para seguir con la racha, hoy he publicado en Google Play el segundo de mi colección de juegos casuales por bluetooth para la plataforma Android: Los Barquitos. Un clásico al que seguro que todos habréis jugado más de una vez cuando estabais en el cole.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://play.google.com/store/apps/details?id=jvel.android.game.barquitos&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXl57HjJuGgmvEGENeLpbfD-Z1_MNm7pjQ_nj29HofACDdHPz1dGlDQ-CA7_5NE8mkGIDoPpRmyapG0zm8jJm30nHWJ2FvpXlQbXL7lcuoTGGOfaUcu_TH2gMgk8HeEVYPuGTCb9KEVKra/s200/icon.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Me gustaría seguir ampliando la colección, y además hay muchos posibles candidatos esperando su momento: el cuatro en raya, el ajedrez, tic-tac-toe... Pero todavía no me he arrancado con ninguno, y tengo otras cosas entre manos, así que por el momento, esto es lo que hay.&lt;br /&gt;
&lt;br /&gt;
El juego tiene tanto modo individual, en el que competirás contra una IA muy básica, como juego por bluetooth.&lt;br /&gt;
&lt;br /&gt;
¡Todo el mundo a probarlo!</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/5575537817886442890/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/01/los-barquitos-o-battleship.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/5575537817886442890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/5575537817886442890'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/01/los-barquitos-o-battleship.html' title='Los barquitos o battleship'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXl57HjJuGgmvEGENeLpbfD-Z1_MNm7pjQ_nj29HofACDdHPz1dGlDQ-CA7_5NE8mkGIDoPpRmyapG0zm8jJm30nHWJ2FvpXlQbXL7lcuoTGGOfaUcu_TH2gMgk8HeEVYPuGTCb9KEVKra/s72-c/icon.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-8426838104062269880</id><published>2013-01-21T08:32:00.004-08:00</published><updated>2013-01-21T08:32:54.457-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Play"/><category scheme="http://www.blogger.com/atom/ns#" term="Memory Battle"/><category scheme="http://www.blogger.com/atom/ns#" term="videojuegos"/><title type='text'>Memory Battle</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Bueno, pues hoy he cumplido un objetivo que llevaba mucho tiempo persiguiendo: publicar mi primera aplicación en &lt;i&gt;Google Play&lt;/i&gt;. He estado mucho tiempo probando, y he empezado varios proyectos en paralelo, pero por fin he dado por buena la versión 1.0 de &lt;b&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=jvel.android.game.memory&amp;amp;feature=search_result#?t=W251bGwsMSwyLDEsImp2ZWwuYW5kcm9pZC5nYW1lLm1lbW9yeSJd&quot;&gt;Memory Battle&lt;/a&gt;&lt;/b&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://play.google.com/store/apps/details?id=jvel.android.game.memory&amp;amp;feature=search_result#?t=W251bGwsMSwyLDEsImp2ZWwuYW5kcm9pZC5nYW1lLm1lbW9yeSJd&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_20Z7c2VaKYeHIWt4GaS0wKvq1FLTOvqnmigwy1KfItLvXveLi-UwYhhXLPv22FeEx6A0_oIp1-hv7EVE14KbEgt96jKRQvLl4zvsai5SIbuXV-tZaxsbPw3b93Nj0lSRgd0jkv0NEcUP/s200/icono_alta.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
La aplicación no es más que una versión del clásico juego en el que tienes que encontrar las parejas de un grupo de cartas, volteándolas de dos en dos. El juego individual tiene varias opciones de configuración que el usuario puede ir desbloqueando, y hacen que vaya siendo cada vez más complicado (dentro de lo que puede dar de sí un Memory). Además, incluye la posibilidad de jugar con otros dispositivos mediante bluetooth, lo que está muy bien para echar un buen rato picándote con los amigos.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Mi idea es iniciar una línea de juegos casuales con multijugador por bluetooth, y ya tengo alguna otra cosa en camino.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Por cierto, este juego en concreto lo he desarrollado basándome en el framework descrito en la primera parte del libro &lt;i&gt;Begining Android 4 Games Development&lt;/i&gt;, de &lt;i&gt;Mario Zechner&lt;/i&gt; y &lt;i&gt;Robert Green&lt;/i&gt;, cuya lectura recomiendo, y a los que agradezco desde aquí que hayan dedicado su tiempo a escribir un libro tan interesante.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
A los que lo probéis, ¡espero que lo disfrutéis!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/8426838104062269880/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/01/memory-battle.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/8426838104062269880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/8426838104062269880'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2013/01/memory-battle.html' title='Memory Battle'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_20Z7c2VaKYeHIWt4GaS0wKvq1FLTOvqnmigwy1KfItLvXveLi-UwYhhXLPv22FeEx6A0_oIp1-hv7EVE14KbEgt96jKRQvLl4zvsai5SIbuXV-tZaxsbPw3b93Nj0lSRgd0jkv0NEcUP/s72-c/icono_alta.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-779057247361878902</id><published>2012-08-28T04:44:00.002-07:00</published><updated>2012-08-28T04:46:16.263-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADT"/><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse"/><title type='text'>Error generating final archive: Debug certificate expired</title><content type='html'>Si tenemos un poco abandonado el tema de programar con Android, y después de un tiempo queremos retomarlo, es muy probable que al intentar ejecutar un proyecto antiguo nos encontremos con que Eclipse nos larga este error:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #cc0000; font-family: Courier New, Courier, monospace;&quot;&gt;Error generating final archive: Debug certificate expired ...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Tal como indica el mensaje, el problema es que el certificado de depuración de Android ha expirado.&amp;nbsp;En esta &lt;a href=&quot;http://code.google.com/p/android/issues/detail?id=15370&quot;&gt;url&lt;/a&gt; podemos ver que los de Google ya lo tienen registrado como bug, y que la solución temporal que se propone es la eliminación del fichero&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;/.android/debug.keystore&lt;/span&gt;, para obligar a Android a regenerarlo.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; white-space: pre-wrap;&quot;&gt;Eso sí, dentro de un año, a repetir el proceso...&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/779057247361878902/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2012/08/error-generating-final-archive-debug.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/779057247361878902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/779057247361878902'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2012/08/error-generating-final-archive-debug.html' title='Error generating final archive: Debug certificate expired'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-7410820276662995313</id><published>2012-04-18T08:31:00.003-07:00</published><updated>2012-04-18T08:31:57.512-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows XP"/><title type='text'>Windows no busca en ficheros con extensión sql</title><content type='html'>Hace unas semanas me tocó revisar unos &lt;b&gt;300 ficheros&lt;/b&gt; sql para tratar de sacar información sobre una base de datos que íbamos a migrar. Sin documentación, con tablas y campos en desuso, sin integridad referencial... un trabajo duro.&amp;nbsp;Así que la mejor opción que teníamos para sacar el esquema de datos era analizar consultas que sabíamos que se ejecutaban sobre ella, y funcionaban correctamente.&lt;br /&gt;
&lt;br /&gt;
Estaba centrándome en una tabla concreta, y quería obtener sus relaciones, por lo que pretendía filtrar los ficheros para quedarme con los que hiciesen referencia a ella. Abrí mi explorador de archivos de &lt;b&gt;XP&lt;/b&gt;, me fui a la carpeta en la que estaban todos los ficheros, y busqué metiendo el nombre de la tabla en el campo &lt;i&gt;&#39;Una palabra o frase en el archivo&#39;&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Cero resultados.&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Tras un par de comprobaciones (ni había escrito mal el nombre de la tabla, ni estaba distinguiendo mayúsculas...), empecé a olerme que algo iba mal. Abrí algunos ficheros, y pude ver que en varios aparecía el nombre. Entonces,&lt;b&gt; ¿por qué la búsqueda no arrojaba resultados?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Pues porque los ficheros tenían extensión &lt;i&gt;.sql&lt;/i&gt;. Si cambiaba alguno a &lt;i&gt;.txt&lt;/i&gt;, automáticamente aparecía en los resultados.&lt;br /&gt;
&lt;br /&gt;
Todavía no he podido averiguar a qué se debe esto. Si es algún problema de configuración, o simplemente a &lt;i&gt;Windows&lt;/i&gt; no le caen bien estos ficheros. El caso es que he comprobado todas las opciones de la búsqueda, y no veo nada raro. En la opción de &lt;i&gt;Tipos de Archivo &lt;/i&gt;tengo marcado &lt;i&gt;Todos los archivos y carpetas&lt;/i&gt;, y no se me ocurre mucho más.&lt;br /&gt;
&lt;br /&gt;
Por tanto, la única solución que he podido aplicar es la de utilizar un programa para &lt;b&gt;cambiar la extensión&lt;/b&gt; de todos los ficheros de la carpeta. A partir de ahí, pude seguir con mi infernal base de datos.</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/7410820276662995313/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2012/04/windows-no-busca-en-ficheros-con.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/7410820276662995313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/7410820276662995313'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2012/04/windows-no-busca-en-ficheros-con.html' title='Windows no busca en ficheros con extensión sql'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-1381730037971581138</id><published>2012-03-13T13:48:00.000-07:00</published><updated>2012-03-13T13:48:07.276-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ETL"/><category scheme="http://www.blogger.com/atom/ns#" term="Pentaho"/><category scheme="http://www.blogger.com/atom/ns#" term="Spoon"/><title type='text'>Diferencia entre dos flujos en Spoon</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Hacía mucho tiempo que no tocaba &lt;b&gt;Spoon&lt;/b&gt;, una herramienta que siempre me dejó con ganas de poder comprobar de qué es capaz realmente. Así que ha sido muy gratificante encontrarme con la posibilidad de utilizarla en mi trabajo, y de tener encima al lado a una persona con experiencia previa, como es el gran &lt;i&gt;Isvapi&lt;/i&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Así que ya llevo unos días con un caso real. El clásico para este tipo de herramientas: tenemos que migrar los datos de un sistema a punto de morir, a otro &lt;i&gt;nuevo y maravilloso&lt;/i&gt;. Si todo va bien y logro sacar un poco de tiempo, es posible que en las próximas semanas me anime a hacer una segunda parte de mi &lt;a href=&quot;http://tecno-aspirinas.blogspot.com/2010/12/tutorial-de-pentaho-definicion-de-un.html&quot;&gt;tutorial&lt;/a&gt; de iniciación. Pero hoy, como adelanto, la solución a un caso concreto que nos hemos encontrado.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
El tema es que la migración la hacemos en dos fases. En la primera migramos &lt;i&gt;todo el contenido&lt;/i&gt; de una tabla, y en la segunda &lt;i&gt;el incremental&lt;/i&gt;. Por tanto, necesitábamos poder obtener la &lt;b&gt;diferencia &lt;/b&gt;entre dos flujos de datos con la misma estructura (que sería el incremental a migrar).&amp;nbsp;La realidad es que hacer algo así con Spoon es bastante fácil, gracias al paso &lt;i&gt;Fundir filas&lt;/i&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Para explicar el proceso, vamos a suponer que trabajamos con una entidad &lt;i&gt;Persona&lt;/i&gt;, que consta de un &lt;i&gt;identificador&lt;/i&gt;, el &lt;i&gt;nombre &lt;/i&gt;y los &lt;i&gt;apellidos&lt;/i&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Lo primero que haríamos sería leer los dos repositorios de entrada, ya sean tablas de una base de datos, ficheros de texto, Excels... A continuación tendríamos que utilizar el paso indicado. Aquí su ayuda contextual:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Fundir dos flujos de filas, ordenadas por un campo clave. Se comparan los dos flujos y se señalan las filas que son iguales, han cambiado, se han eliminado y las nuevas.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Para que nos entendamos, lo que vamos a hacer es coger dos colecciones de datos con la misma estructura; en nuestro caso, dos colecciones de personas. El resultado contendrá la unión de las dos colecciones, indicando para cada elemento si:&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
- Aparece igual en ambas colecciones (&lt;i&gt;identical&lt;/i&gt;).&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
- Aparece en ambas colecciones, pero algún dato ha cambiado (&lt;i&gt;updated&lt;/i&gt;).&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
- Sólo aparece en la primera colección (&lt;i&gt;deleted&lt;/i&gt;).&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
- Sólo aparece en la segunda colección (&lt;i&gt;new&lt;/i&gt;).&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Si vemos la configuración del paso, lo primero que tenemos que indicar son las colecciones que vamos a comparar; una de ellas será la de referencia. A continuación tenemos que dar un nombre al campo que se añadirá para indicar el resultado de la comparación (&lt;i&gt;identical&lt;/i&gt;, &lt;i&gt;updated&lt;/i&gt;, &lt;i&gt;deleted&lt;/i&gt; o &lt;i&gt;new&lt;/i&gt;).&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Por último tenemos que especificar los campos que se utilizarán para hacer las comparaciones. Por un lado, hay que definir qué campos identifican a los elementos para poder indicar si estos están presentes en una de las colecciones, o en las dos. En nuestro caso, el campo &lt;i&gt;id&lt;/i&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Por otro lado, tenemos que marcar los campos que se utilizarán para comparar los elementos presentes en ambas colecciones, y determinar si son idénticos, o han sido modificados. En nuestro caso añadiremos tanto el nombre como los apellidos.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgiQibCPo_wml_hgszXFTvu7N7I6khqchgrEbWgyO0Wg90YSekL4wtT87WKfPTCCQFLsxSsZFEK7GFxNp6MCruxMrhi9xWuNYz2YvryuokJQ1p4oMJsMYZFVbr3_SYnRKuyKSynQ0Bkonp/s1600/fundir+filas.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;265&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgiQibCPo_wml_hgszXFTvu7N7I6khqchgrEbWgyO0Wg90YSekL4wtT87WKfPTCCQFLsxSsZFEK7GFxNp6MCruxMrhi9xWuNYz2YvryuokJQ1p4oMJsMYZFVbr3_SYnRKuyKSynQ0Bkonp/s320/fundir+filas.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Es importante incidir en la necesidad de que ambas colecciones estén ordenadas por los campos indicados como clave para que el paso funcione correctamente.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
Una vez unidos los flujos y clasificados los registros, podemos utilizar el paso &lt;i&gt;Switch &lt;/i&gt;para hacer lo que necesitemos con cada uno de ellos. En nuestro caso nos interesaba mandar a un fichero de texto aquellos registros que fuesen nuevos o hubiesen sido modificados, y a otro los que hubiesen sido eliminados.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh49_-abf1neZkOcFdDNRfqbxByaKid_JfdmxGtoXlA0XGL-XHWEWmWEQFBoTJ-6H_r-3aCEb60cOpX0lIqJu8vxglTWuJ6xvEtzmlbsy9XbXLOSTK5Sgpk8f2kJtNWzRcjGuFLY6fH1l5v/s1600/switch.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;181&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh49_-abf1neZkOcFdDNRfqbxByaKid_JfdmxGtoXlA0XGL-XHWEWmWEQFBoTJ-6H_r-3aCEb60cOpX0lIqJu8vxglTWuJ6xvEtzmlbsy9XbXLOSTK5Sgpk8f2kJtNWzRcjGuFLY6fH1l5v/s320/switch.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
El aspecto del proceso completo sería algo así.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHlpYafEOB-EkenBTwfVsW79jJjy0bk1Vl-dFsodZI4GHVY2qBXq8eJGBRDkg9tB0gLJLO1mynRWDXYDm1NjH6_JpAtUWVYdI7gA9kgMTIYVmGsScXhuGcv6fwkdIO16rGtjW-SNhZrA_v/s1600/spoon.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;87&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHlpYafEOB-EkenBTwfVsW79jJjy0bk1Vl-dFsodZI4GHVY2qBXq8eJGBRDkg9tB0gLJLO1mynRWDXYDm1NjH6_JpAtUWVYdI7gA9kgMTIYVmGsScXhuGcv6fwkdIO16rGtjW-SNhZrA_v/s320/spoon.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/1381730037971581138/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2012/03/diferencia-entre-dos-flujos-en-spoon.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/1381730037971581138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/1381730037971581138'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2012/03/diferencia-entre-dos-flujos-en-spoon.html' title='Diferencia entre dos flujos en Spoon'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgiQibCPo_wml_hgszXFTvu7N7I6khqchgrEbWgyO0Wg90YSekL4wtT87WKfPTCCQFLsxSsZFEK7GFxNp6MCruxMrhi9xWuNYz2YvryuokJQ1p4oMJsMYZFVbr3_SYnRKuyKSynQ0Bkonp/s72-c/fundir+filas.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-4385833714222773723</id><published>2012-02-16T00:56:00.000-08:00</published><updated>2012-02-29T02:45:12.665-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="frames"/><title type='text'>Animaciones con frames en Android</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Este post lo tenía pendiente desde hace tiempo, con idea de profundizar en el tema y hacerlo más completo. Pero dado que las circunstancias me han hecho dejar bastante de lado el desarrollo con Android por el momento, aquí va lo que he podido hacer hasta ahora.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Lo que quería conseguir cuando me metí en este jaleo era dar un toque más atractivo al jueguecillo con el que estaba cacharreando metiendo una animación de fondo. Para ello lo primero, y lo que a mí me parece más complicado por mi escasas aptitudes artísticas, es disponer de una serie de imágenes que compongan la animación (los&amp;nbsp;&lt;i&gt;frames&lt;/i&gt;). Para no complicarme, lo que acabé haciendo fue buscarme una secuencia que me gustaba, y sacar de ella los frames para probar.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
El tema es bastante sencillo. Lo que tenemos que hacer es crear un fichero en la carpeta drawable, y ponerle el nombre que le queramos dar a la animación. Por ejemplo: &lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;background_animation.xml&lt;/span&gt;. En el diálogo de creación de ficheros XML de Eclipse veremos que uno de los tipos disponibles es &lt;i&gt;Animation&lt;/i&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
El formato del fichero tampoco tiene mayor complicación. Lo único que hace es definir los frames que forman la animación, cada uno en una etiqueta &lt;i&gt;item&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJjNHyL-DarR5WsswC72dVWkrYCYasqJgJVJ4ZFtQG-YdO4RP9ZX6nmCxXYKbMvBby7y9gzg2MrKlVBemfeWR3b7y_aadx0PDvgxFCI6QJq2NFhaebcS74nfQE9uOaMUqAgSWL3lcNvlYP/s1600/animation.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;75&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJjNHyL-DarR5WsswC72dVWkrYCYasqJgJVJ4ZFtQG-YdO4RP9ZX6nmCxXYKbMvBby7y9gzg2MrKlVBemfeWR3b7y_aadx0PDvgxFCI6QJq2NFhaebcS74nfQE9uOaMUqAgSWL3lcNvlYP/s320/animation.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Podemos definir una duración distinta para cada uno de los elementos de la animación, expresada en milisegundos. El parámetro&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;oneshot&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;del elemento&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;animation-list&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;indica si la animación debe ejecutarse en bucle (valor falso), o no.&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Para poner en marcha la animación no tenemos más que ponerla como fondo de una vista. Por ejemplo, desde una&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;ActivityView&lt;/i&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;this.setBackgroundResource(R.drawable.background_animation);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/4385833714222773723/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2012/02/animaciones-con-frames-en-android.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/4385833714222773723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/4385833714222773723'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2012/02/animaciones-con-frames-en-android.html' title='Animaciones con frames en Android'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJjNHyL-DarR5WsswC72dVWkrYCYasqJgJVJ4ZFtQG-YdO4RP9ZX6nmCxXYKbMvBby7y9gzg2MrKlVBemfeWR3b7y_aadx0PDvgxFCI6QJq2NFhaebcS74nfQE9uOaMUqAgSWL3lcNvlYP/s72-c/animation.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-7606201621871711947</id><published>2012-01-05T02:03:00.000-08:00</published><updated>2012-01-05T02:03:20.467-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Banana Campus"/><category scheme="http://www.blogger.com/atom/ns#" term="Yuzz"/><title type='text'>¡Soy Yuzz!</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
La semana que viene empiezo una nueva experiencia que afronto con muchísima &lt;b&gt;ilusión y ganas de aprender&lt;/b&gt;: mi participación en el programa &lt;a href=&quot;http://www.yuzz.org/&quot;&gt;Yuzz&lt;/a&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Mi intención era ir contando en el blog cómo avanzaba el programa, pero voy a hacerlo de una forma diferente. Hace poco ya os hablé de &lt;a href=&quot;http://tecno-aspirinas.blogspot.com/2011/12/banana-campus.html&quot;&gt;Banana Campus&lt;/a&gt;, una red social pensada precisamente para que podamos &lt;b&gt;compartir nuestras experiencias&lt;/b&gt;. Así que lo que he hecho es crear una experiencia en &lt;a href=&quot;http://www.bananacampus.com/#!experience/1966151&quot;&gt;Banana&lt;/a&gt;, que os animo a que sigáis.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Por cierto, &lt;b&gt;¡Feliz año!&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/7606201621871711947/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2012/01/soy-yuzz.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/7606201621871711947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/7606201621871711947'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2012/01/soy-yuzz.html' title='¡Soy Yuzz!'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-3363680154782969468</id><published>2012-01-02T11:00:00.001-08:00</published><updated>2012-01-03T09:09:20.216-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LG"/><category scheme="http://www.blogger.com/atom/ns#" term="Movilbank"/><category scheme="http://www.blogger.com/atom/ns#" term="móvil"/><category scheme="http://www.blogger.com/atom/ns#" term="Nokia"/><category scheme="http://www.blogger.com/atom/ns#" term="Siemens"/><title type='text'>Movilbank</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Hoy en día, gracias a la guerra de las operadoras de telefonía móvil, y al incesante avance tecnológico del sector, seguro que la mayoría de nosotros tiene en su poder un &lt;i&gt;buen puñado&lt;/i&gt; de terminales.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
En mi caso concreto, estoy seguro de que hay un mínimo de 10 móviles vagabundeando por mi casa. Desde mi querido y añorado &lt;a href=&quot;http://www.gsmarena.com/siemens_s25-90.php&quot;&gt;Siemens S25&lt;/a&gt;, hasta mi último cacharro, el &lt;a href=&quot;http://www.gsmarena.com/nokia_n73-1550.php&quot;&gt;Nokia N73&lt;/a&gt;. Porque generalmente, cada 18 meses más o menos, renovamos nuestro terminal, y el antiguo lo dejamos a mano en un cajón los primeros días, como si no quisiéramos darlo por muerto todavía. Pero la realidad es que poco a poco se va hundiendo en las profundidades con tantos otros&lt;b&gt; trastos inservibles&lt;/b&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Así que cuando hace unos meses me pillé mi nuevo &lt;a href=&quot;http://www.gsmarena.com/lg_optimus_black_p970-3704.php&quot;&gt;LG Optimus Black&lt;/a&gt;, decidí desde el primero momento que tenía que hacer algo práctico con mi &lt;i&gt;N73&lt;/i&gt;. Seamos realistas, ni lo voy a usar cuando me vaya de juerga, ni es probable que se me estropee el nuevo y lo necesite como suplente, ni nada parecido. La mejor opción, sin duda, es &lt;b&gt;venderlo&lt;/b&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Había visto muchas veces anuncios de empresas que se dedicaban a comprar teléfonos móviles, como &lt;i&gt;Zonzoo&lt;/i&gt;. Si quieres conocer algunas no tienes más que poner &lt;i&gt;&quot;vende tu móvil&quot;&lt;/i&gt; o algo similar en &lt;i&gt;Google&lt;/i&gt;. A porrillo. Así que hice una pequeña comparación para ver por dónde andaba la &lt;b&gt;cotización &lt;/b&gt;de mi pieza, y vi que podía sacarme unos 25 eurillos (30 si no hubiese dejado pasar varias semanas en el camino...). Teniendo en cuenta que pagué por él unos 70 hace ¿tres años?, no está nada mal.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
La Web que me daba más dinero era &lt;i&gt;Movilbank&lt;/i&gt;. El proceso de registro y venta fue &lt;b&gt;simple y rápido&lt;/b&gt;; y pocos días después, dentro del intervalo horario que había solicitado, se presentó un mensajero en mi casa para &lt;b&gt;recoger el móvil&lt;/b&gt;. Una semana más, y el dinero estaba en mi cuenta.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Así que la conclusión es que la experiencia ha sido &lt;b&gt;muy positiva&lt;/b&gt;, y que recomiendo el servicio a todo el que se lo esté pensando. Sin mover un dedo te desharás de tus viejos móviles, y encima ganarás para unos tintitos con los amigos.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;i&gt;Por cierto, si os olvidáis de incluir el recibo de compra en el sobre no os traumaticéis. A mí me pasó con las prisas (había olvidado que venían a recoger el paquete...), y no supuso ningún problema.&lt;/i&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/3363680154782969468/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2012/01/movilbank.html#comment-form' title='1 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/3363680154782969468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/3363680154782969468'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2012/01/movilbank.html' title='Movilbank'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-5940812885160909997</id><published>2011-12-25T02:42:00.000-08:00</published><updated>2011-12-29T07:14:41.075-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Banana Campus"/><title type='text'>Banana Campus</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Seguro que todos los usuarios de Internet somos también usuarios de al menos una de las muchas redes sociales que existen. ¿Quién no ha probado &lt;b&gt;Facebook&lt;/b&gt;, &lt;b&gt;Twitter &lt;/b&gt;o &lt;b&gt;Tuenti&lt;/b&gt;? Este tipo de Webs han revolucionado la forma de utilizar la red, poniendo en contacto casi permanente a los usuarios.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Pero la realidad es que la mayoría de las redes sociales de uso masivo se limitan a proveer herramientas para &quot;amigos&quot;: compartir fotos, jugar online, enviar mensajes... y el uso que se les da es exclusivamente &quot;social&quot;. ¿Por qué no aprovechar las grandes posibilidades que proporcionan para algo más &quot;útil&quot;?&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Un claro ejemplo es lo que propone otra red social que sí tiene ya un importante calado entre los usuarios de Internet: &lt;b&gt;LinkedIn&lt;/b&gt;. No se trata de una simple red para compartir con tus amigos, sino que pretende ser un punto de encuentro de profesionales, desde el que pueden nacer oportunidades de trabajo y negocio.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Pues hoy quiero hablar de una red social que nació hace poco tiempo en España, y que tiene la intención de ser realmente útil: &lt;b&gt;&lt;u&gt;Banana Campus&lt;/u&gt;&lt;/b&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;http://www.bananacampus.com/&quot;&gt;Banana Campus&lt;/a&gt; pretende &lt;b&gt;poner en contacto&lt;/b&gt; a las personas relacionadas con el mundo universitario, con el fin de que puedan compartir sus &lt;b&gt;conocimientos y experiencias&lt;/b&gt;. Su funcionamiento es muy simple. Cualquier persona puede publicar información sobre su vida universitaria: qué le pareció una carrera, cómo le fue en un Erasmus... y esa información queda disponible para que otras personas que estén interesadas en vivir esa experiencia puedan conocerla con mayor detalle.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Además, en su última actualización, han incluido nuevas opciones que le dan un valor añadido importante, como son la posibilidad de compartir &lt;b&gt;apuntes o ejercicios&lt;/b&gt;, y de publicar &lt;b&gt;anuncios &lt;/b&gt;para buscar piso, cambiar de grupo, o cualquier cosa que se os ocurra.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
¡Así que todo el mundo a unirse a Banana Campus! Seguro que le encontraréis mucha utilidad, y además estaréis apoyando un proyecto nacido en nuestro país, y animando a que sigan apareciendo ideas emprendedoras como esta.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/5940812885160909997/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2011/12/banana-campus.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/5940812885160909997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/5940812885160909997'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2011/12/banana-campus.html' title='Banana Campus'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-5029020798800761396</id><published>2011-12-19T10:07:00.000-08:00</published><updated>2012-01-03T06:41:36.857-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>Dividir archivos en Unix</title><content type='html'>Resulta que hace unos días necesitaba consultar el log del servidor de producción, y me encontré que pesaba nada menos que &lt;b&gt;¡400 megas!&lt;/b&gt;. Intentar abrir algo así con mi portátil era misión imposible, porque el pobre ya no está para esos trotes, así que necesitaba una &lt;i&gt;solución alternativa&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
Una buena opción para estos casos son los programas que dividen archivos. En &lt;i&gt;Windows &lt;/i&gt;hay varias alternativas como el &lt;i&gt;hacha &lt;/i&gt;o el &lt;i&gt;hjsplit&lt;/i&gt;, pero, &lt;b&gt;¿qué pasa si estamos en sistemas &lt;/b&gt;&lt;i&gt;&lt;b&gt;Unix?&lt;/b&gt; &lt;/i&gt;Pues después de un buen rato buscando, resulta que averigüé que no necesitamos ninguna herramienta, sino que&amp;nbsp;podemos utilizar directamente el comando &lt;b style=&quot;font-style: italic;&quot;&gt;split&lt;/b&gt;.&amp;nbsp;Su sintaxis es:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;split [parametros] [archivo_origen] [archivo_salida]&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Si no especificamos parámetros, el archivo se divide en nuevos archivos de &lt;u&gt;mil líneas&lt;/u&gt;, y a cada uno se le nombra como &lt;i&gt;archivo_salida &lt;/i&gt;(o x si no se especifica ese parámetro), con el prefijo &lt;i&gt;aa&lt;/i&gt;, &lt;i&gt;ab&lt;/i&gt;, &lt;i&gt;ac&lt;/i&gt;, etc. También podemos pasarle un guión como &lt;i&gt;archivo_origen&lt;/i&gt;, y el comando dividirá lo que reciba por la entrada estándar.&lt;br /&gt;
&lt;br /&gt;
Los parámetros nos permiten adecuar el funcionamiento del comando a nuestras necesidades. El más interesante para mis necesidades era el que modificaba el &lt;b&gt;tamaño de los ficheros&lt;/b&gt; obtenidos:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;i&gt;-b valor&lt;/i&gt; indica el tamaño de los ficheros en número de bytes (también se puede usar -bytes=valor)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Y tampoco me extiendo más, porque su uso es simple, y su &lt;a href=&quot;http://www.linuxmanpages.com/man1/split.1.php&quot;&gt;documentación&lt;/a&gt; es perfectamente clara. Lo importante es saber que está ahí si lo necesitamos.</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/5029020798800761396/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2011/12/dividir-archivos-en-unix.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/5029020798800761396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/5029020798800761396'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2011/12/dividir-archivos-en-unix.html' title='Dividir archivos en Unix'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-5972502148263012096</id><published>2011-11-09T02:04:00.000-08:00</published><updated>2011-11-09T02:04:47.593-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="encoding"/><category scheme="http://www.blogger.com/atom/ns#" term="Unix"/><title type='text'>Juegos de caracteres en Unix</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Hace días estuve trabajando en un proceso de migración de datos. El proceso se ejecutaba en un sistema &lt;i&gt;Unix&lt;/i&gt;, y recibía como entrada un simple fichero de texto plano. Pero, ¿cómo no?, ese fichero había sido generado bajo plataforma &lt;i&gt;Windows&lt;/i&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
El tema es que aunque el fichero se podía ver perfectamente con cualquier herramienta &lt;i&gt;Windows &lt;/i&gt;(&lt;i&gt;notepad++&lt;/i&gt;, &lt;i&gt;ultraedit&lt;/i&gt;, y hasta el&lt;i&gt; bloc de notas&lt;/i&gt;), incluyendo sus &lt;b&gt;acentos y eñes&lt;/b&gt;, en el momento en que lo subía al equipo con &lt;i&gt;Unix &lt;/i&gt;todo se descuajaringaba. Incluso si volvía a descargar el fichero (tanto la carga como la descarga utilizando &lt;i&gt;Filezilla&lt;/i&gt;), pasaba a no verse tampoco en &lt;i&gt;Windows&lt;/i&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Supongo que algún día terminaré de enterarme de los misterios que encierra la codificación de ficheros. Pero de momento me consuelo con saber que tengo una solución para conseguir que mi fiero no sufra mutaciones horrorosas.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Existe una función llamada &lt;i&gt;&lt;b&gt;iconv &lt;/b&gt;&lt;/i&gt;que permite cambiar la codificación de ficheros en &lt;i&gt;Unix&lt;/i&gt;. En mi caso conseguí lo que quería con un simple&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #333333; font-size: 18px; line-height: 26px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;iconv --from-code=ISO-8859-1 --to-code=UTF-8 entrada.txt &amp;gt; salida.txt&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #e0e0e0; color: #333333; font-family: Verdana, sans-serif; font-size: 18px; line-height: 26px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Incluso podríamos reducirlo más&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #333333; font-size: 18px; line-height: 25px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;iconv -f ISO-8859-1 -t UTF-8 entrada.txt &amp;gt; salida.txt&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #e0e0e0; color: #333333; font-family: Verdana, sans-serif; font-size: 18px; line-height: 25px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
También podemos utilizar la opción &lt;i&gt;-l&lt;/i&gt; (o &lt;i&gt;--list&lt;/i&gt;) para ver qué codificaciones hay disponibles en nuestro sistema.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/5972502148263012096/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2011/11/juegos-de-caracteres-en-unix.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/5972502148263012096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/5972502148263012096'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2011/11/juegos-de-caracteres-en-unix.html' title='Juegos de caracteres en Unix'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-3705369798714466575</id><published>2011-10-30T09:42:00.000-07:00</published><updated>2011-10-30T09:58:39.629-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Exception"/><category scheme="http://www.blogger.com/atom/ns#" term="iReport"/><category scheme="http://www.blogger.com/atom/ns#" term="Jasper Reports"/><category scheme="http://www.blogger.com/atom/ns#" term="Jasper Server"/><title type='text'>Error de Jasper Server</title><content type='html'>Este error me lo encontré hace unos días ejecutando informes en&lt;i&gt; Jasper Server&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-size: 15px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;ERROR JSErrorPage_jsp,http-8080-&lt;wbr&gt;&lt;/wbr&gt;Processor24:329 -&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 15px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;java.lang.NullPointerException&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 15px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; &lt;/span&gt;at com.jaspersoft.jasperserver.&lt;wbr&gt;&lt;/wbr&gt;war.action.ViewReportAction.&lt;wbr&gt;&lt;/wbr&gt;checkForParams(&lt;wbr&gt;&lt;/wbr&gt;ViewReportAction.java:143)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 15px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; &lt;/span&gt;at sun.reflect.&lt;wbr&gt;&lt;/wbr&gt;GeneratedMethodAccessor337.&lt;wbr&gt;&lt;/wbr&gt;invoke(Unknown Source)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 15px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; &lt;/span&gt;at sun.reflect.&lt;wbr&gt;&lt;/wbr&gt;DelegatingMethodAccessorImpl.&lt;wbr&gt;&lt;/wbr&gt;invoke(&lt;wbr&gt;&lt;/wbr&gt;DelegatingMethodAccessorImpl.&lt;wbr&gt;&lt;/wbr&gt;java:25)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 15px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; &lt;/span&gt;at java.lang.reflect.Method.&lt;wbr&gt;&lt;/wbr&gt;invoke(Method.java:585)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 15px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 15px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
Un puntero nulo en un método que, si nos fiamos de su nombre, comprueba los parámetros del informe.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Aunque en principio supuse que el problema debería ser que el valor de alguno de los parámetros fuese nulo, lo que realmente ocurre cuando nos encontramos este error es que hemos definido un &lt;i&gt;Input Control&lt;/i&gt; asociado al reporte en el servidor, y éste no encuentra correspondencia en el &lt;i&gt;jrxml&lt;/i&gt;.  Hay que tener en cuenta que la relación se establece entre el &lt;i&gt;id &lt;/i&gt;del &lt;i&gt;Input Control&lt;/i&gt; y el nombre del parámetro. &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/3705369798714466575/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2011/10/error-de-jasper-server.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/3705369798714466575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/3705369798714466575'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2011/10/error-de-jasper-server.html' title='Error de Jasper Server'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2742915094358781041.post-572011417900430916</id><published>2011-10-24T07:40:00.000-07:00</published><updated>2011-10-24T07:40:46.843-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Adobe"/><category scheme="http://www.blogger.com/atom/ns#" term="impresora"/><category scheme="http://www.blogger.com/atom/ns#" term="pdf"/><category scheme="http://www.blogger.com/atom/ns#" term="Reader"/><title type='text'>¡¡Adobe Reader no imprime!!</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;
Me he tirado varias semanas sin poder imprimir documentos &lt;b&gt;pdf &lt;/b&gt;desde mi portátil. Cada vez que lo intentaba me aparecía un misterioso mensaje: &lt;b&gt;&quot;Antes de realizar tareas relacionadas con la impresión, como la configuración de página o la impresión de un documento, debe instalar una impresora&quot;&lt;/b&gt;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo1KmonP6QVSd_Fv0CN_VNZSksyLlyh-NviVy4ifu9miHyMj_AOJJOqWMVUwTYl_SupmAeuwFOy9OmyACqpVcgE4aAdkDxuiMRRqX5gJBq7XYnVnDfqP7IB18tWrhf62R_5Ow5zN4wVkPx/s1600/24-10-2011+16-34-02.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;108&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo1KmonP6QVSd_Fv0CN_VNZSksyLlyh-NviVy4ifu9miHyMj_AOJJOqWMVUwTYl_SupmAeuwFOy9OmyACqpVcgE4aAdkDxuiMRRqX5gJBq7XYnVnDfqP7IB18tWrhf62R_5Ow5zN4wVkPx/s320/24-10-2011+16-34-02.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
¿Que debo instalar una impresora? ¿Estamos locos? Tengo nada menos que &lt;u&gt;nueve impresoras&lt;/u&gt; instaladas, ¿no le parece suficiente? Es más, si accedo a la opción &lt;i&gt;Archivo &lt;/i&gt;- &lt;i&gt;Configuración de impresión&lt;/i&gt; del &lt;i&gt;Reader&lt;/i&gt;, se abre sin ningún problema el diálogo para definir las preferencias de impresión para cada una de ellas...&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Rebuscando por Internet, sobre todo en páginas en inglés, se pueden encontrar muchas recomendaciones para solucionar este problema. Especialmente insistente es la idea de actualizar nuestra versión de &lt;i&gt;Adobe Reader&lt;/i&gt;. Pero ni por esas...&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Hasta que hace unos días, curiosamente, el mensaje desapareció y pude imprimir de nuevo. Pero, ¿por qué?, que diría Mou. Pues finalmente lo descubrí. Resulta que la impresora que tenía como predeterminada del sistema era una impresora de la red de mi oficina, a la que no tengo acceso más que cuando estoy allí trabajando. Y parece que el &lt;i&gt;Reader &lt;/i&gt;se ofusca cuando le dices que quieres imprimir, y no es capaz de conectar a la impresora predeterminada. Bastó con marcar como predeterminada de &lt;i&gt;Windows XP &lt;/i&gt;una impresora accesible para que todo volviese a funcionar.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tecno-aspirinas.blogspot.com/feeds/572011417900430916/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://tecno-aspirinas.blogspot.com/2011/10/adobe-reader-no-imprime.html#comment-form' title='10 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/572011417900430916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2742915094358781041/posts/default/572011417900430916'/><link rel='alternate' type='text/html' href='http://tecno-aspirinas.blogspot.com/2011/10/adobe-reader-no-imprime.html' title='¡¡Adobe Reader no imprime!!'/><author><name>jvel</name><uri>http://www.blogger.com/profile/07878966396889910504</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo1KmonP6QVSd_Fv0CN_VNZSksyLlyh-NviVy4ifu9miHyMj_AOJJOqWMVUwTYl_SupmAeuwFOy9OmyACqpVcgE4aAdkDxuiMRRqX5gJBq7XYnVnDfqP7IB18tWrhf62R_5Ow5zN4wVkPx/s72-c/24-10-2011+16-34-02.png" height="72" width="72"/><thr:total>10</thr:total></entry></feed>