<?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>Techtonet &#187; Code</title>
	<atom:link href="http://techtonet.com/category/code/feed" rel="self" type="application/rss+xml" />
	<link>http://techtonet.com</link>
	<description>L'observatoire technologique</description>
	<lastBuildDate>Sun, 15 Apr 2012 13:58:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Code Anywhere with Chrome</title>
		<link>http://techtonet.com/code-chrome/internet</link>
		<comments>http://techtonet.com/code-chrome/internet#comments</comments>
		<pubDate>Sun, 15 Apr 2012 13:57:26 +0000</pubDate>
		<dc:creator>raph</dc:creator>
				<category><![CDATA[Astuces développement]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://techtonet.com/?p=498</guid>
		<description><![CDATA[http://diagrams.seaquail.net/ https://www.myquerybuilder.com/login.php?fail=req&#38;accesscheck=%2Fmqb%2Fselectqueryeditor.php https://codeanywhere.net/editor/ http://c9.io/ https://chrome.google.com/webstore/detail/hgmloofddffdnphfgcellkdfbfbjeloo]]></description>
			<content:encoded><![CDATA[<div><a href="http://diagrams.seaquail.net/" target="_blank">http://diagrams.seaquail.net/</a><br />
<a href="https://www.myquerybuilder.com/login.php?fail=req&amp;accesscheck=%2Fmqb%2Fselectqueryeditor.php" target="_blank">https://www.myquerybuilder.com/login.php?fail=req&amp;accesscheck=%2Fmqb%2Fselectqueryeditor.php</a></div>
<div><a href="https://codeanywhere.net/editor/" target="_blank">https://codeanywhere.net/editor/</a></div>
<div><a href="http://c9.io/" target="_blank">http://c9.io/</a></div>
<div><a href="https://chrome.google.com/webstore/detail/hgmloofddffdnphfgcellkdfbfbjeloo" target="_blank">https://chrome.google.com/webstore/detail/hgmloofddffdnphfgcellkdfbfbjeloo</a></div>
]]></content:encoded>
			<wfw:commentRss>http://techtonet.com/code-chrome/internet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross testing</title>
		<link>http://techtonet.com/cross-testing/internet</link>
		<comments>http://techtonet.com/cross-testing/internet#comments</comments>
		<pubDate>Mon, 02 Jan 2012 18:08:20 +0000</pubDate>
		<dc:creator>raph</dc:creator>
				<category><![CDATA[Astuces développement]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://techtonet.com/?p=487</guid>
		<description><![CDATA[http://www.browserstack.com/]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.browserstack.com/">http://www.browserstack.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://techtonet.com/cross-testing/internet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Theme in responsive design</title>
		<link>http://techtonet.com/wordpress-theme-responsive-design/internet</link>
		<comments>http://techtonet.com/wordpress-theme-responsive-design/internet#comments</comments>
		<pubDate>Mon, 12 Sep 2011 10:07:51 +0000</pubDate>
		<dc:creator>raph</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://techtonet.com/?p=458</guid>
		<description><![CDATA[http://yoko.elmastudio.de/ &#160; and other responsive design : http://mediaqueri.es/]]></description>
			<content:encoded><![CDATA[<p><a href="http://yoko.elmastudio.de/">http://yoko.elmastudio.de/</a></p>
<p>&nbsp;</p>
<p>and other responsive design :</p>
<p><a href="http://mediaqueri.es/">http://mediaqueri.es/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://techtonet.com/wordpress-theme-responsive-design/internet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Gtk All In One</title>
		<link>http://techtonet.com/python-gtk/code</link>
		<comments>http://techtonet.com/python-gtk/code#comments</comments>
		<pubDate>Wed, 27 Apr 2011 08:03:33 +0000</pubDate>
		<dc:creator>raph</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://techtonet.com/?p=422</guid>
		<description><![CDATA[Tout le package pour installer facilement GTK Python. http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/]]></description>
			<content:encoded><![CDATA[<p>Tout le package pour installer facilement GTK Python.</p>
<p><a href="http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/" target="_blank">http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://techtonet.com/python-gtk/code/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command to create an .mo file from a .po file</title>
		<link>http://techtonet.com/command-to-create-an-mo-file-from-a-po-file/code</link>
		<comments>http://techtonet.com/command-to-create-an-mo-file-from-a-po-file/code#comments</comments>
		<pubDate>Sun, 10 Apr 2011 00:12:17 +0000</pubDate>
		<dc:creator>raph</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://techtonet.com/?p=351</guid>
		<description><![CDATA[To generate a translation dictionary you can use this command to create a .mo file from a .po file msgfmt -o mytranslatefile.mo mytranslatefile.po]]></description>
			<content:encoded><![CDATA[<p>To generate a translation dictionary you can use this command to create a .mo file from a .po file<br />
<em>msgfmt -o mytranslatefile.mo mytranslatefile.po</em></p>
]]></content:encoded>
			<wfw:commentRss>http://techtonet.com/command-to-create-an-mo-file-from-a-po-file/code/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Video Length with mplayer</title>
		<link>http://techtonet.com/get-video-length-with-mplayer/code</link>
		<comments>http://techtonet.com/get-video-length-with-mplayer/code#comments</comments>
		<pubDate>Sun, 10 Apr 2011 00:06:44 +0000</pubDate>
		<dc:creator>raph</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://techtonet.com/?p=349</guid>
		<description><![CDATA[Here is the command to get the length of a video file mplayer -frames 0 -identify myvideo &#62; /dev/stdout &#124; grep -i ID_LENGTH You can use this function to get the time in hh:mm:ss format function getLength($file) { // Get Time $cmd = MPLAYER." -frames 0 -identify ".$file." &#62; /dev/stdout &#124; grep -i ID_LENGTH "; &#8230; <a href="http://techtonet.com/get-video-length-with-mplayer/code">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is the command to get the length of a video file</p>
<p><em>mplayer -frames 0 -identify myvideo &gt; /dev/stdout | grep -i ID_LENGTH</em></p>
<p>You can use this function to get the time in hh:mm:ss format</p>
<pre name="code" class="php">	function getLength($file) {
		// Get Time
		$cmd = MPLAYER." -frames 0 -identify ".$file." &gt; /dev/stdout | grep -i ID_LENGTH ";
	    $duration = exec($cmd);
		$duration = str_replace("ID_LENGTH=", "", $duration);
		$duration = explode(".", $duration);
		$duration = array_shift($duration);
		$durationToTime = $this-&gt;Sec2Time($duration);
		$length = str_pad((int) $durationToTime["hours"],2,"0",STR_PAD_LEFT).":".str_pad((int) $durationToTime["minutes"],2,"0",STR_PAD_LEFT).":".str_pad((int) $durationToTime["seconds"],2,"0",STR_PAD_LEFT);
		return $length;
	}</pre>
<p><a href="http://techtonet.com/wp-content/uploads/2011/04/mplayer_logo.png"><img class="alignnone size-medium wp-image-372" title="mplayer_logo" src="http://techtonet.com/wp-content/uploads/2011/04/mplayer_logo-300x212.png" alt="" width="300" height="212" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://techtonet.com/get-video-length-with-mplayer/code/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get a Snapshot with ffmpeg</title>
		<link>http://techtonet.com/get-a-snapshot-with-ffmpeg/code</link>
		<comments>http://techtonet.com/get-a-snapshot-with-ffmpeg/code#comments</comments>
		<pubDate>Sat, 09 Apr 2011 23:57:44 +0000</pubDate>
		<dc:creator>raph</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://techtonet.com/?p=346</guid>
		<description><![CDATA[You can use this command to make a snapshot with ffmpeg : ffmpeg -i myvideofile -vcodec png -vframes 1 -an -f rawvideo -s 320&#215;240 -ss 00:00:02 mysnapshot.png change the -ss option to get the snapshot at a different time in the video change the -vframes option to get multiple snapshot.]]></description>
			<content:encoded><![CDATA[<p>You can use this command to make a snapshot with ffmpeg :<br />
<em>ffmpeg -i myvideofile -vcodec png -vframes 1 -an -f rawvideo -s 320&#215;240 -ss 00:00:02 mysnapshot.png</em></p>
<p>change the -ss option to get the snapshot at a different time in the video<br />
change the -vframes option to get multiple snapshot.</p>
<p><a href="http://techtonet.com/wp-content/uploads/2011/04/ffmpeg.png"><img class="alignnone size-medium wp-image-367" title="ffmpeg" src="http://techtonet.com/wp-content/uploads/2011/04/ffmpeg-300x73.png" alt="" width="300" height="73" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://techtonet.com/get-a-snapshot-with-ffmpeg/code/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Video Length with ffmeg</title>
		<link>http://techtonet.com/get-video-length-with-ffmeg/code</link>
		<comments>http://techtonet.com/get-video-length-with-ffmeg/code#comments</comments>
		<pubDate>Sat, 09 Apr 2011 23:45:56 +0000</pubDate>
		<dc:creator>raph</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://techtonet.com/?p=341</guid>
		<description><![CDATA[Here is the command to get the length of a video file ffmpeg -i myfile 2&#62;/dev/stdout &#124; grep -i duration You can use this function to get the time in hh:mm:ss format function getLength($file) { if (is_file($file)) { // Get Length $cmd = "ffmpeg -i $file 2&#62;/dev/stdout &#124; grep -i duration"; $duration = system($cmd); $duration &#8230; <a href="http://techtonet.com/get-video-length-with-ffmeg/code">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here is the command to get the length of a video file</p>
<p><em>ffmpeg -i myfile 2&gt;/dev/stdout | grep -i duration</em></p>
<p>You can use this function to get the time in hh:mm:ss format</p>
<pre name="code" class="php">	function getLength($file) {
		if (is_file($file)) {
			// Get Length
		    $cmd = "ffmpeg -i $file 2&gt;/dev/stdout | grep -i duration";
		    $duration = system($cmd);

		    $duration = explode(",", trim($duration));
		    $tabTime = explode(":", $duration[0]);
		    $mediaLength = $tabTime[1].':'.$tabTime[2].':'.substr($tabTime[3], 0, 2);

		    $mediaLength = str_replace(" ", "", $mediaLength);
			return $mediaLength;
		}
	}</pre>
<p><a href="http://techtonet.com/wp-content/uploads/2011/04/ffmpeg.jpg"><img class="alignnone size-medium wp-image-383" title="ffmpeg" src="http://techtonet.com/wp-content/uploads/2011/04/ffmpeg-300x95.jpg" alt="" width="300" height="95" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://techtonet.com/get-video-length-with-ffmeg/code/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Php String Url Format</title>
		<link>http://techtonet.com/php-string-url-format/code</link>
		<comments>http://techtonet.com/php-string-url-format/code#comments</comments>
		<pubDate>Sat, 09 Apr 2011 23:08:34 +0000</pubDate>
		<dc:creator>raph</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Php]]></category>

		<guid isPermaLink="false">http://techtonet.com/?p=323</guid>
		<description><![CDATA[A function used to format a string into url string function urlFormat($str) { $str = mb_strtolower($str, 'UTF-8'); $str = str_replace( array( 'à', 'â', 'ä', 'á', 'ã', 'å', 'î', 'ï', 'ì', 'í', 'ô', 'ö', 'ò', 'ó', 'õ', 'ø', 'ù', 'û', 'ü', 'ú', 'é', 'è', 'ê', 'ë', 'ç', 'ÿ', 'ñ', 'À', 'Â', 'Ä', 'Á', 'Ã', 'Å', 'Î', &#8230; <a href="http://techtonet.com/php-string-url-format/code">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A function used to format a string into url string</p>
<pre name="code" class="php">
function urlFormat($str) {
	$str = mb_strtolower($str, 'UTF-8');
	$str = str_replace(
	       array(
	            'à', 'â', 'ä', 'á', 'ã', 'å',
	            'î', 'ï', 'ì', 'í',
	            'ô', 'ö', 'ò', 'ó', 'õ', 'ø',
	            'ù', 'û', 'ü', 'ú',
	            'é', 'è', 'ê', 'ë',
	            'ç', 'ÿ', 'ñ',
	            'À', 'Â', 'Ä', 'Á', 'Ã', 'Å',
	            'Î', 'Ï', 'Ì', 'Í',
	            'Ô', 'ö', 'Ò', 'Ó', 'Õ', 'Ø',
	            'Ù', 'Û', 'Ü', 'Ú',
	            'É', 'È', 'Ê', 'Ë',
	            'Ç', 'Ý', 'Ñ',
	       ),
	       array(
	            'a', 'a', 'a', 'a', 'a', 'a',
	            'i', 'i', 'i', 'i',
	            'o', 'o', 'o', 'o', 'o', 'o',
	            'u', 'u', 'u', 'u',
	            'e', 'e', 'e', 'e',
	            'c', 'y', 'n',
	            'A', 'A', 'A', 'A', 'A', 'A',
	            'I', 'I', 'I', 'I',
	            'O', 'O', 'O', 'O', 'O', 'O',
	            'U', 'U', 'U', 'U',
	            'E', 'E', 'E', 'E',
	            'C', 'Y', 'N',
	        ),
	        $str
	);

	str = ereg_replace("[^[:alnum:]]+", '-', $str);
	$str = ereg_replace("[-]+", '-', $str);
	$str = ereg_replace("[-]$", '', $str);

	return $str:
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://techtonet.com/php-string-url-format/code/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend_Date : Get date with a week number and a Year</title>
		<link>http://techtonet.com/get-date-with-a-week-number-and-a-year-with-zend_date/code</link>
		<comments>http://techtonet.com/get-date-with-a-week-number-and-a-year-with-zend_date/code#comments</comments>
		<pubDate>Sat, 09 Apr 2011 21:19:57 +0000</pubDate>
		<dc:creator>raph</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://techtonet.com/?p=297</guid>
		<description><![CDATA[Get the date with only a week number and a year. It return the date first day of the week. You can change the first day of the week. $_dateStart = 1; // 1 for Monday $_week = 16; $_year = 2011; $date = new Zend_Date(); $date-&#62;set($_dayStart, Zend_Date::WEEKDAY_DIGIT); $date-&#62;set($_week, Zend_Date::WEEK); $date-&#62;set($_year, Zend_Date::YEAR); if ($_dayStart != &#8230; <a href="http://techtonet.com/get-date-with-a-week-number-and-a-year-with-zend_date/code">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Get the date with only a week number and a year. It return the date first day of the week.<br />
You can change the first day of the week.</p>
<pre name="code" class="php">$_dateStart = 1; // 1 for Monday
$_week = 16;
$_year = 2011;

$date = new Zend_Date();
$date-&gt;set($_dayStart, Zend_Date::WEEKDAY_DIGIT);
$date-&gt;set($_week, Zend_Date::WEEK);
$date-&gt;set($_year, Zend_Date::YEAR);
if ($_dayStart != 1) {
	$date-&gt;sub(1, Zend_Date::WEEK);
}
echo $date-&gt;get("yyyy-MM-dd");</pre>
<p>displays: <em>2011-04-18</em></p>
<p><a href="http://techtonet.com/wp-content/uploads/2011/04/ZendFramework-logo-1024x271.png"><img class="alignnone size-medium wp-image-378" title="ZendFramework-logo-1024x271" src="http://techtonet.com/wp-content/uploads/2011/04/ZendFramework-logo-1024x271-300x79.png" alt="" width="300" height="79" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://techtonet.com/get-date-with-a-week-number-and-a-year-with-zend_date/code/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

