<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>IPCorp Blog</title>
	<atom:link href="http://www.ipcorp.com.ar/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ipcorp.com.ar/blog</link>
	<description>#pg_dump ideas &#62; blog.log</description>
	<lastBuildDate>Fri, 11 Nov 2011 20:18:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mi pequeño paso por python: RSS, HTML, Jquery</title>
		<link>http://www.ipcorp.com.ar/blog/2011/11/11/mi-pequeno-paso-por-python-rss-html-jquery/</link>
		<comments>http://www.ipcorp.com.ar/blog/2011/11/11/mi-pequeno-paso-por-python-rss-html-jquery/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 20:18:24 +0000</pubDate>
		<dc:creator>Carlos Mathiasen</dc:creator>
				<category><![CDATA[Herramientas]]></category>
		<category><![CDATA[Lenguajes de Programación]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ipcorp.com.ar/blog/?p=1129</guid>
		<description><![CDATA[Hace no menos de un mes termin&#233; un proyecto que consist&#237;a en mostrar noticias de diarios argentinos de manera offline. Para ser implementado en muy poco espacio de disco, por lo que utilizar algun framework ser&#237;a un poco pesado.
El sistema ya se encontraba implementado con mod-python, la idea era seguir trabajando con eso y crear [...]]]></description>
			<content:encoded><![CDATA[<p>Hace no menos de un mes termin&eacute; un proyecto que consist&iacute;a en mostrar noticias de diarios argentinos de manera offline. Para ser implementado en muy poco espacio de disco, por lo que utilizar algun framework ser&iacute;a un poco pesado.<br />
El sistema ya se encontraba implementado con mod-python, la idea era seguir trabajando con eso y crear los scripts correspondientes en python.<br />
Desde un principio la idea era que un script traiga los feeds de noticias cada cierto tiempo (utilizando tareas cron) y generar un html el cual se pod&iacute;a ver de forma offline.<br />
Para ello en python existe una librer&iacute;a llamada feedparser, que nos trae en forma de diccionario todo lo que el servicio nos da.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> feedparser
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">urllib2</span> <span style="color: #808080; font-style: italic;">#lo utilizamos mas adelante</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">re</span> <span style="color: #808080; font-style: italic;">#lo utilizamos mas adelante</span>
parse = feedparser.<span style="color: black;">parse</span><span style="color: black;">&#40;</span>url_de_rss<span style="color: black;">&#41;</span></pre></div></div>

<p>Si tenemos conexi&oacute;n a internet, esas l&iacute;neas nos deber&iacute;an bajar el feed completo que nos ofrece la p&aacute;gina con la que queremos trabajar. Solo queda sacar lo que nos importa, en este caso el t&iacute;tulo, la noticia y las fotos si las hubiera. Como trabajamos offline no tendr&iacute;n que haber links de ningun tipo</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">noticias = <span style="color: #483d8b;">'&lt;ol&gt;<span style="color: #000099; font-weight: bold;">\n</span>'</span>
<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>,<span style="color: #ff4500;">10</span><span style="color: black;">&#41;</span>:
    titulo = parse.<span style="color: black;">entries</span><span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span>.<span style="color: black;">title</span>
    resumen =  <span style="color: #dc143c;">re</span>.<span style="color: black;">sub</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'((&lt;a){1}(.)+(&lt;/a&gt;)?)|((&lt;img){1}(.)+(/img&gt;)?)|((&lt;table){1}(.)+(&lt;/table&gt;)?)'</span>, <span style="color: #483d8b;">''</span>,parse.<span style="color: black;">entries</span><span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span>.<span style="color: black;">summary_detail</span>.<span style="color: black;">value</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">try</span>:
        img_url = <span style="color: #dc143c;">urllib2</span>.<span style="color: black;">urlopen</span><span style="color: black;">&#40;</span>parse.<span style="color: black;">entries</span><span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span>.<span style="color: black;">enclosures</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>.<span style="color: black;">href</span><span style="color: black;">&#41;</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        f = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;images/imagen_%s.jpg&quot;</span><span style="color: #66cc66;">%</span>i,<span style="color: #483d8b;">&quot;w&quot;</span><span style="color: black;">&#41;</span>
        f.<span style="color: black;">write</span><span style="color: black;">&#40;</span>img_url<span style="color: black;">&#41;</span>
        imagen = <span style="color: #483d8b;">'&lt;img src=&quot;images/imagen_%s.jpg&quot; alt=&quot;&quot;/&gt;'</span><span style="color: #66cc66;">%</span>i
    <span style="color: #ff7700;font-weight:bold;">except</span>:
        imagen = <span style="color: #483d8b;">''</span>
    noticias += <span style="color: #483d8b;">'&lt;li&gt;%s&lt;br/&gt;%s&lt;br/&gt;%s&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: #66cc66;">%</span><span style="color: black;">&#40;</span>titulo,resumen,imagen<span style="color: black;">&#41;</span>
&nbsp;
noticias += <span style="color: #483d8b;">'&lt;/ol&gt;'</span>
archivo_noticias = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;templates/_noticias.html&quot;</span>,<span style="color: #483d8b;">&quot;w&quot;</span><span style="color: black;">&#41;</span>
archivo_noticias.<span style="color: black;">write</span><span style="color: black;">&#40;</span>noticias<span style="color: black;">&#41;</span></pre></div></div>

<p>En la l&iacute;nea 1 simplemente inicializamos la variable que luego pondremos en el html correspondiente, vamos a utilizar una lista ordenada.<br />
En la l&iacute;nea 2 empezamos nuestro bucle diciendo que s&oacute;lo vamos a querer 10 noticias. Con un simple for podemos hacerlo, debido a que vamos a trabajar con la clave entries del diccionario, esta clave contiene un array, donde cada elemento es otro diccionario con sus propias claves. Las que vamos a utilizar en esta ocasi&oacute;n son:<br />
<b>title:</b> Trae el t&iacute;tulo de la noticia.<br />
<b>summary_detail:</b> Es donde est&aacute; el res&uacute;men de la noticia, este tiene como valor otro diccionario, de donde utilizaremos la clave value, donde est&aacute; el res&uacute;men propiamente dicho.<br />
<b>enclosures:</b> es donde se guardan los adjuntos de la noticia, en este caso nos interesan las im&aacute;genes, pero como trabajamos offlines tenemos que descargarlas para ello utilizamos urllib2 asi la guardamos en nuestro sistema de archivos. A modo de ejemplo puse que la imagen tenga como nombre el indice de la noticia. Si s&oacute;lo trabajamos con un diario no ser&iacute;a inconveniente, para m&aacute;s de un diario puede haber problemas porque los archivos se sobreescribir&iacute;an y no se mostrariacutean las correctas. Esta parte pongo dentro de un try, porque no siempre traen im&aacute;genes y el parse nos tira una excepci&oacute;n, en caso de que pase cargamos la variable con nada, sino creamos el tag html de imágenes.<br />
En la l&iacute;nea 3 creamos una variable donde se guarda el t&iacute;tulo de nuestra noticia<br />
En la l&iacute;nea 4  guardamos el res&uacute;men en una variable, puede parecer un poco complejo el c&oacute;digo, pero es bastante f&aacute;cil. Utilizamos la librer&iacute;a re para poder trabajar con expreciones regulares y con el m&eacute;todo sub eliminamos del string las cosas que no queremos. A mi no me interesaba ning&uacute;n<br />
link:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"> ((&lt;a){1}(.)+(&lt;/a&gt;)?)</pre></div></div>

<p>im&aacute;gen:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">((&lt;img){1}(.)+(/img&gt;)?)</pre></div></div>

<p>tabla:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">((&lt;table){1}(.)+(&lt;/table&gt;)?</pre></div></div>

<p>que haya en el res&uacute;men, entonces cuando encuentre algo de eso que simplemente lo reemplace por nada.<br />
Finalmente cerramos nuestra lista fuera del for y tendr&iacute;amos un resultado parecido a este:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>ol<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>Titulo1<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>Resumen1<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;images/imagen_1.jpg&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">/&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>Titulo2<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>Resumen2<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;images/imagen_2.jpg&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">/&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>Titulo3<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>Resumen3<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;images/imagen_3.jpg&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">/&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>Titulo4<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>Resumen4<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;images/imagen_4.jpg&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">/&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>Titulo5<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>Resumen5<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;images/imagen_5.jpg&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">/&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>Titulo6<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>Resumen6<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;images/imagen_6.jpg&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">/&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>Titulo7<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>Resumen7<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>Titulo8<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>Resumen8<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;images/imagen_8.jpg&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">/&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>Titulo9<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>Resumen9<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;</span>Titulo10<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;</span>Resumen10<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">/&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>ol<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Para poder guardarlo en el archivo _noticias.html<br />
Ya tenemos toda una lista de noticias lista para ser le&iacute;da offline, s&oacute;lo queda cargarlo en nuestro index y problema resulto, para eso podemos hacer uso de jquery (se puede hacer directamente con javascript, pero una p&aacute;gina web tiene bastante c&oacute;digo javascript hoy en d&iacute;a y jquery es un framework muy copadito<br />
para escribir poco <img src='http://www.ipcorp.com.ar/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).</p>
<p>En el index.html tendr&iacute;amos:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">&lt;div id=&quot;#noticias&quot;&gt;&lt;/div&gt;
&nbsp;
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#noticias&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'_noticias.html'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>Este fue mi pequeño paso por python, la verdad una experiencia muy linda, es un muy buen lenguaje. En realidad si  quer&eacute;s hacer un script de manera muy r&aacute;pida es una buena opci&oacute;n.<br />
Les dejo los links de feedparser y mod-python<br />
 <b>Feedparser: </b><a href="http://code.google.com/p/feedparser/">http://code.google.com/p/feedparser/</a><br />
 <b>Mod-Python: </b> <a href="http://www.modpython.org/">http://www.modpython.org/</a><br />
Bueno espero que les haya gustado y hasta la pr&oacute;xima <img src='http://www.ipcorp.com.ar/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipcorp.com.ar/blog/2011/11/11/mi-pequeno-paso-por-python-rss-html-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conferencias de Actualización en el marco de la  Industria del Software del Nordeste</title>
		<link>http://www.ipcorp.com.ar/blog/2011/10/11/conferencias-de-actualizacion-en-el-marco-de-la-industria-del-software-del-nordeste/</link>
		<comments>http://www.ipcorp.com.ar/blog/2011/10/11/conferencias-de-actualizacion-en-el-marco-de-la-industria-del-software-del-nordeste/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 21:15:39 +0000</pubDate>
		<dc:creator>marcelo</dc:creator>
				<category><![CDATA[Noticias]]></category>

		<guid isPermaLink="false">http://www.ipcorp.com.ar/blog/?p=1113</guid>
		<description><![CDATA[Semana 1. Fecha: 7 Octubre de 2011.
Tema: Desarrollo y Administración de Proyectos de Software
Disertantes: Ing. Fabián B. Bobadilla Godoy &#8211; - Aliare S.R.L.
;  Mario Alejandro Acevedo &#8211; 3Trex S.R.L.
Semana 2. Fecha: 14 Octubre de 2011.
Tema: Framework de aplicaciones web de código abierto
Disertante: Lic. Carlos Enrique Barbiero &#8211; Firma: IPCorp S.R.L.
Semana 3. Fecha: 21 Octubre de [...]]]></description>
			<content:encoded><![CDATA[<h3>Semana 1. Fecha: 7 Octubre de 2011.</h3>
<address>Tema: Desarrollo y Administración de Proyectos de Software<br />
Disertantes: Ing. Fabián B. Bobadilla Godoy &#8211; - <a href="http://www.aliare.com.ar/">Aliare S.R.L</a>.</address>
<p>;  Mario Alejandro Acevedo &#8211; <a href="http://www.3trex.com.ar/">3Trex S.R.L</a>.</address>
<h3>Semana 2. Fecha: 14 Octubre de 2011.</h3>
<address>Tema: Framework de aplicaciones web de código abierto<br />
Disertante: Lic. Carlos Enrique Barbiero &#8211; Firma:<a href="http://www.ipcorp.com.ar"> IPCorp S.R.L</a>.</address>
<h3>Semana 3. Fecha: 21 Octubre de 2011.</h3>
<address>Tema: Gestión de Proyectos<br />
Disertantes: Ing. José Fernández , Ing. Diego Morales &#8211; Firma:<a href="http://www.desarrollosnea.com.ar/"> DesarrollosNea S.R.L</a>.</address>
<h3>Semana 4. Fecha: 28 Octubre de 2011.</h3>
<address>Tema: Exportaciones y mercados regionales<br />
Disertante: Ing. Darío Almeida -<a href="http://www.coninfo.net/"> Coninfo.net S.A</a>.;  Lic. José Tagliarini -<a href="http://www.solucionespalm.com/"> SP  S.A.</a></address>
<h3>Semana 5. Fecha: 04 de Noviembre de 2011.</h3>
<address>Tema: Accesibilidad en la Web. Aspectos técnicos y legales.<br />
Disertante: Lic. Sonia Mariño FACENA ; Lic. Juan José Acevedo</address>
]]></content:encoded>
			<wfw:commentRss>http://www.ipcorp.com.ar/blog/2011/10/11/conferencias-de-actualizacion-en-el-marco-de-la-industria-del-software-del-nordeste/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cocinando la Receta RGM (Ruby-GTK-MongDB) en FACENA</title>
		<link>http://www.ipcorp.com.ar/blog/2011/09/20/cocinando-la-receta-rgm-ruby-gtk-mongdb-en-facena/</link>
		<comments>http://www.ipcorp.com.ar/blog/2011/09/20/cocinando-la-receta-rgm-ruby-gtk-mongdb-en-facena/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 23:21:02 +0000</pubDate>
		<dc:creator>Roxana Pintos</dc:creator>
				<category><![CDATA[Bases de Datos]]></category>
		<category><![CDATA[Lenguajes de Programación]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.ipcorp.com.ar/blog/?p=1102</guid>
		<description><![CDATA[En el marco de las Jornadas de Presentación de Trabajos de Investigación y Desarrollo de Alumnos y Graduados L.S.I de FACENA, el día 24 de septiembre a las 11hs, Leandro Rodriguez y Carlos Mathiasen presentarán Cocinando la Receta RGM (Ruby-GTK-MongDB).
El objetivo de la charla es compartir la experiencia de utilizar la tecnología de:

Ruby: lenguaje de [...]]]></description>
			<content:encoded><![CDATA[<p>En el marco de las <em>Jornadas de Presentación de Trabajos de Investigación y Desarrollo de Alumnos y Graduados L.S.I de FACENA,</em> el día 24 de septiembre a las 11hs, Leandro Rodriguez y Carlos Mathiasen presentarán <em><strong>Cocinando la Receta RGM (Ruby-GTK-MongDB)</strong></em>.</p>
<p>El objetivo de la charla es compartir la experiencia de utilizar la tecnología de:</p>
<ul>
<li>Ruby: lenguaje de programación interpretado, reflexivo y orientado a objetos, creado por el japonés Yukihiro &#8220;Matz&#8221; Matsumoto. Combina una sintaxis inspirada en Python y Perl con características de programación orientada a objetos similares a Smalltalk.</li>
<li>GTK+ o The GIMP Toolkit: conjunto de bibliotecas multiplataforma para desarrollar interfaces gráficas de usuario (GUI). GTK+ se diseñó para permitir programar con lenguajes como C, C++, C#, Java, Ruby, Perl, PHP o Python.</li>
<li>MongoDB: sistema de base de datos multiplataforma orientado a documentos, de esquema libre. Se destaca su velocidad y su rico pero sencillo sistema de consulta de los contenidos de la base de datos.</li>
</ul>
<p>Los esperamos en el edificio de la FACENA ubicado por calle 9 de Julio.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipcorp.com.ar/blog/2011/09/20/cocinando-la-receta-rgm-ruby-gtk-mongdb-en-facena/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aplicaciones de Escritorio: Ruby y Gtk+</title>
		<link>http://www.ipcorp.com.ar/blog/2011/08/30/alicaciones-de-escritorio-ruby-y-gtk/</link>
		<comments>http://www.ipcorp.com.ar/blog/2011/08/30/alicaciones-de-escritorio-ruby-y-gtk/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 19:56:17 +0000</pubDate>
		<dc:creator>Carlos Mathiasen</dc:creator>
				<category><![CDATA[Lenguajes de Programación]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.ipcorp.com.ar/blog/?p=1088</guid>
		<description><![CDATA[Hola a todos. Debido a que dentro de un par de días doy una charla sobre el tema: JORNADA DE INTEGRACIÓN, EXTENSIÓN Y ACTUALIZACIÓN DE ESTUDIANTES DE INFORMÁTICA (JOINEA), me gustó la idea de compartir con ustedes una pequeña aplicación que muestra un poco el manejo de widgets gtk2, espero les guste.
Primero,
¿Qué es GTK?
GTK+ o [...]]]></description>
			<content:encoded><![CDATA[<p>Hola a todos. Debido a que dentro de un par de días doy una charla sobre el tema: <a href="http://www.ipcorp.com.ar/blog/2011/08/23/jornada-de-integracion-extension-y-actualizacion-de-estudiantes-de-informatica-joinea/">JORNADA DE INTEGRACIÓN, EXTENSIÓN Y ACTUALIZACIÓN DE ESTUDIANTES DE INFORMÁTICA (JOINEA)</a>, me gustó la idea de compartir con ustedes una pequeña aplicación que muestra un poco el manejo de widgets gtk2, espero les guste.<br />
Primero,<br />
<strong>¿Qué es GTK?</strong><br />
GTK+ o The GIMP Toolkit es un conjunto de bibliotecas multiplataforma para desarrollar interfaces gráficas de usuario (GUI), desarrollada en C y utilizando en paradigma orientado a objetos.</p>
<p><strong>¿Qué es Ruby-Gnome2?</strong><br />
Ruby-GNOME2 es un conjunto de librerías Ruby para el entorno de desarrollo Gnome2. Ésta es la siguiente generación del proyecto Ruby-GNOME.</p>
<p>Sabiendo esto podemos empezar a hacer nuestro programa de ejemplo.<br />
El programa es muy sencillo, tiene un menú con dos opciones: Archivo y Editar y en cada opción se despliega un menú. Después tenemos un combo con nombres de &#8220;Artistas&#8221; del software libre <img src='http://www.ipcorp.com.ar/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  y un botón. Cuando damos click al botón se abre un diálogo diciendo qué hizo ese artista.<br />
Manos a la obra.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">&nbsp;
<span style="color:#008000; font-style:italic;">#!/usr/bin/ruby</span>
<span style="color:#008000; font-style:italic;">#requerimos la librería gtk2</span>
<span style="color:#008000; font-style:italic;">#depende de ruby1.8+ - ruby-gnome2 - ruby-gnome-dev</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'gtk2'</span>
&nbsp;
<span style="color:#008000; font-style:italic;">#tiene que heredar de Gtk::Window</span>
<span style="color:#9966CC; font-weight:bold;">class</span> RubyApp <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">Gtk::Window</span>
&nbsp;
   <span style="color:#008000; font-style:italic;">#constructor de la clase</span>
   <span style="color:#9966CC; font-weight:bold;">def</span> initialize
        <span style="color:#9966CC; font-weight:bold;">super</span>
	<span style="color:#008000; font-style:italic;">#atributos de clase</span>
	<span style="color:#0066ff; font-weight:bold;">@fixed</span>= <span style="color:#6666ff; font-weight:bold;">Gtk::Fixed</span>.<span style="color:#9900CC;">new</span> <span style="color:#008000; font-style:italic;">#crea un contenedor de tipo fixed vacío</span>
	<span style="color:#0066ff; font-weight:bold;">@combo</span>= <span style="color:#6666ff; font-weight:bold;">Gtk::ComboBox</span>.<span style="color:#9900CC;">new</span> <span style="color:#008000; font-style:italic;">#crea un combobox vacío</span>
	<span style="color:#0066ff; font-weight:bold;">@menu</span>= <span style="color:#6666ff; font-weight:bold;">Gtk::MenuBar</span>.<span style="color:#9900CC;">new</span> <span style="color:#008000; font-style:italic;">#crea una barra de menu vacía</span>
	<span style="color:#0066ff; font-weight:bold;">@boton</span>= <span style="color:#6666ff; font-weight:bold;">Gtk::Button</span>.<span style="color:#9900CC;">new</span> <span style="color:#996600;">&quot;¿Qué hizo?&quot;</span> <span style="color:#008000; font-style:italic;">#crea un botón y le da valor al label</span>
        set_windows
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
    <span style="color:#008000; font-style:italic;">#setea los valores de la ventana</span>
   <span style="color:#9966CC; font-weight:bold;">def</span> set_windows
	set_title  <span style="color:#996600;">&quot;Ipcorp Ruby y GTK+&quot;</span> <span style="color:#008000; font-style:italic;">#nombre de la ventana</span>
	set_default_size <span style="color:#006666;">250</span>, <span style="color:#006666;">200</span> <span style="color:#008000; font-style:italic;">#tamaño de la ventana</span>
	set_window_position <span style="color:#6666ff; font-weight:bold;">Gtk::Window::POS_CENTER</span> <span style="color:#008000; font-style:italic;">#posicion de la ventana</span>
	add fixed_main<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span>combo_box, menu_bar, boton<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#008000; font-style:italic;">#llama a fixed_main para crear un contenedor</span>
	show_all <span style="color:#008000; font-style:italic;">#muestra todo</span>
	signal_connect <span style="color:#996600;">&quot;destroy&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span> 
	    Gtk.<span style="color:#9900CC;">main_quit</span> <span style="color:#008000; font-style:italic;">#cuando se le da click al boton cerrar se cierra el programa</span>
	<span style="color:#9966CC; font-weight:bold;">end</span>
   <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#008000; font-style:italic;">#agrega widgets al contenedor @fixed</span>
    <span style="color:#9966CC; font-weight:bold;">def</span> fixed_main<span style="color:#006600; font-weight:bold;">&#40;</span>widgets<span style="color:#006600; font-weight:bold;">&#41;</span>
      widgets.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span> widget<span style="color:#006600; font-weight:bold;">|</span>
	  <span style="color:#0066ff; font-weight:bold;">@fixed</span>.<span style="color:#9900CC;">put</span> widget<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>, widget<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span>, widget<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#93;</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
      <span style="color:#0066ff; font-weight:bold;">@fixed</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
    <span style="color:#008000; font-style:italic;">#agrega valores al atributo @combo</span>
    <span style="color:#9966CC; font-weight:bold;">def</span> combo_box
      contenido = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;Matz&quot;</span>, <span style="color:#996600;">&quot;Stallman&quot;</span>, <span style="color:#996600;">&quot;Linus&quot;</span>, <span style="color:#996600;">'Mattis'</span><span style="color:#006600; font-weight:bold;">&#93;</span>
      contenido.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>item<span style="color:#006600; font-weight:bold;">|</span>
        <span style="color:#0066ff; font-weight:bold;">@combo</span>.<span style="color:#9900CC;">append_text</span> item
      <span style="color:#9966CC; font-weight:bold;">end</span>
      <span style="color:#006600; font-weight:bold;">&#91;</span>@combo,<span style="color:#006666;">10</span>,<span style="color:#006666;">60</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
    <span style="color:#008000; font-style:italic;">#crea un menu y lo agrega al atributo @menu</span>
    <span style="color:#9966CC; font-weight:bold;">def</span> menu_bar
      menues = <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#996600;">&quot;Archivo&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;Nuevo&quot;</span>,<span style="color:#996600;">&quot;Salir&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
                <span style="color:#996600;">&quot;Ayuda&quot;</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;Acerca de...&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
      menues.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>menu_key, item_value<span style="color:#006600; font-weight:bold;">|</span>
	    menu = <span style="color:#6666ff; font-weight:bold;">Gtk::Menu</span>.<span style="color:#9900CC;">new</span>
	    submenu = <span style="color:#6666ff; font-weight:bold;">Gtk::MenuItem</span>.<span style="color:#9900CC;">new</span> menu_key
	    <span style="color:#9966CC; font-weight:bold;">if</span> item_value.<span style="color:#9966CC; font-weight:bold;">class</span> == <span style="color:#CC0066; font-weight:bold;">Array</span>
	        item_value.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>item_v<span style="color:#006600; font-weight:bold;">|</span>
	            item_menu = <span style="color:#6666ff; font-weight:bold;">Gtk::MenuItem</span>.<span style="color:#9900CC;">new</span> item_v
	            menu.<span style="color:#9900CC;">append</span> item_menu
	            widget_activo<span style="color:#006600; font-weight:bold;">&#40;</span>item_menu,<span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">if</span> item_v == <span style="color:#996600;">&quot;Salir&quot;</span>
		    widget_activo<span style="color:#006600; font-weight:bold;">&#40;</span>item_menu,<span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">if</span> item_v == <span style="color:#996600;">&quot;Acerca de...&quot;</span>
	        <span style="color:#9966CC; font-weight:bold;">end</span>
	    <span style="color:#9966CC; font-weight:bold;">else</span>
	        item_menu = <span style="color:#6666ff; font-weight:bold;">Gtk::MenuItem</span>.<span style="color:#9900CC;">new</span> item_value
	        menu.<span style="color:#9900CC;">append</span> item_menu
	        salir<span style="color:#006600; font-weight:bold;">&#40;</span>item_menu,<span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">if</span> item_value == <span style="color:#996600;">&quot;Salir&quot;</span>
		widget_activo<span style="color:#006600; font-weight:bold;">&#40;</span>item_menu,<span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">if</span> item_value == <span style="color:#996600;">&quot;Acerca de...&quot;</span>
	    <span style="color:#9966CC; font-weight:bold;">end</span>
	    submenu.<span style="color:#9900CC;">set_submenu</span> menu
	    <span style="color:#0066ff; font-weight:bold;">@menu</span>.<span style="color:#9900CC;">append</span> submenu
      <span style="color:#9966CC; font-weight:bold;">end</span>
      <span style="color:#006600; font-weight:bold;">&#91;</span>@menu,<span style="color:#006666;">0</span>,<span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
    <span style="color:#008000; font-style:italic;">#cuando se activa un item del menu ejecuta el codigo</span>
    <span style="color:#9966CC; font-weight:bold;">def</span> widget_activo<span style="color:#006600; font-weight:bold;">&#40;</span>widget,tipo<span style="color:#006600; font-weight:bold;">&#41;</span>
      widget.<span style="color:#9900CC;">signal_connect</span> <span style="color:#996600;">&quot;activate&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
	tipo == <span style="color:#006666;">1</span> ? Gtk.<span style="color:#9900CC;">main_quit</span> : about_dialogo <span style="color:#008000; font-style:italic;">#si el tipo es 1 cierra la aplicacion, caso contrario abre el about</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
    <span style="color:#008000; font-style:italic;">#setea el tooltip del @boton y agrega un metodo en caso que se haga un click</span>
    <span style="color:#9966CC; font-weight:bold;">def</span> boton
      <span style="color:#0066ff; font-weight:bold;">@boton</span>.<span style="color:#9900CC;">set_tooltip_text</span> <span style="color:#996600;">&quot;Button widget&quot;</span>
      <span style="color:#0066ff; font-weight:bold;">@boton</span>.<span style="color:#9900CC;">signal_connect</span> <span style="color:#996600;">&quot;clicked&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>w,e<span style="color:#006600; font-weight:bold;">|</span>
	mensaje_dialogo<span style="color:#006600; font-weight:bold;">&#40;</span>@combo.<span style="color:#9900CC;">active_iter</span>.<span style="color:#9900CC;">to_s</span><span style="color:#006600; font-weight:bold;">&#41;</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
      <span style="color:#006600; font-weight:bold;">&#91;</span>@boton,<span style="color:#006666;">150</span>,<span style="color:#006666;">60</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
    <span style="color:#008000; font-style:italic;">#muestra un diálogo según el valor pasado</span>
    <span style="color:#9966CC; font-weight:bold;">def</span> mensaje_dialogo<span style="color:#006600; font-weight:bold;">&#40;</span>index<span style="color:#006600; font-weight:bold;">&#41;</span>
      mensaje = <span style="color:#9966CC; font-weight:bold;">case</span> index
		  <span style="color:#9966CC; font-weight:bold;">when</span> <span style="color:#996600;">&quot;0&quot;</span> 
		    <span style="color:#996600;">&quot;Creador del lenguaje ruby...&quot;</span>
		  <span style="color:#9966CC; font-weight:bold;">when</span> <span style="color:#996600;">&quot;1&quot;</span> 
		    <span style="color:#996600;">&quot;Creador del Proyecto GNU... Se presentará en Posadas el 05/09/2011&quot;</span>
		  <span style="color:#9966CC; font-weight:bold;">when</span> <span style="color:#996600;">&quot;2&quot;</span> 
		    <span style="color:#996600;">&quot;Creador del kernel Linux...&quot;</span>
		  <span style="color:#9966CC; font-weight:bold;">when</span> <span style="color:#996600;">&quot;3&quot;</span> 
		    <span style="color:#996600;">&quot;Creador del proyecto GTK+...&quot;</span>  
		  <span style="color:#9966CC; font-weight:bold;">else</span> 
		    <span style="color:#996600;">&quot;No elegiste nada&quot;</span>
		<span style="color:#9966CC; font-weight:bold;">end</span>
      md = <span style="color:#6666ff; font-weight:bold;">Gtk::MessageDialog</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span>,
	  <span style="color:#6666ff; font-weight:bold;">Gtk::Dialog::DESTROY_WITH_PARENT</span>, <span style="color:#6666ff; font-weight:bold;">Gtk::MessageDialog::INFO</span>, 
	  <span style="color:#6666ff; font-weight:bold;">Gtk::MessageDialog::BUTTONS_CLOSE</span>, mensaje<span style="color:#006600; font-weight:bold;">&#41;</span>
      md.<span style="color:#9900CC;">run</span>
      md.<span style="color:#9900CC;">destroy</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
    <span style="color:#008000; font-style:italic;">#crea un diálogo about.</span>
    <span style="color:#9966CC; font-weight:bold;">def</span> about_dialogo
        about = <span style="color:#6666ff; font-weight:bold;">Gtk::AboutDialog</span>.<span style="color:#9900CC;">new</span>
        about.<span style="color:#9900CC;">set_program_name</span> <span style="color:#996600;">&quot;Prueba GTK Ipcorp 2011&quot;</span>
        about.<span style="color:#9900CC;">set_version</span> <span style="color:#996600;">&quot;0.1&quot;</span>
        about.<span style="color:#9900CC;">set_copyright</span> <span style="color:#996600;">&quot;(cc) Carlos Mathiasen&quot;</span>
        about.<span style="color:#9900CC;">set_comments</span> <span style="color:#996600;">&quot;Una simple muestra de lo que se puede hacer con gtk y ruby&quot;</span>
        about.<span style="color:#9900CC;">set_logo</span> <span style="color:#6666ff; font-weight:bold;">Gdk::Pixbuf</span>.<span style="color:#9900CC;">new</span> <span style="color:#996600;">&quot;ipcorp.png&quot;</span>
        about.<span style="color:#9900CC;">run</span>
        about.<span style="color:#9900CC;">destroy</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#008000; font-style:italic;">#Ejecuta la aplicación</span>
Gtk.<span style="color:#9900CC;">init</span> <span style="color:#008000; font-style:italic;"># con esta linea inicializamos la librería de gtk2</span>
    window = RubyApp.<span style="color:#9900CC;">new</span>
Gtk.<span style="color:#9900CC;">main</span></pre></div></div>

<p>El código está comentado en casi todas sus líneas explicando lo que hace. Espero les resulte útil y cualquier cosa no duden en preguntar.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipcorp.com.ar/blog/2011/08/30/alicaciones-de-escritorio-ruby-y-gtk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Jornada de Integración, Extensión y Actualización de estudiantes de informática (JoInEA)</title>
		<link>http://www.ipcorp.com.ar/blog/2011/08/23/jornada-de-integracion-extension-y-actualizacion-de-estudiantes-de-informatica-joinea/</link>
		<comments>http://www.ipcorp.com.ar/blog/2011/08/23/jornada-de-integracion-extension-y-actualizacion-de-estudiantes-de-informatica-joinea/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 23:56:23 +0000</pubDate>
		<dc:creator>Carlos Mathiasen</dc:creator>
				<category><![CDATA[Noticias]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.ipcorp.com.ar/blog/?p=1078</guid>
		<description><![CDATA[La Jornada de Integración, Extensión y Actualización de estudiantes de informática (JoInEA) es organizada por una comisión de alumnos de las carreras de informática de la Facultad de Ciencias Exactas, Químicas y Naturales de la Universidad Nacional de Misiones. El objetivo de la misma es efectivizar la logística de la actualización mediante la integración y [...]]]></description>
			<content:encoded><![CDATA[<p>La Jornada de Integración, Extensión y Actualización de estudiantes de informática (JoInEA) es organizada por una comisión de alumnos de las carreras de informática de la Facultad de Ciencias Exactas, Químicas y Naturales de la Universidad Nacional de Misiones. El objetivo de la misma es efectivizar la logística de la actualización mediante la integración y extensión, generando un espacio para los aportes, avances y reflexiones de estudiantes y profesionales del medio; así como también la promoción e inserción del personal y las herramientas informáticas en nuestra sociedad.<br />
La misma fu&eacute; declarada de inter&eacute;s provincial el pasado 9 de agosto.</p>
<p>Estar&eacute; presentando  la charla  “Interfaces de Usuario Con Ruby y GTK”  el viernes 02 de septiembre de 2011 a las 14:30 hs.</p>
<p>Si quer&eacute;s saber un poco m&aacute;s visit&aacute;: <a href="http://joinea2011.exactas-unam.dyndns.org/">JOINEA</a></p>
<p>Los espero</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipcorp.com.ar/blog/2011/08/23/jornada-de-integracion-extension-y-actualizacion-de-estudiantes-de-informatica-joinea/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Richard  Stallman en Posadas (Misiones).  “El software libre y tu libertad”</title>
		<link>http://www.ipcorp.com.ar/blog/2011/08/19/richard-stallman-en-posadas-misiones-%e2%80%9cel-software-libre-y-tu-libertad%e2%80%9d/</link>
		<comments>http://www.ipcorp.com.ar/blog/2011/08/19/richard-stallman-en-posadas-misiones-%e2%80%9cel-software-libre-y-tu-libertad%e2%80%9d/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 22:31:12 +0000</pubDate>
		<dc:creator>marcelo</dc:creator>
				<category><![CDATA[Noticias]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.ipcorp.com.ar/blog/?p=1074</guid>
		<description><![CDATA[Misiones Software Libre &#8211; MiSoL- e IPCorp SRL  los invita a la Conferencia Magistral de Richard Matthew Stallman “El software Libre y tu Libertad” que se realizará en las instalaciones del  Centro del Conocimiento &#8211; sala 1 del Centro de Convenciones de la Ciudad de Posadas Misiones el próximo 5 de Septiembre a las 17hs.
Noticia [...]]]></description>
			<content:encoded><![CDATA[<p style="padding-top: 15px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; line-height: 19px; margin: 0px;" dir="ltr"><span style="padding: 0px; margin: 0px;"><strong>Misiones Software Libre &#8211; MiSoL- e IPCorp SRL  los invita a la Conferencia Magistral de Richard Matthew Stallman “El software Libre y tu Libertad” </strong></span>que se realizará en las instalaciones del  Centro del Conocimiento &#8211; sala 1 del Centro de Convenciones de la Ciudad de Posadas Misiones el próximo 5 de Septiembre a las 17hs.</p>
<p style="padding-top: 15px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; line-height: 19px; margin: 0px;" dir="ltr">Noticia en sitio de MiSol : <a href="http://www.misol.org.ar/2011/07/richard-m-stallman-en-septiembre-dara-una-conferencia-en-posadas/">http://www.misol.org.ar/2011/07/richard-m-stallman-en-septiembre-dara-una-conferencia-en-posadas/</a></p>
<p style="padding-top: 15px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; line-height: 19px; margin: 0px;" dir="ltr"><span style="padding: 0px; margin: 0px;"><strong></strong></span><strong>Richard Matthew Stallman (rms) es conocido por establecer y desarrollar el Proyecto GNU que es el marco legal, filosófico y ético-moral para los movimientos de Software Libre, también es creador del concepto de copyleft, un método para licenciar software de tal forma que su uso y modificación permanezcan siempre libres y queden en la comunidad.</strong></p>
<p style="padding-top: 15px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; line-height: 19px; margin: 0px;" dir="ltr"><span style="padding: 0px; margin: 0px;"><strong>Este evento también está coorganizado junto a la Universidad Nacional de Misiones,</strong></span><strong> Polo Audiovisual Tecnológico NEA, </strong><strong>Centro del Conocimiento &#8211; Gob. de la Pcia de Misiones &#8211; ,  y se encuentra enmarcado dentro de la agenda de la Conferencia Internacional de Software Libre &#8211; CISL &#8211; que se realizará el 8 y 9 de Septiembre  en la ciudad de Buenos Aires.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipcorp.com.ar/blog/2011/08/19/richard-stallman-en-posadas-misiones-%e2%80%9cel-software-libre-y-tu-libertad%e2%80%9d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script para recorrer archivos html y encontrar las clases</title>
		<link>http://www.ipcorp.com.ar/blog/2011/06/17/script-para-recorrer-archivos-html-y-encontrar-las-clases/</link>
		<comments>http://www.ipcorp.com.ar/blog/2011/06/17/script-para-recorrer-archivos-html-y-encontrar-las-clases/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 15:56:59 +0000</pubDate>
		<dc:creator>Carlos Mathiasen</dc:creator>
				<category><![CDATA[Herramientas]]></category>
		<category><![CDATA[Lenguajes de Programación]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Sistemas Operativos]]></category>

		<guid isPermaLink="false">http://www.ipcorp.com.ar/blog/?p=1060</guid>
		<description><![CDATA[Me vinieron con un problema bastante bueno ayer: &#8220;Necesito que elimines las clases que no se usan en el archivo .css&#8221;, la verdad parece no complicarse mucho, el problema se agrava un poco cuando ten&#233;s unos cuantos archivos html. Por curiosidad se me ocurri&#243; contar los archivos:

  find /proyectos/app/ -name *.erb -exec ls -l [...]]]></description>
			<content:encoded><![CDATA[<p>Me vinieron con un problema bastante bueno ayer: &#8220;Necesito que elimines las clases que no se usan en el archivo .css&#8221;, la verdad parece no complicarse mucho, el problema se agrava un poco cuando ten&eacute;s unos cuantos archivos html. Por curiosidad se me ocurri&oacute; contar los archivos:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">  <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>proyectos<span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-name</span> <span style="color: #000000; font-weight: bold;">*</span>.erb <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-l</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \; <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">wc</span> <span style="color: #660033;">-l</span>
  <span style="color: #666666; font-style: italic;">#busco todos los que terminan en .erb, porque es un proyecto en Rails</span></pre></div></div>

<p>Me di&oacute; la m&oacute;dica suma de 444 archivos. Ahora si se complicaba demasiado hacerlo a mano.<br />
Me puse a incursionar un poco en bash y sali&oacute; esto:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">a</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">find</span> $<span style="color: #000000;">1</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;*.erb&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>; <span style="color: #666666; font-style: italic;">#busco los archivos y guardo los paths en una lista</span>
<span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$a</span>; <span style="color: #000000; font-weight: bold;">do</span> <span style="color: #666666; font-style: italic;">#recorro la lista</span>
   <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$i</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">egrep</span> <span style="color: #ff0000;">'class=&quot;'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span> <span style="color: #ff0000;">'class='</span> <span style="color: #ff0000;">'{print $2}'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span> <span style="color: #ff0000;">'&quot;'</span> <span style="color: #ff0000;">'{print $2}'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #660033;">-F</span> <span style="color: #ff0000;">' '</span> <span style="color: #ff0000;">'{for (j=1; j&lt;=NF; j++)  print $j; print &quot;\n&quot;}'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> clases.txt
<span style="color: #000000; font-weight: bold;">done</span>  
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">sort</span> clases.txt <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> clases2.txt <span style="color: #666666; font-style: italic;">#ordeno el archivo y lo guardo en otro</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> clases.txt <span style="color: #666666; font-style: italic;">#elimino el primer archivo</span>
<span style="color: #c20cb9; font-weight: bold;">uniq</span> <span style="color: #660033;">-u</span> clases2.txt <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> clases.txt <span style="color: #666666; font-style: italic;">#borro las l&amp;iacute;neas duplicadas (ya que las clases no son &amp;uacute;nicas)</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> clases2.txt <span style="color: #666666; font-style: italic;">#elimino el archivo auxiliar</span></pre></div></div>

<p>La tercer linea del script la explico aca abajo, sino no se iba a entender nada</p>
<p><strong>cat $i:</strong> muestra el contenido del path que le estamos pasando.<br />
<strong> egrep &#8216;class=&#8221;&#8216;:</strong> Me muestra solo las l&iacute;neas que contienen &#8216;class=&#8221;&#8216;, que es como definimos una clase en html.<br />
<strong> awk -F &#8216;class=&#8217; &#8216;{print $2}&#8217;:</strong>Hago como un split a un string separando por &#8216;class=&#8217; y mostrando solo el segundo valor, es decir todas las clases que tenga ese tag.<br />
<strong>awk -F &#8216;  &#8216;  &#8216;{for (j=1; j<=NF; j++)  print $j; print "\n"}':</strong> Como ya tenemos en una sola l&iacute;nea todas las clases de un tag, y sabemos que las clases se separan con un espacio, hacemos nuestro split por espacios y recorremos todas las variables y las vamos imprimiendo con un salto de linea al final. Esto nos har&iacute;a una lista con todas las clases que existan en los archivos html.<br />
Despu&eacute;s habriendo el archivo clases.txt, vemos las clases ordenadas y &uacute;nicas <img src='http://www.ipcorp.com.ar/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Quiz&aacute; se pueda costumizar más, no usar 2 archivos sino solo uno. Tambi&eacute;n se podria recorrer el archivo .css y compararlo con nuestro archivo, eliminando las l&iacute;neas que necesitamos. Pero para salir del apuro anda perfecto. Y si queremos encontrar los id, es cuesti&oacute;n de reemplazar la b&uacute;squeda nom&aacute;, aunque me tira algunos datos sucios, ya que también se usa en javascript y en ruby, entonces por ahi se complicaba un poco m&aacute;s, pero les dejo como tarea para la casa jeje<br />
Bueno espero les pueda servir y cualquier consulta no duden en comentar.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipcorp.com.ar/blog/2011/06/17/script-para-recorrer-archivos-html-y-encontrar-las-clases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FullCalendar de JQUERY  Y RAILS</title>
		<link>http://www.ipcorp.com.ar/blog/2011/05/19/fullcalendar-de-jquery-y-rails/</link>
		<comments>http://www.ipcorp.com.ar/blog/2011/05/19/fullcalendar-de-jquery-y-rails/#comments</comments>
		<pubDate>Thu, 19 May 2011 23:22:53 +0000</pubDate>
		<dc:creator>higinia</dc:creator>
				<category><![CDATA[Herramientas]]></category>
		<category><![CDATA[Lenguajes de Programación]]></category>
		<category><![CDATA[Noticias]]></category>

		<guid isPermaLink="false">http://www.ipcorp.com.ar/blog/?p=1045</guid>
		<description><![CDATA[Les queria mostrar un calendario con el cual me entusiasme mucho cuando lo puse en práctica, claro que adaptándolo a mi aplicación.
FullCalendar es un plugin JQuery para implementar un calendario con una interfaz muy sencilla de implementar y muy personalizable por medio de CSS. 
Para configurarlo, este recurso brinda un  conjunto de parámetros, objetos y eventos como:
*Opciones para definir meses, [...]]]></description>
			<content:encoded><![CDATA[<p>Les queria mostrar un calendario con el cual me entusiasme mucho cuando lo puse en práctica, claro que adaptándolo a mi aplicación.<br />
FullCalendar es un plugin JQuery para implementar un calendario con una interfaz muy sencilla de implementar y muy personalizable por medio de CSS. </p>
<p>Para configurarlo, este recurso brinda un  conjunto de parámetros, objetos y eventos como:<br />
*Opciones para definir meses, años, si el elemento es arrastrable, la transparencia del elemento arrastrado, titulo, etc.<br />
*Eventos para proveer los datos.<br />
*Eventos que se disparan al hacer clic en un día, al cargar, al arrastrar, al soltar, etc.<br />
*Objetos del calendarios como título, fecha, hora, etc.<br />
*Ademas es de código abierto</p>
<p>De acuerdo a mis necesidades y a mi lenguaje utilizado, lo implemente de la siguiente manera:<br />
Se descarga el archivo ZIP de la biblioteca JQuery, el plugin y demos funcionales y los incluís a tu archivo que contienen tus scripts.</p>
<p>Inicialmente en tu formulario donde vas a presentarlo, lo llamas con un simple identificador
<div id=''calendar'></div>
<p>Luego en la parte del codigo javascript, incluís el conjunto de parámetros que  te sea mas útil.</p>
<p>A modo de ejemplo les muestro algunos que utilice:</p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;">&lt;table&gt;
  &lt;tr&gt;
  &lt;a&gt;<span style="color:#006600; font-weight:bold;">&lt;%</span>= <span style="color:#5A0A0A; font-weight:bold;">link_to</span> <span style="color:#996600;">'Nuevo Evento'</span>, turno_tarea_turnos_path <span style="color:#006600; font-weight:bold;">%&gt;</span>&lt;/a&gt;
&nbsp;
// Este link_to nos llevara a los distintos eventos que serán mostrados en el calendario (en el caso de mi aplicación)
&nbsp;
 &lt;/tr&gt;
&lt;/table&gt;
&nbsp;
&lt;table&gt;  
&lt;div id='calendar'&gt;&lt;/div&gt;  
&nbsp;
Acá comenzamos a configurar el calendario
&lt;script type=&quot;text/javascript&quot;&gt;
  $(document).ready(function(){
$('#calendar').fullCalendar({   
          editable: true,
          header: {
              left: 'prev,next',
              center: 'title'
              /*right: 'month,agendaWeek,agendaDay'*/
          },
          defaultView: 'agendaWeek',      
          height: 600,
          slotMinutes: 30,
          minTime : 8,
          maxTime : 21,
          firstDay : 1,
          allDaySlot : false,
          columnFormat:'ddd d/M',       
           titleFormat : &quot;MMM d[ yyyy]{ '&amp;#8212;'[MMM] dd 'del' yyyy}&quot;,
          weekends: false,
          defaultEventMinutes : 30,        
          buttonText: {prev: '&amp;nbsp;&amp;#9668;&amp;nbsp;',
		next: '&amp;nbsp;&amp;#9658;&amp;nbsp;',
		prevYear: '&amp;nbsp;&amp;lt;&amp;lt;&amp;nbsp;',
		nextYear: '&amp;nbsp;&amp;gt;&amp;gt;&amp;nbsp;',
                today : 'Hoy'},
&nbsp;
          unselectAuto: false,
          weekMode : false,
          monthNamesShort : ['Enero' , 'Febrero' , 'Marzo' , 'Abril' , 'Mayo' , 'Junio' , 'Julio' ,
                        'Agosto' , 'Septiembre' , 'Octubre' , 'Noviembre' , 'Diciembre' ],
          dayNamesShort : ['Domingo', 'Lunes', 'Martes', 'Miercoles', 'Jueves', 'Viernes', 'Sabado'],
&nbsp;
&nbsp;
  // Este pequeño array nos va a permitir visualizar los eventos
          events:[
&nbsp;
            <span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#9966CC; font-weight:bold;">for</span> turno <span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#0066ff; font-weight:bold;">@turnos</span> = Turno.<span style="color:#9900CC;">all</span>   <span style="color:#006600; font-weight:bold;">-%&gt;</span>
              {
               id : 'turno: <span style="color:#006600; font-weight:bold;">&lt;%</span>= turno.<span style="color:#9900CC;">id</span>.<span style="color:#5A0A0A; font-weight:bold;">to_s</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>',
               title  : 'Profesional: <span style="color:#006600; font-weight:bold;">&lt;%</span>= turno.<span style="color:#9900CC;">profesional</span>.<span style="color:#9900CC;">nombre</span> <span style="color:#006600; font-weight:bold;">%&gt;</span> Duracion: <span style="color:#006600; font-weight:bold;">&lt;%</span>= turno.<span style="color:#9900CC;">duracion</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>minutos Paciente: <span style="color:#006600; font-weight:bold;">&lt;%</span>= turno.<span style="color:#9900CC;">paciente</span>.<span style="color:#9900CC;">nombre</span>  <span style="color:#006600; font-weight:bold;">%&gt;</span> ' ,
               start : 'Fecha: <span style="color:#006600; font-weight:bold;">&lt;%</span>= turno.<span style="color:#9900CC;">fecha_hora</span>.<span style="color:#9900CC;">iso8601</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>',
               end : 'Duracion: <span style="color:#006600; font-weight:bold;">&lt;%</span>= <span style="color:#006600; font-weight:bold;">&#40;</span>turno.<span style="color:#9900CC;">fecha_hora</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">60</span> <span style="color:#006600; font-weight:bold;">*</span> turno.<span style="color:#9900CC;">duracion</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>',
               allDay : false,
               url: '<span style="color:#006600; font-weight:bold;">&lt;%</span>= eliminar_turno_path<span style="color:#006600; font-weight:bold;">&#40;</span>turno<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>'
&nbsp;
              },
&nbsp;
            <span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#9966CC; font-weight:bold;">end</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>           
&nbsp;
              ],
&nbsp;
          timeFormat: 'h:mm t{ - h:mm t} ',
          dragOpacity: &quot;0.5&quot;,
&nbsp;
&nbsp;
&nbsp;
          eventDrop: function(event, dayDelta, minuteDelta, allDay, revertFunc){
              if (confirm(&quot;Are you sure about this change?&quot;)) {
                  moveEvent(event, dayDelta, minuteDelta, allDay);
              }
              else {
                revertFunc();
              }
          },
&nbsp;
          eventResize: function(event, dayDelta, minuteDelta, revertFunc){
              if (confirm(&quot;Are you sure about this change?&quot;)) {
                  resizeEvent(event, dayDelta, minuteDelta);
              }
              else {
                 revertFunc();
              }
          },        
&nbsp;
&nbsp;
// En este caso, al hacer click sobre el evento, me llevara a la url especificada para ese evento (se muestra mas arriba)
&nbsp;
 eventClick: function(event, jsEvent){
             if (event.url) {
              if (confirm('Esta seguro de eliminar? Esta accion no se podra deshacer')){
                event.url;
              //return false;
              }else{
                return false;
              }
&nbsp;
        }
          }
}
&nbsp;
&lt;/script&gt;</pre></div></div>

<p>Espero que les guste y lo implementen.</p>
<p>Para descargar los archivos js:  http://<a href="arshaw.com/fullcalendar/ ">arshaw.com/fullcalendar/ </a><br />
Otro ejemplo que me sirvió lo podes ver en http://<a href="fullcalendar.vinsol.com">fullcalendar.vinsol.com/ </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipcorp.com.ar/blog/2011/05/19/fullcalendar-de-jquery-y-rails/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IPCorp en el 4to Festival Misionero de Software Libre.</title>
		<link>http://www.ipcorp.com.ar/blog/2011/05/16/ipcorp-en-el-4to-festival-misionero-de-software-libre/</link>
		<comments>http://www.ipcorp.com.ar/blog/2011/05/16/ipcorp-en-el-4to-festival-misionero-de-software-libre/#comments</comments>
		<pubDate>Mon, 16 May 2011 20:20:27 +0000</pubDate>
		<dc:creator>marcelo</dc:creator>
				<category><![CDATA[Noticias]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.ipcorp.com.ar/blog/?p=1043</guid>
		<description><![CDATA[La comunidad MiSol invita a todos al “4to Festival Misionero de Software Libre” los días 20 y 21 de Mayo de 2011 próximos en la Fac. de ingeniería de la UNaM (Universidad Nacional de Misiones) en la ciudad de Oberá, Misiones, Argentina.
IPCorp S.R.L estara presente en el mismo presentando  la charla  sobre &#8220;Desarrollo con RubyOnRails y PostgreSQL&#8221;  la [...]]]></description>
			<content:encoded><![CDATA[<p style="padding-top: 15px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; line-height: 19px; margin: 0px;">La comunidad MiSol invita a todos al <strong style="padding: 0px; margin: 0px;">“<a href="http://www.misol.org.ar/4to-festival-misionero-de-software-libre/" target="_blank">4to Festival Misionero de Software Libre</a>”</strong> los días <strong style="padding: 0px; margin: 0px;">20 y 21 de Mayo de 2011</strong> próximos en la Fac. de ingeniería de la UNaM (Universidad Nacional de Misiones) en la ciudad de <strong style="padding: 0px; margin: 0px;">Oberá</strong>, Misiones, Argentina.</p>
<p style="padding-top: 15px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; line-height: 19px; margin: 0px;">IPCorp S.R.L estara presente en el mismo presentando  la charla  sobre &#8220;Desarrollo con RubyOnRails y PostgreSQL&#8221;  la misma sera disertada por Carlos Mathiasen y Alfredo Ramirez el sabado 21 de mayo de 2011 a las 15:00 hs.</p>
<p style="padding-top: 15px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; line-height: 19px; margin: 0px;">Este evento tiene como objetivo fomentar las ventajas técnicas, sociales, políticas y filosóficas relacionadas a la utilización del software libre. En particular este año abordaremos 2 temáticas: <strong style="padding: 0px; margin: 0px;">“Hackers”</strong> y <strong style="padding: 0px; margin: 0px;">“Cultura Libre”</strong> para que podamos divertirnos entre todos de la diversidad de temas en nuestra comunidad.</p>
<p style="padding-top: 15px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; line-height: 19px; margin: 0px;">Este año nuevamente contaremos con la presencia de:</p>
<p style="padding-top: 15px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; line-height: 19px; margin: 0px;">- <strong style="padding: 0px; margin: 0px;">Mozilla Foundation</strong> que llevan adelante un modelo de negocio basado en software libre y conocimiento libre.<br style="padding: 0px; margin: 0px;" />- <strong style="padding: 0px; margin: 0px;">SoLAr (Software Libre Argentina)</strong> &#8211; Asociación civil sin fines de lucro dedicada a la promoción del Soft. libre en nuestro país.</p>
<p style="padding-top: 15px; padding-right: 0px; padding-bottom: 15px; padding-left: 0px; line-height: 19px; margin: 0px;">El evento constará de:<br style="padding: 0px; margin: 0px;" /><strong style="padding: 0px; margin: 0px;">Viernes 20: </strong>Charlas y ponencias en el auditorium de la <strong style="padding: 0px; margin: 0px;">Facultad de Ingeniería &#8211; Juan Manuel de Rosas 325</strong>. Acreditación 8:00 hs &#8211; Inicio 9:15hs<br style="padding: 0px; margin: 0px;" /><strong style="padding: 0px; margin: 0px;">Sábado 21: </strong>Charlas en las aulas<strong style="padding: 0px; margin: 0px;"> “Hackers” </strong>y<strong style="padding: 0px; margin: 0px;"> “Cultura Libre” </strong>(Facultad de Ingeniería). INICIO 9:00 hs<br style="padding: 0px; margin: 0px;" /><strong style="padding: 0px; margin: 0px;">Entrada Libre y Gratuita &#8211; CERTIFICADO IMPRESO $25</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipcorp.com.ar/blog/2011/05/16/ipcorp-en-el-4to-festival-misionero-de-software-libre/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Jquery Validation y formulario ajax en rails</title>
		<link>http://www.ipcorp.com.ar/blog/2011/05/13/jquery-validation-y-formulario-ajax-en-rails/</link>
		<comments>http://www.ipcorp.com.ar/blog/2011/05/13/jquery-validation-y-formulario-ajax-en-rails/#comments</comments>
		<pubDate>Sat, 14 May 2011 00:12:51 +0000</pubDate>
		<dc:creator>Carlos Mathiasen</dc:creator>
				<category><![CDATA[Lenguajes de Programación]]></category>
		<category><![CDATA[Noticias]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[form_remote_for]]></category>
		<category><![CDATA[form_remote_tag]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails 2.3.5]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[validar]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.ipcorp.com.ar/blog/?p=1035</guid>
		<description><![CDATA[Hola a todos. Hoy vengo con un pequeño tip que me hizo doler la cabeza por un rato.
El problema era el siguiente, ten&#237;a un formulario ajax y necesitaba hacer una validaci&#243;n del lado del cliente. Para realizar la validaci&#243;n utilizaba el plugin de  jquery validation, y para el formulario ajax usaba lo siguiente

&#60;% form_remote_for [...]]]></description>
			<content:encoded><![CDATA[<p>Hola a todos. Hoy vengo con un pequeño tip que me hizo doler la cabeza por un rato.<br />
El problema era el siguiente, ten&iacute;a un formulario ajax y necesitaba hacer una validaci&oacute;n del lado del cliente. Para realizar la validaci&oacute;n utilizaba el plugin de  <a href="http://docs.jquery.com/Plugins/validation">jquery validation</a>, y para el formulario ajax usaba lo siguiente</p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#5A0A0A; font-weight:bold;">form_remote_for</span> <span style="color:#0066ff; font-weight:bold;">@personas</span>, <span style="color:#ff3333; font-weight:bold;">:url</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> crear_titulares_personas_path, <span style="color:#ff3333; font-weight:bold;">:method</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'POST'</span> , <span style="color:#ff3333; font-weight:bold;">:update</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'creado'</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>f<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
<span style="color:#006600; font-weight:bold;">&lt;%</span>= f.<span style="color:#9900CC;">text_field</span> <span style="color:#ff3333; font-weight:bold;">:nombre</span>, <span style="color:#ff3333; font-weight:bold;">:class</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'required'</span><span style="color:#006600; font-weight:bold;">%&gt;</span>
<span style="color:#006600; font-weight:bold;">&lt;%</span>= f.<span style="color:#9900CC;">submit</span> <span style="color:#996600;">&quot;Guardar&quot;</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
<span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#9966CC; font-weight:bold;">end</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
&nbsp;
&lt;script type=&quot;text/javascript&quot;&gt;
  $(document).ready(function(){
   $('#new_factor_variante').validate();
  });
&lt;/script&gt;</pre></div></div>

<p>Normalmente, al presionar el bot&oacute;n Guardar, el plugin me dice que ingrese un nombre (debido a que el campo es requerido) y no va al m&eacute;todo del controller hasta que lo ingrese. Sin embargo me mostraba el error, pero igual se iba hasta el controller, es decir, la acci&oacute;n se ejecutaba igual.<br />
Para resolver esto, despu&eacute;s de una ardua b&uacute;squeda en google, decid&iacute; consultar la <a href="http://replay.web.archive.org/20090228103110/http://api.rubyonrails.org//">api de rails 2.3.5</a>(es la versi&oacute;n que estoy usando) y encontre que podes agregar una condici&oacute;n en el form, para que se ejecute o no la acci&oacute;n y en esta condici&oacute;n puedo meter c&oacute;digo javascript.<br />
Lo que hice fue preguntar si el formulario era v&aacute;lido y el c&oacute;digo me qued&oacute; as&iacute;:</p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#5A0A0A; font-weight:bold;">form_remote_for</span> <span style="color:#0066ff; font-weight:bold;">@persona</span>, <span style="color:#ff3333; font-weight:bold;">:url</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> crear_titulares_personas_path, <span style="color:#ff3333; font-weight:bold;">:method</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'POST'</span> , <span style="color:#ff3333; font-weight:bold;">:condition</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'$(this).valid()'</span>,  <span style="color:#ff3333; font-weight:bold;">:update</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'creado'</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>f<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
<span style="color:#006600; font-weight:bold;">&lt;%</span>= f.<span style="color:#9900CC;">text_field</span> <span style="color:#ff3333; font-weight:bold;">:nombre</span>, <span style="color:#ff3333; font-weight:bold;">:class</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'required'</span><span style="color:#006600; font-weight:bold;">%&gt;</span>
<span style="color:#006600; font-weight:bold;">&lt;%</span>= f.<span style="color:#9900CC;">submit</span> <span style="color:#996600;">&quot;Guardar&quot;</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
<span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#9966CC; font-weight:bold;">end</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
&lt;script type=&quot;text/javascript&quot;&gt;
  $(document).ready(function(){
   $('#new_factor_variante').validate();
  });</pre></div></div>

<p>.valid() es un m&eacute;todo del <a href="http://docs.jquery.com/Plugins/Validation/valid">jquery validation</a> que me devuelve un valor booleano seg&uacute;n el estado del formulario.<br />
Con esto ya pueden tener validaci&oacute;n del lado del cliente con un formulario ajax en rails.<br />
Espero les sirva, cualquier cosa pregunten nom&aacute;s</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipcorp.com.ar/blog/2011/05/13/jquery-validation-y-formulario-ajax-en-rails/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.749 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-04 14:19:54 -->

