<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Mario Martínez</title>
	<atom:link href="http://mariomartinez.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://mariomartinez.net</link>
	<description>Blog personal de informática, programación y otros asuntos de interés personal</description>
	<lastBuildDate>Sun, 27 Mar 2011 00:25:54 +0000</lastBuildDate>
	<language>es</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mariomartinez.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Mario Martínez</title>
		<link>http://mariomartinez.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mariomartinez.net/osd.xml" title="Mario Martínez" />
	<atom:link rel='hub' href='http://mariomartinez.net/?pushpress=hub'/>
		<item>
		<title>Enlace simbólico a un directorio en Windows</title>
		<link>http://mariomartinez.net/2011/03/26/enlace-simbolico-a-un-directorio-en-windows/</link>
		<comments>http://mariomartinez.net/2011/03/26/enlace-simbolico-a-un-directorio-en-windows/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 22:57:25 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[Herramientas]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[enlace]]></category>
		<category><![CDATA[junction]]></category>
		<category><![CDATA[linkd]]></category>
		<category><![CDATA[mklink]]></category>
		<category><![CDATA[simbolico]]></category>
		<category><![CDATA[symlink]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://mariomartinez.net/?p=58</guid>
		<description><![CDATA[La utilidad mklink, incluida en las últimas versiones de Windows permite la creación de un enlace simbólico a un directorio, tal como como lo hace el clásico ln -s en los sistemas basados en Unix. La opción /j permite crear lo que en el mundo NTFS se conoce como junction point. La forma de ejecutar [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mariomartinez.net&amp;blog=18850867&amp;post=58&amp;subd=mariomartinezdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>La utilidad <code><a href="http://technet.microsoft.com/en-us/library/cc753194%28WS.10%29.aspx">mklink</a></code>, incluida en las últimas versiones de Windows permite la creación de un enlace simbólico a un directorio, tal como como lo hace el clásico <code>ln -s</code> en los sistemas basados en Unix. La opción <code>/j</code> permite crear lo que en el mundo NTFS se conoce como <em>junction point</em>. La forma de ejecutar el comando es la siguiente:</p>
<p><code>mklink /j dx Dropbox</code></p>
<p>En donde <code>dx</code> es el nombre del alias y <code>Dropbox</code> el nombre del directorio al cual se hace referencia. Esto resulta muy práctico, por ejemplo, cuando trabajo desde intérprete de comandos ya que permite, entre otras posibilidades, ejecutar comandos como el siguiente:</p>
<p><code>vim dx\todo.txt</code></p>
<p>¿Bonito, no?</p>
<p>Para las versiones anteriores de Windows existe un par de alternativas. La primera es <code><a href="http://support.microsoft.com/kb/205524/en-us">linkd.exe</a></code>, ahora descontinuada. Una segunda alternativa más completa y aún vigente es <code><a href="http://technet.microsoft.com/en-us/sysinternals/bb896768">junction.exe</a></code> que se mantiene gracias al gran trabajo de <a href="http://www.microsoft.com/presspass/exec/techfellow/Russinovich/default.mspx">Mark  Russinovich</a> y compañía en <em><a href="http://technet.microsoft.com/en-us/sysinternals">Sysinternals</a></em>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mariomartinezdotnet.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mariomartinezdotnet.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mariomartinezdotnet.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mariomartinezdotnet.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mariomartinezdotnet.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mariomartinezdotnet.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mariomartinezdotnet.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mariomartinezdotnet.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mariomartinezdotnet.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mariomartinezdotnet.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mariomartinezdotnet.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mariomartinezdotnet.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mariomartinezdotnet.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mariomartinezdotnet.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mariomartinez.net&amp;blog=18850867&amp;post=58&amp;subd=mariomartinezdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mariomartinez.net/2011/03/26/enlace-simbolico-a-un-directorio-en-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/476cfb8c80f395017fba7d24b3bfcc20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mcrmo</media:title>
		</media:content>
	</item>
		<item>
		<title>Extraer texto de un arreglo en C</title>
		<link>http://mariomartinez.net/2011/01/04/extraer-texto-de-un-arreglo-en-c/</link>
		<comments>http://mariomartinez.net/2011/01/04/extraer-texto-de-un-arreglo-en-c/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 22:22:52 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[arreglo]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[caracteres]]></category>
		<category><![CDATA[programación]]></category>
		<category><![CDATA[substr]]></category>

		<guid isPermaLink="false">http://mariomartinezdotnet.wordpress.com/?p=1</guid>
		<description><![CDATA[Por estos días estoy programando algunas cosas en C y me he encontrado con una pequeña sorpresa. La biblioteca estándar no cuenta con una función que, dado un arreglo de caracteres, extraiga un subconjunto de estos y los copie en un segundo arreglo, de manera similar a como lo hace la función substr de PHP. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mariomartinez.net&amp;blog=18850867&amp;post=1&amp;subd=mariomartinezdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Por estos días estoy programando algunas cosas en C y me he encontrado con una pequeña sorpresa. La biblioteca estándar no cuenta con una función que, dado un arreglo de caracteres, extraiga un subconjunto de estos y los copie en un segundo arreglo, de manera similar a como lo hace la función <code><a href="http://php.net/manual/en/function.substr.php">substr</a></code> de <a href="http://php.net/">PHP</a>. </p>
<p>Dado esto, escribí una simple función (<code>extraer</code>) que recibe tres parámetros: el arreglo de caracteres original y un par de delimitadores. Como resultado devuelve un puntero a un arreglo que contiene el subconjunto de caracteres deseado.</p>
<p>He aquí un programa completo que implementa esta función:</p>
<pre class="brush: cpp; gutter: false;">
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

char* extraer(char *s, int comienzo, int final) {
	int i, j;
	char *r;
	//Se reserva memoria para el nuevo arreglo
	r = (char *)malloc((final - comienzo)*sizeof(char) + 2);
	//Este bucle extrae los caracteres de 's' y los copia en 'r'
	for (i = comienzo, j = 0; i &lt;= final; i++, j++) {
		*(r + j) = *(s + i);
	}
	//No olvidar el caracter nulo al final del string
	*(r + j ) = '&#092;&#048;';
	return r;
}

main() {
	char *r;
	//Notar que el caracter inicial (H) esta en la posición 0
	r = extraer(&quot;Hola, mundo&quot;, 0, 3);
	printf(&quot;%s\n&quot;, r);
	free(r);
}
</pre>
<p>La llamada a la función se realiza dentro del <code>main()</code> de la siguiente manera:</p>
<pre class="brush: cpp; gutter: false;">
r = extraer(&quot;Hola mundo&quot;, 0, 3):
</pre>
<p>La cual devuelve un puntero al arreglo de caracteres que contiene el texto <code>"Hola"</code>. Notar que el delimitador inicial comienza en la posición 0 (cero), que indica la ubicación la letra &#8220;H&#8221; y termina en 3, que corresponde a la cuarta posición.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mariomartinezdotnet.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mariomartinezdotnet.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mariomartinezdotnet.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mariomartinezdotnet.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mariomartinezdotnet.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mariomartinezdotnet.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mariomartinezdotnet.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mariomartinezdotnet.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mariomartinezdotnet.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mariomartinezdotnet.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mariomartinezdotnet.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mariomartinezdotnet.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mariomartinezdotnet.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mariomartinezdotnet.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mariomartinez.net&amp;blog=18850867&amp;post=1&amp;subd=mariomartinezdotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mariomartinez.net/2011/01/04/extraer-texto-de-un-arreglo-en-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/476cfb8c80f395017fba7d24b3bfcc20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mcrmo</media:title>
		</media:content>
	</item>
	</channel>
</rss>
