<?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>A trial solution is found</title>
	<atom:link href="http://trialsolution.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://trialsolution.wordpress.com</link>
	<description>We few, we happy few, we love math</description>
	<lastBuildDate>Tue, 15 Nov 2011 14:19:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='trialsolution.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>A trial solution is found</title>
		<link>http://trialsolution.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://trialsolution.wordpress.com/osd.xml" title="A trial solution is found" />
	<atom:link rel='hub' href='http://trialsolution.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Polar rose</title>
		<link>http://trialsolution.wordpress.com/2011/01/02/polar-rose/</link>
		<comments>http://trialsolution.wordpress.com/2011/01/02/polar-rose/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 09:46:47 +0000</pubDate>
		<dc:creator>trialsolution</dc:creator>
				<category><![CDATA[math]]></category>
		<category><![CDATA[notes]]></category>
		<category><![CDATA[r]]></category>

		<guid isPermaLink="false">http://trialsolution.wordpress.com/?p=195</guid>
		<description><![CDATA[It&#8217;s fascinating to see how simple mathematical transformations look like in different coordinate systems.  &#8221;Polar rose&#8221; is the name of a mathematical curve &#8211; described by the polar equation: Below is a small code to draw it in R using &#8230; <a href="http://trialsolution.wordpress.com/2011/01/02/polar-rose/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=195&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s fascinating to see how simple mathematical transformations look like in different coordinate systems.  &#8221;Polar rose&#8221; is the name of a mathematical curve &#8211; described by the polar equation:</p>
<p><img src='http://s0.wp.com/latex.php?latex=r%28%5CPhi%29+%3D+a+%5Ccos%28k%5CPhi+%2B+%5Cphi_0%29+&amp;bg=ffffff&amp;fg=333333&amp;s=0' alt='r(&#92;Phi) = a &#92;cos(k&#92;Phi + &#92;phi_0) ' title='r(&#92;Phi) = a &#92;cos(k&#92;Phi + &#92;phi_0) ' class='latex' /></p>
<p>Below is a small code to draw it in R using the ggplot2 package:</p>
<p><pre class="brush: r;">
require(ggplot2)

#data points
p &lt;- data.frame(t=seq(-2*pi, 2*pi, 0.1))

#1.. drawing polar rose
c &lt;- ggplot(p, aes(x=t, y=cos(3*t)))
c + geom_line(colour=&quot;red&quot;, size=1.5) + coord_polar()

#2.. another one with sine
c &lt;- ggplot(p, aes(x=t, y=2*sin(4*t)))
c + geom_line(colour=&quot;red&quot;, size=1.5) + coord_polar()
</pre></p>
<p>&#8230;and the output<br />
<a href="http://trialsolution.files.wordpress.com/2011/01/polar_rose.jpg"><img src="http://trialsolution.files.wordpress.com/2011/01/polar_rose.jpg?w=300&#038;h=300" alt="" title="polar_rose" width="300" height="300" class="aligncenter size-medium wp-image-212" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trialsolution.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trialsolution.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trialsolution.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trialsolution.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trialsolution.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trialsolution.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trialsolution.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trialsolution.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trialsolution.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trialsolution.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trialsolution.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trialsolution.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trialsolution.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trialsolution.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=195&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trialsolution.wordpress.com/2011/01/02/polar-rose/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b820ef87ae0e81c52804f48c3cd79d10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">trialsolution</media:title>
		</media:content>

		<media:content url="http://trialsolution.files.wordpress.com/2011/01/polar_rose.jpg?w=300" medium="image">
			<media:title type="html">polar_rose</media:title>
		</media:content>
	</item>
		<item>
		<title>Search in multiple files with Vim</title>
		<link>http://trialsolution.wordpress.com/2010/07/17/search-in-multiple-files-with-vim/</link>
		<comments>http://trialsolution.wordpress.com/2010/07/17/search-in-multiple-files-with-vim/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 17:51:04 +0000</pubDate>
		<dc:creator>trialsolution</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[notes]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://trialsolution.wordpress.com/?p=178</guid>
		<description><![CDATA[Vim has a built-in feature to search over multiple files in a directory (even recursively across the sub-directories). Vim can use external applications (e.g. grep) to do the search, but as I&#8217;m using currently a portable version of Gvim, I&#8217;m &#8230; <a href="http://trialsolution.wordpress.com/2010/07/17/search-in-multiple-files-with-vim/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=178&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Vim has a built-in feature to search over multiple files in a directory (even recursively across the sub-directories).</p>
<p>Vim can use external applications (e.g. grep) to do the search, but as I&#8217;m using currently a <a href="http://portableapps.com/apps/development/gvim_portable">portable version</a> of Gvim, I&#8217;m more-or-less forced to use the built in search functionality. The general command look like:</p>
<p><code>:vim[grep][!] /{pattern}/[g][j] {file}</code></p>
<p>The [g] option tells vim to count all matches in a line, not just the first one. If the [j] option is given vim won&#8217;t jump to the first match in the file.</p>
<p>For a recursive search use <em>**</em>.</p>
<p><code>:vimgrep /solve/j **/*.gms</code></p>
<p>Vim puts all matches to the &#8220;quickfix list&#8221; that can be opened with the command</p>
<p><code>:cw</code></p>
<p>This command splits the buffer to two windows (viewports). Below you will find the quickfix list with file names and the lines where a match was found. Just hit <strong>RET</strong> and the selected file will be loaded in the upper window.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trialsolution.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trialsolution.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trialsolution.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trialsolution.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trialsolution.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trialsolution.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trialsolution.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trialsolution.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trialsolution.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trialsolution.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trialsolution.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trialsolution.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trialsolution.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trialsolution.wordpress.com/178/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=178&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trialsolution.wordpress.com/2010/07/17/search-in-multiple-files-with-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b820ef87ae0e81c52804f48c3cd79d10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">trialsolution</media:title>
		</media:content>
	</item>
		<item>
		<title>In gams: refer to set elements as values</title>
		<link>http://trialsolution.wordpress.com/2010/04/15/in-gams-refer-to-set-elements-as-values/</link>
		<comments>http://trialsolution.wordpress.com/2010/04/15/in-gams-refer-to-set-elements-as-values/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 07:41:20 +0000</pubDate>
		<dc:creator>trialsolution</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://trialsolution.wordpress.com/2010/04/15/in-gams-refer-to-set-elements-as-values/</guid>
		<description><![CDATA[In gams you have a set with numbers you would think that you can use them as &#8220;real&#8221; numbers, e.g. you can do calculations with them. But if you try to do so you&#8217;ll got error messages. Set elements can &#8230; <a href="http://trialsolution.wordpress.com/2010/04/15/in-gams-refer-to-set-elements-as-values/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=169&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In gams you have a set with numbers you would think that you can use them as &#8220;real&#8221; numbers, e.g. you can do calculations with them. But if you try to do so you&#8217;ll got error messages. Set elements can not be referred to directly as numbers.</p>
<p>But there is a special function <i>i.val</i> that you can use in these cases. Here comes an example to make it clear:<br />
<pre class="brush: python;">
set i /1, 20, 300, 4000/;

parameter p_tmp(i)  'to store i as values';


$ontext
*** this would generate error
*** 148  Dimension different - The symbol is referenced with more/less
***        indices as declared

p_tmp(i) = 3*i;
display  p_tmp;
$offtext

p_tmp(i) = i.val/100;
display  p_tmp;


</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trialsolution.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trialsolution.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trialsolution.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trialsolution.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trialsolution.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trialsolution.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trialsolution.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trialsolution.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trialsolution.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trialsolution.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trialsolution.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trialsolution.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trialsolution.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trialsolution.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=169&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trialsolution.wordpress.com/2010/04/15/in-gams-refer-to-set-elements-as-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b820ef87ae0e81c52804f48c3cd79d10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">trialsolution</media:title>
		</media:content>
	</item>
		<item>
		<title>Find text in multiple files</title>
		<link>http://trialsolution.wordpress.com/2009/12/09/find-text-in-multiple-files/</link>
		<comments>http://trialsolution.wordpress.com/2009/12/09/find-text-in-multiple-files/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 16:05:25 +0000</pubDate>
		<dc:creator>trialsolution</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://trialsolution.wordpress.com/?p=163</guid>
		<description><![CDATA[A grep alternative in Windows: findstr An example: findstr /i/n &#8220;DCOW&#8221; *.gms<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=163&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A grep alternative in Windows: <a href="http://technet.microsoft.com/en-us/library/bb490907.aspx">findstr</a></p>
<p>An example:</p>
<blockquote><p>findstr /i/n &#8220;DCOW&#8221; *.gms
</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trialsolution.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trialsolution.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trialsolution.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trialsolution.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trialsolution.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trialsolution.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trialsolution.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trialsolution.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trialsolution.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trialsolution.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trialsolution.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trialsolution.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trialsolution.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trialsolution.wordpress.com/163/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=163&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trialsolution.wordpress.com/2009/12/09/find-text-in-multiple-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b820ef87ae0e81c52804f48c3cd79d10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">trialsolution</media:title>
		</media:content>
	</item>
		<item>
		<title>View/create LXI files without the GAMS IDE</title>
		<link>http://trialsolution.wordpress.com/2009/11/03/viewcreate-lxi-files-without-the-gams-ide/</link>
		<comments>http://trialsolution.wordpress.com/2009/11/03/viewcreate-lxi-files-without-the-gams-ide/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 16:48:08 +0000</pubDate>
		<dc:creator>trialsolution</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[gams]]></category>

		<guid isPermaLink="false">http://trialsolution.wordpress.com/?p=151</guid>
		<description><![CDATA[Shiro Takeda went one step further in making a better alternative to GAMS IDE. He added a new functionality to his gams emacs mode. From now on, you can view and create LXI files within emacs. To invoke the LXI &#8230; <a href="http://trialsolution.wordpress.com/2009/11/03/viewcreate-lxi-files-without-the-gams-ide/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=151&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Shiro Takeda went one step further in making a better alternative to GAMS IDE. He added a new functionality to his <a href="http://shirotakeda.org/home/gams/gams-mode.html">gams emacs mode</a>. From now on, you can view and create LXI files within emacs.</p>
<p>To invoke the LXI mode press <em>C-c C-x</em> (<del datetime="2010-07-17T17:54:10+00:00">it&#8217;s strange that there&#8217;s no menu item for it, so it&#8217;s good to keep in mind this combination</del>update: now it&#8217;s added to the GAMS menu). The LXI file helps you to navigate through the gams list file. It contains the information where to find the most interesting/important parts (solution reports, variables, equations etc.). When started the LXI mode shows a tree structure on the left-hand side. This gives you an overview and an easy way to walk through the list file by clicking on those parts of the tree that you&#8217;re interested in.</p>
<p>Together with the outline mode (which is in my opinion better in investigating data and results) you have flexibile tools to understand what your model tells you.</p>
<p>Screenshots <a href="http://shirotakeda.org/home/gams/gams-mode/gams-screen.html">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trialsolution.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trialsolution.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trialsolution.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trialsolution.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trialsolution.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trialsolution.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trialsolution.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trialsolution.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trialsolution.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trialsolution.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trialsolution.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trialsolution.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trialsolution.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trialsolution.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=151&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trialsolution.wordpress.com/2009/11/03/viewcreate-lxi-files-without-the-gams-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b820ef87ae0e81c52804f48c3cd79d10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">trialsolution</media:title>
		</media:content>
	</item>
		<item>
		<title>Text editors for GAMS coding</title>
		<link>http://trialsolution.wordpress.com/2009/08/27/text-editors-for-gams-coding/</link>
		<comments>http://trialsolution.wordpress.com/2009/08/27/text-editors-for-gams-coding/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 13:22:16 +0000</pubDate>
		<dc:creator>trialsolution</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[notes]]></category>
		<category><![CDATA[gams]]></category>

		<guid isPermaLink="false">http://trialsolution.wordpress.com/?p=131</guid>
		<description><![CDATA[Recently I&#8217;m working in a very restricted Windows environment, and so I needed a portable text editor that requires no installation (as I don&#8217;t have the permissions to add softwares to the system). My favourite so far was the portable &#8230; <a href="http://trialsolution.wordpress.com/2009/08/27/text-editors-for-gams-coding/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=131&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;m working in a very restricted Windows environment, and so I needed a portable text editor that requires no installation (as I don&#8217;t have the permissions to add softwares to the system).</p>
<p>My favourite so far was the <a href="http://portablegvim.sourceforge.net/">portable edition of Gvim</a> (linux users know what I&#8217;m talking about). But today I found <a href="http://www.pspad.com/en/screenshot.htm">PSPad </a>- a really handy editor with tons of features. The best in these editors is that you can add syntax highlighting rules, and then you can use them to write code in less known languages (e.g GAMS).</p>
<p><strong>Update 4: </strong>Many thanks to Henry who sent me his own gams.vim and so helped me to inprove the syntax file.  Based on his version, I was able to add some new features. Follow the development on <a href="http://github.com/trialsolution/gamsvim" target="_blank">github</a>.</p>
<p><strong>Update 3: </strong>I&#8217;ve transferred the project to github:</p>
<p><a href="http://github.com/trialsolution/gamsvim">http://github.com/trialsolution/gamsvim</a></p>
<p><strong>Update 2:</strong> The code was reviewed and uploaded to vim.org. Please find it here:<br />
<a href="http://www.vim.org/scripts/script.php?script_id=3127">http://www.vim.org/scripts/script.php?script_id=3127</a></p>
<p><strong>Update 1:</strong> I found it in an old <a href="http://jjinux.blogspot.com/2007/02/vim-soft-wrap.html">post</a> but I post it because I was looking for a good line wrap setting for gvim for quite some time. To set a nice word wrapping in gvim:</p>
<blockquote><p>:set wrap linebreak textwidth=0</p></blockquote>
<p>You can find my GAMS syntax files for these two applications below. Feel free to modify it if you like.</p>
<p>1. Syntax file for gvim. Instructions: simply save the code as &#8216;gams.vim&#8217; and place it into the</p>
<blockquote><p>\GVimPortable\App\vim\vim71\syntax</p></blockquote>
<p>folder</p>
<p>2. Syntax file for PSPad. Save the code as &#8216;GAMS.ini&#8217; in the &#8216;\pspad\syntax&#8217; folder, then you can configure the colors in the &#8216;Settings\Highlighters settings&#8217; menu.</p>
<p><pre class="brush: python;">
;PSPad user HighLighter definition file
[Settings]
Name=GAMS
HTMLGroup=0
Label=1
FileType=.gms,.lst
CommentString=*
PocoComment=1
2StarsComment=1
IndentChar={
UnIndentChar=}
TabWidth=4
SingleQuote=1
DoubleQuote=1
KeyWordChars=-_$
CodeExplorer=ftUnknown
[KeyWords]
ABS=
acos=
acosh=
Alias=
asin=
asinh=
atan=
atan2=
atanh=
ceil=
cos=
cosh=
ctime=
display=
div=
Equations=
equations=
exp=
floor=
log=
log10=
max=
min=
Model=
option=
Parameter=
Parameters=
precision=
round=
Scalar=
Set=
sets=
sin=
sinh=
Solve=
sqrt=
Table=
tables=
tan=
tanh=
time=
trunc=
uniform=
Variable=
variables=
[ReservedWords]
[KeyWords2]
abort=
By=
Downto=
else=
Elseif=
file=
for=
if=
loop=
put=
putclose=
repeat=
to=
until=
while=
xxpto=
[KeyWords3]
$call=
$eval=
$if not=
$include=
$option=

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trialsolution.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trialsolution.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trialsolution.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trialsolution.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trialsolution.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trialsolution.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trialsolution.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trialsolution.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trialsolution.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trialsolution.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trialsolution.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trialsolution.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trialsolution.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trialsolution.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=131&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trialsolution.wordpress.com/2009/08/27/text-editors-for-gams-coding/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b820ef87ae0e81c52804f48c3cd79d10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">trialsolution</media:title>
		</media:content>
	</item>
		<item>
		<title>Debugging GAMS code</title>
		<link>http://trialsolution.wordpress.com/2009/08/24/debugging-gams-code/</link>
		<comments>http://trialsolution.wordpress.com/2009/08/24/debugging-gams-code/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 08:44:55 +0000</pubDate>
		<dc:creator>trialsolution</dc:creator>
				<category><![CDATA[notes]]></category>
		<category><![CDATA[gams]]></category>

		<guid isPermaLink="false">http://trialsolution.wordpress.com/?p=125</guid>
		<description><![CDATA[It&#8217;s good to feed Erwin Kalvelagen&#8217;s blog into your rss reader, because you can always find some useful GAMS tricks there. Or if you have some free time, read the longer posts dealing with interesting topics in optimization. Erwin has recently published a post &#8230; <a href="http://trialsolution.wordpress.com/2009/08/24/debugging-gams-code/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=125&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s good to feed Erwin Kalvelagen&#8217;s <a href="http://yetanothermathprogrammingconsultant.blogspot.com/">blog</a> into your rss reader, because you can always find some useful GAMS tricks there. Or if you have some free time, read the longer posts dealing with interesting topics in optimization.</p>
<p>Erwin has recently published a <a href="http://yetanothermathprogrammingconsultant.blogspot.com/2009/08/gams-debugging-tools.html">post</a> about debugging GAMS codes.</p>
<p>An advice of him is to use the <strong>$stop </strong>statement to stop the execution in a certain point and then save the current state of the model into a gdx file. He also talks about the difficulties of writing loops in GAMS.</p>
<p><a href="http://amsterdamoptimization.com/pdf/GAMS-GDX%20Day%201%20Morning.pdf">Here </a>you can find some additional info about gdx files and creating loops.</p>
<p><strong>Update: </strong>Another gams insider&#8217;s blog is <a href="http://blog.modelworks.ch/">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trialsolution.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trialsolution.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trialsolution.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trialsolution.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trialsolution.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trialsolution.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trialsolution.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trialsolution.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trialsolution.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trialsolution.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trialsolution.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trialsolution.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trialsolution.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trialsolution.wordpress.com/125/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=125&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trialsolution.wordpress.com/2009/08/24/debugging-gams-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b820ef87ae0e81c52804f48c3cd79d10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">trialsolution</media:title>
		</media:content>
	</item>
		<item>
		<title>My new project is released!</title>
		<link>http://trialsolution.wordpress.com/2009/05/20/my-new-project-is-released/</link>
		<comments>http://trialsolution.wordpress.com/2009/05/20/my-new-project-is-released/#comments</comments>
		<pubDate>Wed, 20 May 2009 11:21:33 +0000</pubDate>
		<dc:creator>trialsolution</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[gdx2oo]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://trialsolution.wordpress.com/?p=116</guid>
		<description><![CDATA[This post is really an announcement. In a recent post I talked about a project I was working on, and later I was asked in a comment whether the code would be published. This question was the final incentive to &#8230; <a href="http://trialsolution.wordpress.com/2009/05/20/my-new-project-is-released/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=116&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post is really an announcement. In a <a href="http://trialsolution.wordpress.com/2009/02/13/gedit-as-a-python-ide/" target="_blank">recent post</a> I talked about a project I was working on, and later I was asked in a comment whether the code would be published. This question was the final incentive to register for a sourceforge site and let the project go.</p>
<p>The project aims to develop a small utility that converts gdx data files into open office spreadsheets. It&#8217;s meant to be an alternative of the existing <a href="www.gams.com/dd/docs/tools/gdx2xls.pdf">gdx2xls</a> utility for Linux users. Now, we Linux users are able to convert our data files into human readable spreadsheets.</p>
<p>So, check out my <a href="http://sourceforge.net/projects/gdx2oo/">new project</a> on sourceforge.net if you&#8217;re interested!</p>
<p>Comments, suggestions, remarks are welcome, as always.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trialsolution.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trialsolution.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trialsolution.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trialsolution.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trialsolution.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trialsolution.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trialsolution.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trialsolution.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trialsolution.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trialsolution.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trialsolution.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trialsolution.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trialsolution.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trialsolution.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=116&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trialsolution.wordpress.com/2009/05/20/my-new-project-is-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b820ef87ae0e81c52804f48c3cd79d10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">trialsolution</media:title>
		</media:content>
	</item>
		<item>
		<title>DVD+RW doesn&#8217;t need to be erased</title>
		<link>http://trialsolution.wordpress.com/2009/02/25/dvdrw-doesnt-need-to-be-erased/</link>
		<comments>http://trialsolution.wordpress.com/2009/02/25/dvdrw-doesnt-need-to-be-erased/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 08:11:13 +0000</pubDate>
		<dc:creator>trialsolution</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[notes]]></category>
		<category><![CDATA[dvd]]></category>

		<guid isPermaLink="false">http://trialsolution.wordpress.com/2009/02/25/dvdrw-doesnt-need-to-be-erased/</guid>
		<description><![CDATA[I accidentally ran into this issue when I wanted to reuse a DVD+RW disk: DVD+RW disks do not support blanking (erasing). You only have to overwrite them without erasing. When I inserted a DVD+RW in the drive and wanted to &#8230; <a href="http://trialsolution.wordpress.com/2009/02/25/dvdrw-doesnt-need-to-be-erased/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=113&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I accidentally ran into this issue when I wanted to reuse a DVD+RW disk: DVD+RW disks do not support blanking (erasing). You only have to overwrite them without erasing.</p>
<p>When I inserted a DVD+RW in the drive and wanted to erase it with brasero, the application sent me a pop-up window with an error message and ejected the disk. To find out what happened I opened a terminal and typed:<br />
<blockquote>cdrecord dev=/dev/dvd blank=all</p></blockquote>
<p>then I got the error message:<br />
<blockquote>cdrecord: OPC failed.<br />Error: this media does not support blanking, ignoring.<br />This drive or media does not support the &#8216;BLANK media&#8217; command<br />cdrecord: Cannot blank disk, aborting.</p></blockquote>
<p>After googling it a bit I found <a href="http://club.cdfreaks.com/f59/unable-erase-dvd-rw-185336/#post1480120">this</a> post that calmed me down. DVD+RW&#8217;s are only need to be overwritten. So I simply started brasero again and burned a new project onto the disk.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=106a2799-0c84-4956-9d78-50b608669288" /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trialsolution.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trialsolution.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trialsolution.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trialsolution.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trialsolution.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trialsolution.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trialsolution.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trialsolution.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trialsolution.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trialsolution.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trialsolution.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trialsolution.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trialsolution.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trialsolution.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=113&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trialsolution.wordpress.com/2009/02/25/dvdrw-doesnt-need-to-be-erased/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b820ef87ae0e81c52804f48c3cd79d10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">trialsolution</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/pixy.gif?x-id=106a2799-0c84-4956-9d78-50b608669288" medium="image" />
	</item>
		<item>
		<title>Convert avi to dvd with command line tools</title>
		<link>http://trialsolution.wordpress.com/2009/02/24/convert-avi-to-dvd-with-command-line-tools/</link>
		<comments>http://trialsolution.wordpress.com/2009/02/24/convert-avi-to-dvd-with-command-line-tools/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 12:40:13 +0000</pubDate>
		<dc:creator>trialsolution</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[notes]]></category>
		<category><![CDATA[avi]]></category>
		<category><![CDATA[dvd]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://trialsolution.wordpress.com/?p=88</guid>
		<description><![CDATA[Assume you have a divx movie (e.g. sneakers.avi) and two subtitle files (sneakersHUN.srt, sneakersENG.srt) that you want to convert into dvd format. In this blog entry I&#8217;ll only use command line tools. This is because there&#8217;s no need to write &#8230; <a href="http://trialsolution.wordpress.com/2009/02/24/convert-avi-to-dvd-with-command-line-tools/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=88&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Assume you have a divx movie (e.g. sneakers.avi) and two subtitle files (sneakersHUN.srt, sneakersENG.srt) that you want to convert into dvd format. In this blog entry I&#8217;ll only use command line tools. This is because there&#8217;s no need to write another &#8220;How to convert avi to dvd with Devede&#8221; article, and because most GUI tools available in Ubuntu are simple graphical frontends of ffmpeg, mencoder and dvdauthor (the command line tools described bellow).</p>
<p>Let&#8217;s get down to business:</p>
<p>1. Convert your .avi file with ffmpeg or mencoder to a suitable .mpg format</p>
<p>Using ffmpeg is less complicated because it needs much less command line options. As an example (converting an avi file into a pal dvd format):</p>
<blockquote><p>ffmpeg -i film.avi -aspect 4:3 -target pal-dvd dvd.mpg</p></blockquote>
<p>If using mencoder, a lot of command line options have to be added. To make my life easier, I use a bash script in that I can simply change the file name, aspect ratio and what else is needed. Here&#8217;s the script:</p>
<blockquote>
<pre style="font:inherit;">#! /bin/bash
# bash script for creating a pal dvd
# movie is sneakers!

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
-vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 \
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
keyint=15:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 25 \
-o sneakers.mpg sneakers.avi</pre>
</blockquote>
<p>Notes: the DVD format is heavily constrained, i.e. bitrates and screen sizes are pre-defined. Take a look at <a title="format constraints" href="http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-vcd-dvd.html" target="_blank">this table</a>.</p>
<p>2. Add the subtitles with spumux</p>
<ul>
<li>Create two xml files with the contents below, and save them as &#8220;spumuxHUN.xml&#8221; and &#8220;spumuxENG.xml&#8221; (one for each language) . <pre class="brush: xml;">
&lt;subpictures&gt;
    &lt;stream&gt;
       &lt;textsub filename=&quot;sneakersHUN.srt&quot; characterset=&quot;ISO8859-2&quot;
                    fontsize=&quot;28.0&quot; font=&quot;devedesans.ttf&quot; horizontal-alignment=&quot;left&quot;
                    vertical-alignment=&quot;bottom&quot; left-margin=&quot;60&quot; right-margin=&quot;60&quot;
                    top-margin=&quot;20&quot; bottom-margin=&quot;30&quot; subtitle-fps=&quot;25&quot;
                    movie-fps=&quot;25&quot; movie-width=&quot;720&quot; movie-height=&quot;574&quot;
                    force=&quot;yes&quot;
        /&gt;
     &lt;/stream&gt;
&lt;/subpictures&gt;
</pre>
<p>Notes: the xml files contain the necessary information for spumux. Option names speak for themselves. One remark to &#8220;font=&#8221;: you can use whatever fonts you like, only copy the .ttf file into the ~/.spumux directory (devedesans.ttf is the only font in Ubuntu that&#8217;s available by default).</li>
<li>Create an mpg file with the subtitles embedded:<br />
<blockquote><p>
spumux -s0 spumuxHUN.xml  sneakersHUN.mpg<br />
rm sneakers.mpg<br />
spumux -s1 spumuxENG.xml  sneakersHUNENG.mpg<br />
rm sneakersHUN.mpg</p></blockquote>
</li>
</ul>
<p>3. Create the dvd file system with dvdauthor in two steps:</p>
<ul>
<li> Create a simple text file with the following content and save it as auth.xml <pre class="brush: xml;">
&lt;dvdauthor&gt;
    &lt;vmgm /&gt;
    &lt;titleset&gt;
        &lt;titles&gt;
            &lt;subpicture lang=&quot;hu&quot;/&gt;
            &lt;subpicture lang=&quot;en&quot; /&gt;
            &lt;pgc&gt;
                &lt;vob file=&quot;sneakersHUNENG.mpg&quot; /&gt;
            &lt;/pgc&gt;
        &lt;/titles&gt;
    &lt;/titleset&gt;
&lt;/dvdauthor&gt;
</pre></li>
<li> type the following into a terminal:<br />
<blockquote><p>dvdauthor -o mydvd -x auth.xml</p></blockquote>
<p>Note: this will create the dvd filesystem in the mydvd folder.</p>
<ul>4. Burn the dvd! A simple command line tool to do this:</p>
<blockquote><p>growisofs -Z /dev/dvd -dvd-video mydvd/</p></blockquote>
<p>Be aware that the -Z option will erase the disk if it&#8217;s not empty!</ul>
</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/trialsolution.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/trialsolution.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/trialsolution.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/trialsolution.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/trialsolution.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/trialsolution.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/trialsolution.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/trialsolution.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/trialsolution.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/trialsolution.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/trialsolution.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/trialsolution.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/trialsolution.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/trialsolution.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=trialsolution.wordpress.com&amp;blog=6232886&amp;post=88&amp;subd=trialsolution&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://trialsolution.wordpress.com/2009/02/24/convert-avi-to-dvd-with-command-line-tools/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b820ef87ae0e81c52804f48c3cd79d10?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">trialsolution</media:title>
		</media:content>
	</item>
	</channel>
</rss>
