<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7971969401162346842</id><updated>2011-09-02T06:21:52.281-07:00</updated><category term='C++'/><category term='linux'/><category term='matlab'/><category term='gnuplot'/><category term='firefox'/><category term='xming'/><category term='multiple lines of comments'/><category term='numerical computation'/><category term='control'/><category term='keyboard shortcuts'/><category term='emacs'/><category term='gcc preprocessor'/><category term='glibc'/><category term='valgrind'/><category term='octave'/><category term='programming'/><category term='ssh'/><category term='real time control'/><category term='youtube'/><category term='g++'/><category term='bash'/><category term='greasemonkey'/><category term='problem'/><category term='gnome'/><title type='text'>Work</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>33</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-936529944007102083</id><published>2009-02-19T02:25:00.000-08:00</published><updated>2009-02-19T02:34:21.114-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gnuplot'/><title type='text'>Gnuplot available point types</title><content type='html'>I keep forgetting the point types available in gnuplot and end up invoking the help each time I have to figure out which integer corresponds to which available point type. I have a real bad case of bad memory ( if that made any sense at all ). Anyways here is what you have to do. Invoke gnuplot at command prompt and issue the command:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;test&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;that will pop up a screen that will help you out.  &lt;br /&gt; &lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_2x89o9i40to/SZ01e55c4CI/AAAAAAAAAKw/1q7yWqxn1_c/s1600-h/gnuplotTest.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 242px;" src="http://3.bp.blogspot.com/_2x89o9i40to/SZ01e55c4CI/AAAAAAAAAKw/1q7yWqxn1_c/s320/gnuplotTest.jpg" alt="" id="BLOGGER_PHOTO_ID_5304454741166448674" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-936529944007102083?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/936529944007102083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=936529944007102083' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/936529944007102083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/936529944007102083'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2009/02/gnuplot-available-point-types.html' title='Gnuplot available point types'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_2x89o9i40to/SZ01e55c4CI/AAAAAAAAAKw/1q7yWqxn1_c/s72-c/gnuplotTest.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-3580945328699475981</id><published>2009-02-16T14:09:00.000-08:00</published><updated>2009-02-16T14:15:05.865-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='greasemonkey'/><category scheme='http://www.blogger.com/atom/ns#' term='youtube'/><title type='text'>Prevent autoplaying of youtube videos</title><content type='html'>This solution will buffer your youtube videos but won't play them automatically. This is nice if you open more than one youtube videos in multiple tabs. Here is what you have to do:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install the &lt;a href="http://www.greasespot.net/"&gt;Greasemonkey&lt;/a&gt; extension in Firefox&lt;/li&gt;&lt;li&gt;Restart Firefox&lt;/li&gt;&lt;li&gt;Install the &lt;a href="http://userscripts.org/scripts/show/38553"&gt;Youtube Buffer Video&lt;/a&gt; user script&lt;/li&gt;&lt;/ol&gt;That's it you are done !&lt;br /&gt;&lt;br /&gt;Learn't this neat trick at &lt;a href="http://www.lifehacker.com.au/tips/2008/12/31/youtube_buffer_video_prevents_autoplaying-2.html"&gt;this&lt;/a&gt; page :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-3580945328699475981?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/3580945328699475981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=3580945328699475981' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/3580945328699475981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/3580945328699475981'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2009/02/prevent-autoplaying-of-youtube-videos.html' title='Prevent autoplaying of youtube videos'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-8456776787508874116</id><published>2009-01-27T13:43:00.000-08:00</published><updated>2009-01-27T14:16:50.797-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>On some useful MACROS in C/C++ for debugging purposes</title><content type='html'>Like a stupid idiot I begin all my C++ files with the following construct:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;#include &lt;string&gt;&lt;br /&gt;static const std::string thisFileName = "foo.cpp" ;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;and then within each function I declare the following&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;const string thisFuctionName = "void bar()" ;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I do this so that I can print some useful information when I write an error summary to the error stream.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;if ( !paraFile.is_open() )&lt;br /&gt;    {&lt;br /&gt;      cerr &lt;&lt; "File: " &lt;&lt; thisFileName &lt;&lt; endl ;&lt;br /&gt;      cerr &lt;&lt; "Function: " &lt;&lt; thisFunctionName &lt;&lt; endl ;&lt;br /&gt;      cerr &lt;&lt; "ERROR: Could not open "&lt;&lt; paraFileName &lt;&lt; endl ;&lt;br /&gt;      exit(EXIT_FAILURE);&lt;br /&gt;    }&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This way I don't have to individually change the filename and function&lt;br /&gt;name keeping the general structure of the construct more or less fixed.&lt;br /&gt;&lt;br /&gt;Today I found &lt;a href="http://ugweb.cs.ualberta.ca/%7Ec201/labs/lab5/debuggers.pdf"&gt;this&lt;/a&gt; useful presentation on &lt;a href="http://ugweb.cs.ualberta.ca/%7Ec201/labs/lab5/index.html"&gt;this&lt;/a&gt; page which informed me that some&lt;br /&gt;useful MACROS are predefined that take care of such situations.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;__FILE__&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;and&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;__LINE__&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I feel like a first class idiot not knowing these things.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-8456776787508874116?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/8456776787508874116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=8456776787508874116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/8456776787508874116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/8456776787508874116'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2009/01/on-some-useful-macros-in-cc-for.html' title='On some useful MACROS in C/C++ for debugging purposes'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-8350795042179467140</id><published>2009-01-22T15:54:00.000-08:00</published><updated>2009-01-22T16:24:15.386-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>function overloading blues in C++</title><content type='html'>Can I overload functions with different return types ?&lt;br /&gt;&lt;br /&gt;I wanted to overload a function just by changing the return type of the function. Turns out that this is not allowed at all :(&lt;br /&gt;So the following overloading will not work&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;double squareMe(int x);&lt;br /&gt;int squareMe(int x);&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Got my answer &lt;a href="http://www.geekinterview.com/question_details/3489"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;One solution is to do this :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;void squareMe(double &amp;amp; y, int x);&lt;br /&gt;void squareMe(int &amp;amp; y, int x);&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-8350795042179467140?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/8350795042179467140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=8350795042179467140' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/8350795042179467140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/8350795042179467140'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2009/01/function-overloading-blues-in-c.html' title='function overloading blues in C++'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-184918991160566775</id><published>2009-01-06T12:22:00.000-08:00</published><updated>2009-01-06T15:47:18.917-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Some make questions for C++ files</title><content type='html'>These questions are related to make when working with C++ files.&lt;br /&gt;&lt;ul&gt;&lt;li dragover="true"&gt;What is the difference between CPPFLAGS and CXXFLAGS ?  What are some common values for these variables ?&lt;br /&gt;&lt;/li&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;In &lt;a href="http://www.kdevelop.org/index.html?filename=3.0/faq.html#17"&gt;this&lt;/a&gt; a partial answer ?&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;LDLIBS and LOADLIBES ?&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;By the way to check the default variables that &lt;a href="http://www.gnu.org/software/make/"&gt;make&lt;/a&gt; uses, do the following:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;make -p -f /dev/null&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;While looking for some answers to these questions I found &lt;a href="http://www.gnu.org/software/make/manual/make.html#Implicit-Variables"&gt;this&lt;/a&gt; very helpful anchor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-184918991160566775?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/184918991160566775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=184918991160566775' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/184918991160566775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/184918991160566775'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2009/01/some-make-questions-for-c-files.html' title='Some make questions for C++ files'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-3437133050085778873</id><published>2009-01-06T10:39:00.000-08:00</published><updated>2009-01-06T10:51:50.061-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ header files: angle brackets or double quotes ?</title><content type='html'>While looking for solution to a problem I stumbled onto &lt;a href="http://www.informit.com/guides/content.aspx?g=cplusplus&amp;amp;seqNum=382"&gt;this&lt;/a&gt; article. Discovered the reasons why C++ headers do not have a .h extension too.&lt;br /&gt;&lt;br /&gt;That article also praises the book &lt;a href="http://oreilly.com/catalog/9780596002985/"&gt;C++ in a Nutshell&lt;/a&gt; by &lt;a href="http://www.tempest-sw.com/lisch.htm"&gt;Ray Lischner&lt;/a&gt;. I might have to check that one out though I learn't my C++ from &lt;span style="font-weight: bold;"&gt;Stephen Prata&lt;/span&gt;'s excellent book &lt;span style="font-weight: bold;"&gt;C++ Primer&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-3437133050085778873?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/3437133050085778873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=3437133050085778873' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/3437133050085778873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/3437133050085778873'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2009/01/c-header-files-angle-brackets-or-double.html' title='C++ header files: angle brackets or double quotes ?'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-3465775223546573085</id><published>2008-12-12T09:32:00.000-08:00</published><updated>2008-12-12T09:35:27.018-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Edit sudoers file on Fedora Linux</title><content type='html'>Recently I had to edit the &lt;span style="font-weight: bold;"&gt;sudoers&lt;/span&gt; file and I learnt that a dedicated editor for this task exists. The editor is called &lt;span style="font-weight: bold;"&gt;visudo&lt;/span&gt;. On Fedora Core 7 I found it at &lt;span style="font-weight: bold;"&gt;/usr/sbin/visudo&lt;/span&gt; .&lt;br /&gt;&lt;br /&gt;Got the job done but am wondering now if there is something like emacssudo. Hmmm !!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-3465775223546573085?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/3465775223546573085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=3465775223546573085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/3465775223546573085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/3465775223546573085'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/12/edit-sudoers-file-on-fedora-linux.html' title='Edit sudoers file on Fedora Linux'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-7521546902633363513</id><published>2008-11-22T13:03:00.000-08:00</published><updated>2008-11-22T13:05:04.171-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='gnuplot'/><title type='text'>Plot CSV data files in Gnuplot</title><content type='html'>To plot a data file that contains data separated with "," use the following at the gnuplot command prompt:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;blockquote&gt;set datafile separator ","&lt;/blockquote&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-7521546902633363513?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/7521546902633363513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=7521546902633363513' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7521546902633363513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7521546902633363513'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/11/plot-csv-data-files-in-gnuplot.html' title='Plot CSV data files in Gnuplot'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-8784490329952740885</id><published>2008-11-22T10:44:00.000-08:00</published><updated>2008-11-22T10:47:39.038-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='octave'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>Octave mode in EMACS</title><content type='html'>To turn on Octave mode in EMACS use this:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;blockquote&gt;M-x  octave-mode&lt;/blockquote&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;It can be done automatically also ... that is for later !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-8784490329952740885?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/8784490329952740885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=8784490329952740885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/8784490329952740885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/8784490329952740885'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/11/octave-mode-in-emacs.html' title='Octave mode in EMACS'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-4368810953746173257</id><published>2008-11-01T11:28:00.000-07:00</published><updated>2008-11-01T11:29:02.749-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Dynamic allocation of a 3d array</title><content type='html'>&lt;blockquote&gt;#include &lt;iostream&gt;&lt;br /&gt;&lt;br /&gt;using namespace std;&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;  // tensor[numTables][numRows][numCols]&lt;br /&gt;&lt;br /&gt;  const size_t numTables = 2 ;&lt;br /&gt;  const size_t numRows = 3 ;&lt;br /&gt;  const size_t numCols = 4 ;&lt;br /&gt;&lt;br /&gt;  double*** tensor ;&lt;br /&gt;&lt;br /&gt;  tensor = new double** [numTables];&lt;br /&gt;&lt;br /&gt;  for(size_t table = 0 ; table &lt; numTables ; ++table)&lt;br /&gt;    {&lt;br /&gt;      tensor[table] = new double* [numRows];&lt;br /&gt;&lt;br /&gt;      for(size_t row = 0 ; row &lt; numRows ; ++row)&lt;br /&gt;    {&lt;br /&gt;      tensor[table][row] = new double [numCols];&lt;br /&gt;    }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  unsigned int count = 1 ;&lt;br /&gt;&lt;br /&gt;  for(size_t table = 0 ; table &lt; numTables ; ++table)&lt;br /&gt;    {&lt;br /&gt;      for(size_t row = 0 ; row &lt; numRows ; ++row)&lt;br /&gt;    {&lt;br /&gt;      for(size_t col = 0 ; col &lt; numCols ; ++col)&lt;br /&gt;        {&lt;br /&gt;          tensor[table][row][col] = count++;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  for(size_t table = 0 ; table &lt; numTables ; ++table)&lt;br /&gt;    {&lt;br /&gt;      for(size_t row = 0 ; row &lt; numRows ; ++row)&lt;br /&gt;    {&lt;br /&gt;      for(size_t col = 0 ; col &lt; numCols ; ++col)&lt;br /&gt;        {&lt;br /&gt;          cout &lt;&lt; tensor[table][row][col] &lt;&lt; " " ;&lt;br /&gt;        }&lt;br /&gt;      cout &lt;&lt; endl ;&lt;br /&gt;    }&lt;br /&gt;      cout &lt;&lt; endl ;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  delete [] tensor ;&lt;br /&gt;&lt;br /&gt;  return 0 ;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-4368810953746173257?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/4368810953746173257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=4368810953746173257' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/4368810953746173257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/4368810953746173257'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/11/dynamic-allocation-of-3d-array.html' title='Dynamic allocation of a 3d array'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-5971781045373243233</id><published>2008-10-30T06:51:00.000-07:00</published><updated>2008-10-30T06:53:22.866-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>find the matching bracket in emacs</title><content type='html'>Parenthesis balancing in EMACS&lt;br /&gt;&lt;br /&gt;An unbalanced parenthesis is one of the most common sources of a programmer's grief. So emacs has a couple of useful features for guarding against them.&lt;br /&gt;&lt;br /&gt;You may have noticed that when you are writing C++ code with emacs and type a closing parenthesis, bracket, or brace, the cursor does a little hop to the matching opening character and then returns to its working position. If there is a problem finding the match, emacs flashes the message ``Mismatched parentheses'' in the minibuffer. If the match is so far back in the code that it isn't visible, emacs flashes the context of the matching parenthesis in the minibuffer.&lt;br /&gt;&lt;br /&gt;Parenthesis checking can also be done with the mouse. Double left click on any parenthesis, brace, or bracket. Emacs then shows the matching symbol and highlights the code between them.&lt;br /&gt;&lt;br /&gt;Source for this information was &lt;a href="http://www.physics.utah.edu/%7Edetar/lessons/emacs/emacs/node7.html"&gt;this&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-5971781045373243233?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/5971781045373243233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=5971781045373243233' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/5971781045373243233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/5971781045373243233'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/10/find-matching-bracket-in-emacs_30.html' title='find the matching bracket in emacs'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-9147159735824879372</id><published>2008-10-17T03:42:00.000-07:00</published><updated>2008-12-12T12:14:48.282-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='keyboard shortcuts'/><category scheme='http://www.blogger.com/atom/ns#' term='gnome'/><title type='text'>Minimize all open windows simultaneously in Linux</title><content type='html'>How do I simultaneously minimize all open windows in Linux ?&lt;br /&gt;&lt;br /&gt;What is the Linux equivalent of WindowsKey+D in Linux ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In &lt;span style="font-weight: bold;"&gt;Gnome&lt;/span&gt; its &lt;span style="font-weight: bold;"&gt;Ctrl+Atl+D&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Source is from &lt;a href="http://ubuntuforums.org/archive/index.php/t-152952.html"&gt;this&lt;/a&gt; page :D&lt;br /&gt;&lt;br /&gt;I would have found this out had I checked&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;System &gt; Preferences &gt; Personal &gt; Keyboard Shortcuts&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;that was the path at least on &lt;span style="font-weight: bold;"&gt;Fedora Core 7&lt;/span&gt; .&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-9147159735824879372?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/9147159735824879372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=9147159735824879372' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/9147159735824879372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/9147159735824879372'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/10/minimize-all-open-windows.html' title='Minimize all open windows simultaneously in Linux'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-8971788657525490318</id><published>2008-10-13T12:29:00.000-07:00</published><updated>2008-10-13T12:52:04.774-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><category scheme='http://www.blogger.com/atom/ns#' term='multiple lines of comments'/><title type='text'>Emacs Auto-fill mode for multiline comments</title><content type='html'>Basically I wanted to write multiple lines of comments in .cpp files without having to manually type a double slash ( // ) in front of each comment. While googling for solutions I hit this page which says the following:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;When Auto Fill mode is on, going past the fill column while typing a comment causes the comment to be continued...&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;So I start googling to find out how to enable the Auto-fill mode and in my search I hit &lt;a href="http://www.gnu.org/software/emacs/emacs-lisp-intro/html_node/Text-and-Auto-fill.html"&gt;this&lt;/a&gt; page which says:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;When Auto Fill mode is turned off, lines continue to the right as you type them.  Depending on how you set the value of &lt;code&gt;truncate-lines&lt;/code&gt;, the words you type either disappear off the right side of the screen, or else are shown, in a rather ugly and unreadable manner, as a continuation line on the screen.&lt;/blockquote&gt;&lt;br /&gt;I like the Auto-fill mode :D&lt;br /&gt;&lt;br /&gt;I am not too sure if I should turn Auto-fill mode on for all .cpp files ! Guess this post will have to wait.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-8971788657525490318?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/8971788657525490318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=8971788657525490318' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/8971788657525490318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/8971788657525490318'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/10/emacs-auto-fill-mode-for-multiline.html' title='Emacs Auto-fill mode for multiline comments'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-4786804625548437266</id><published>2008-10-04T00:54:00.000-07:00</published><updated>2008-10-04T01:00:04.653-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='bash'/><title type='text'>rename files with same first name but different extentions</title><content type='html'>The scenario is this. You have a folder/directory with the following files:&lt;br /&gt;&lt;blockquote&gt;a.txt, a.ps, a.pdf&lt;/blockquote&gt;and you want to change the file names to&lt;br /&gt;&lt;blockquote&gt;b.txt, b.ps, b.pdf&lt;/blockquote&gt;Here is how to do it.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;for file in `ls a.*`&lt;br /&gt;do&lt;br /&gt;mv $file b.${file##*.}&lt;br /&gt;done&lt;/blockquote&gt;&lt;br /&gt;basically the &lt;span style="color: rgb(51, 102, 255);"&gt;${file##*.}&lt;/span&gt; extracts the extensions of the file. On the same note &lt;span style="color: rgb(51, 102, 255);"&gt;${file%*.}&lt;/span&gt; will extract the first names of the files.&lt;br /&gt;&lt;br /&gt;got it from &lt;a href="http://liquidat.wordpress.com/2007/09/29/short-tip-get-file-extension-in-shell-script/"&gt;this&lt;/a&gt; page :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-4786804625548437266?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/4786804625548437266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=4786804625548437266' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/4786804625548437266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/4786804625548437266'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/10/rename-files-with-same-first-name-but.html' title='rename files with same first name but different extentions'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-1240531735933347284</id><published>2008-09-25T23:32:00.000-07:00</published><updated>2008-09-25T23:43:38.011-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='xming'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><title type='text'>ssh'ing to a GNU/Linux machine from WindowsXP</title><content type='html'>I frequently SSH to a GNU/Linux ( Fedora Core 7 ) machine from a WindowsXP system. I have &lt;span style="font-weight: bold;"&gt;Xming&lt;/span&gt; to import remote display to local system, while I use &lt;span style="font-weight: bold;"&gt;putty&lt;/span&gt; to SSH to the Linux system. Since some days I was facing this strange problem. I could ssh to the linux system fine but could not import the display while launching any gui on the remote system. I got the following error&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;_X11TransSocketINETConnect() can't get address for localhost:6010: Name or service not known&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Display localhost:10.0 unavailable, simulating -nw&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;It turns out that this was occuring because of a corrupt &lt;span style="font-weight: bold;"&gt;/etc/hosts&lt;/span&gt; file on the Linux system. In fact the /etc/hosts file read as below:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;::1 localhost6.localdomain6      localhost6&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;God only knows why that was the case. Anyways I fixed the /etc/hosts file to read as below:&lt;br /&gt;&lt;br /&gt;127.0.0.1 localhost.localdomain localhost&lt;br /&gt;&lt;br /&gt;And wallah it worked fine as before !&lt;br /&gt;&lt;br /&gt;I googled for a solution and found on &lt;a href="http://www.linuxquestions.org/questions/fedora-35/help-for-setting-up-x-server-to-use-ssh-336219/"&gt;this&lt;/a&gt; page. &lt;a href="http://www.linuxquestions.org/questions/fedora-35/help-for-setting-up-x-server-to-use-ssh-336219/#post3068884"&gt;This&lt;/a&gt; post did the trick for me. Thanks &lt;span style="font-weight: bold;"&gt;tomrosenfeld&lt;/span&gt; :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-1240531735933347284?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/1240531735933347284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=1240531735933347284' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/1240531735933347284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/1240531735933347284'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/09/sshing-to-gnulinux-machine-from.html' title='ssh&apos;ing to a GNU/Linux machine from WindowsXP'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-7977753620285105494</id><published>2008-09-12T23:41:00.000-07:00</published><updated>2008-09-12T23:43:18.607-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='real time control'/><title type='text'>Real Time Control</title><content type='html'>Real Time Control ( RTC ) or Hardware in the Loop Simulation&lt;br /&gt;&lt;br /&gt;http://www.speedgoat.ch/?gclid=CPe16cmT2JUCFQoNewodRVcwXA&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-7977753620285105494?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/7977753620285105494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=7977753620285105494' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7977753620285105494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7977753620285105494'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/09/real-time-control.html' title='Real Time Control'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-5797008274798174015</id><published>2008-09-12T23:02:00.000-07:00</published><updated>2008-09-12T23:07:33.779-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='problem'/><title type='text'>Another problem that might be interesting to solve</title><content type='html'>Any professional presentation on the Web or T.V. has a host reading the que lines on the monitor and making it look as if the talk was off the cuff or prepared and rehearsed or anything but being read off the screen. I often find myself scrutinizing the eyes of the host to see how well he does the job :P.&lt;br /&gt;&lt;br /&gt;Anyways the problem is this how to make it look like they are not reading it off the monitor.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-5797008274798174015?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/5797008274798174015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=5797008274798174015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/5797008274798174015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/5797008274798174015'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/09/another-problem-that-might-be.html' title='Another problem that might be interesting to solve'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-1008267473807355226</id><published>2008-08-11T15:56:00.000-07:00</published><updated>2008-08-11T15:57:40.820-07:00</updated><title type='text'>tips for writing research papers</title><content type='html'>&lt;ol&gt;&lt;li&gt;Try to include as many results as possible&lt;/li&gt;&lt;li&gt;Compare your results with results obtained by other authors in the same field.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-1008267473807355226?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/1008267473807355226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=1008267473807355226' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/1008267473807355226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/1008267473807355226'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/08/tips-for-writing-research-papers.html' title='tips for writing research papers'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-6527474793117878043</id><published>2008-07-29T06:31:00.000-07:00</published><updated>2008-11-12T15:16:05.703-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='valgrind'/><category scheme='http://www.blogger.com/atom/ns#' term='glibc'/><category scheme='http://www.blogger.com/atom/ns#' term='g++'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>glibc detected double free or corruption</title><content type='html'>While segmentation fault is the most common error that C/C++ face another one that has been harassing me for some time is as follows ::&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;glibc detected double free or corruption&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This occurs when one tries to release memory that has already been deallocated. One quick and dirty way to get rid of it is as follows :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;$export MALLOC_CHECK_=0&lt;/blockquote&gt;&lt;br /&gt;( thats a zero at the right side of the equal to sign )&lt;br /&gt;&lt;br /&gt;and now run the executable, it should run without a problem.&lt;br /&gt;&lt;br /&gt;However I am not too sure if this will cause unreliable results or any other sort of problems later. I guess its best to check the code to find out and remedy the error causing this.&lt;br /&gt;&lt;br /&gt;Could the following be of any use ?&lt;br /&gt;&lt;a href="http://valgrind.org/"&gt;http://valgrind.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;See &lt;a href="http://forums.devshed.com/showpost.php?p=1456863&amp;amp;postcount=4"&gt;this&lt;/a&gt;  page to understand how &lt;span style="font-weight: bold;"&gt;valgrind&lt;/span&gt; can help you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-6527474793117878043?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/6527474793117878043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=6527474793117878043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/6527474793117878043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/6527474793117878043'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/07/glibc-detected-double-free-or.html' title='glibc detected double free or corruption'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-193281487400753923</id><published>2008-07-25T10:12:00.000-07:00</published><updated>2008-07-25T11:11:48.131-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='g++'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='gcc preprocessor'/><title type='text'>#define main</title><content type='html'>I have two files and the contents are as follows :&lt;br /&gt;&lt;p&gt;file :: main.h&lt;br /&gt;-------------------------------------&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; #ifndef main &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; #define main &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;#endif &lt;/span&gt;&lt;br /&gt;--------------------------------------&lt;br /&gt;&lt;/p&gt;&lt;p&gt;and&lt;br /&gt;&lt;/p&gt;&lt;p&gt; file :: main.cpp&lt;br /&gt;-------------------------------------&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; #include "main.h" &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="color: rgb(51, 102, 255);"&gt;int main(void)&lt;br /&gt;{&lt;br /&gt;return 0 ;&lt;/p&gt;&lt;p style="color: rgb(51, 102, 255);"&gt;}&lt;br /&gt;&lt;/p&gt;&lt;div id="qhide_509357" style="display: block;" class="qt"&gt; ------------------------------------&lt;br /&gt;&lt;/div&gt;&lt;p&gt;This program does not compile and the error message that I get is ::&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; expected unqualified-id before ‘void’ &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; expected `)' before ‘void’ &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;After some digging I have established that the problem lies in the&lt;br /&gt;lines&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; #ifndef main&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; #define main &lt;/span&gt;&lt;br /&gt;If I change it to&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; #ifndef Main&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; #define Main &lt;/span&gt;&lt;br /&gt;or&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;#ifndef MAIN&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt; #define MAIN&lt;/span&gt;&lt;br /&gt;etc.&lt;br /&gt;the program compiles.&lt;br /&gt;&lt;br /&gt;Turns out that the line&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;#define main&lt;/span&gt;&lt;br /&gt;actually defines the &lt;span style="font-weight: bold;"&gt;macro&lt;/span&gt; ``main" with an empty value. When the &lt;span style="font-weight: bold;"&gt;preprocessor&lt;/span&gt; works on the code it replaces all instances of the word main with an empty string resulting in the compile time error as posted above.&lt;br /&gt;&lt;br /&gt;To find out the error just see the effect of preprocessor on the code before and after changing the macro name from main to Main or MAIN or whatever.&lt;br /&gt;&lt;br /&gt;The effect of the preprocessor can be seen with the following command :&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;g++ -E main.cpp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Mind you that the above command will produce lots and lots of code ( in my case about 30000 lines of code). So this is what you can do&lt;br /&gt;&lt;br /&gt;First with the erroneous header file ::&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;g++ -E main.cpp &gt; outputA&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and then with the fixed header file ::&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;g++ -E main.cpp &gt; outputB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;now compare the files outputA and outputB with the &lt;span style="font-weight: bold;"&gt;diff&lt;/span&gt; utility.&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;diff outputA outputB&lt;/span&gt;&lt;br /&gt;You will find that the preprocessor working on the erroneous code produces&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;int (void)&lt;/span&gt;&lt;br /&gt;while the preprocessor working on the correct code produces&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;int main(void)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks to the gurus at &lt;a href="http://groups.google.co.in/group/gnu.g++.help/topics"&gt;gnu.g++.help&lt;/a&gt; I could understand the error I was making !&lt;br /&gt;The thread can be found &lt;a href="http://groups.google.co.in/group/gnu.g++.help/browse_thread/thread/9c0e07c08d4b4da1#"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;p.s. I work on GNU/Linux with the gcc compiler.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-193281487400753923?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/193281487400753923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=193281487400753923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/193281487400753923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/193281487400753923'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/07/define-main.html' title='#define main'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-7304044988260038824</id><published>2008-07-03T02:56:00.000-07:00</published><updated>2008-07-03T03:12:52.049-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='numerical computation'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Handling matrices in C++</title><content type='html'>Most of my programming work in C++ involves numerical computation based work. I have to deal with a lot of 2-dimensional matrices and the approach that I stuck to earlier was to use a pointer to a pointer.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;double** matrix;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This allows for dynamic allocation of matrices. However I can't pass a pointer to a pointer and use const protection at the same time.&lt;br /&gt;Say I have a function that just takes the 2-dimensional matrix and displays it. Now I want to protect the matrix from being inadvertently changed in the called function. So I want to declare the function as follows:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;void function(const double** const matrix);      // WRONG&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The above can't be done :(&lt;br /&gt;&lt;br /&gt;I am not even aware if a 2-dimensional array can be passed by reference in C++.&lt;br /&gt;&lt;br /&gt;So this is what I am trying instead.&lt;br /&gt;&lt;br /&gt;Say I have a 2-D matrix A as follows:&lt;br /&gt;&lt;div style="text-align: center;"&gt;A = [1, 2,3]&lt;br /&gt;       [4,5,6]&lt;br /&gt;       [7,8,9]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;then instead of defining this as :&lt;br /&gt;&lt;div style="text-align: center;"&gt;A [3][3] = { {1,2,3}, {4,5,6}, {7,8,9}};&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I define it as a single dimension array as follows :&lt;br /&gt;&lt;div style="text-align: center;"&gt;A[9] = { 1,2,3,4,5,6,7,8,9} ;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;That way one can easily pass the pointer as follows&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;void function(const double * const A );&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;-----------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;If you know a better solution please DO let me know.&lt;br /&gt;&lt;br /&gt;                &lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-7304044988260038824?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/7304044988260038824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=7304044988260038824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7304044988260038824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7304044988260038824'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/07/handling-matrices-in-c.html' title='Handling matrices in C++'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-7326751146687429089</id><published>2008-07-01T05:59:00.000-07:00</published><updated>2008-07-01T06:02:05.477-07:00</updated><title type='text'>http://www.scholarshipnet.info/</title><content type='html'>I might need this after the completion of my thesis.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.scholarshipnet.info/"&gt;http://www.scholarshipnet.info/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-7326751146687429089?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/7326751146687429089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=7326751146687429089' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7326751146687429089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7326751146687429089'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/07/httpwwwscholarshipnetinfo.html' title='http://www.scholarshipnet.info/'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-9154573384471992472</id><published>2008-06-22T07:02:00.001-07:00</published><updated>2008-06-22T07:02:39.044-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='matlab'/><title type='text'>find the location/path of m-files</title><content type='html'>&lt;h3 class="post-title"&gt;&lt;br /&gt;       &lt;/h3&gt;                   &lt;p&gt;       &lt;/p&gt;use the ``which" command .&lt;br /&gt;&lt;br /&gt;i was trying to figure out where the mutools toolbox was in MATLAB 7. couldn't find it. then i remembered the ``which" command&lt;br /&gt;&lt;br /&gt;&gt;&gt; which pck&lt;br /&gt;&lt;br /&gt;wallah !!!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-9154573384471992472?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/9154573384471992472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=9154573384471992472' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/9154573384471992472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/9154573384471992472'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/06/find-locationpath-of-m-files.html' title='find the location/path of m-files'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-370071703685426246</id><published>2008-06-22T07:01:00.001-07:00</published><updated>2008-06-22T07:01:45.849-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='matlab'/><title type='text'>i want a circle not ellipse</title><content type='html'>&lt;h3 class="post-title"&gt;&lt;br /&gt;       &lt;/h3&gt;                   &lt;p&gt;       &lt;/p&gt;theta = 0:0.1:2*pi ;&lt;br /&gt;x = cos(theta);&lt;br /&gt;y = sin(theta);&lt;br /&gt;plot(x,y);&lt;br /&gt;shg&lt;br /&gt;&lt;br /&gt;this should show u a circle instead it shows u an ellipse.. not that the program is wrong or something !&lt;br /&gt;&lt;br /&gt;just write&lt;br /&gt;&lt;br /&gt;axis equal&lt;br /&gt;&lt;br /&gt;at the command prompt and all should be ok&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-370071703685426246?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/370071703685426246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=370071703685426246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/370071703685426246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/370071703685426246'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/06/i-want-circle-not-ellipse.html' title='i want a circle not ellipse'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-4307834864993068898</id><published>2008-06-22T07:00:00.000-07:00</published><updated>2008-06-22T07:01:02.625-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='matlab'/><title type='text'>more</title><content type='html'>i have a bad memory and i always check out the help associated with the function or script that i am using. most of the times the help output is voluminous and scrolls off the screen.&lt;br /&gt;Try this  out&lt;br /&gt;&gt;&gt; help mincx&lt;br /&gt;i don't like that and don't want to type&lt;br /&gt;&gt;&gt; more on&lt;br /&gt;before every invocation of help&lt;br /&gt;so this is what i did&lt;br /&gt;open help file and right and the end of the help messages but before the beginning of all the commands just add this line&lt;br /&gt;more on;&lt;br /&gt;&lt;br /&gt;this should do the job since all my scripts have by default more off and the beginning.&lt;br /&gt;&lt;br /&gt;another cool thing i found out was to check if more has been set in the command window&lt;br /&gt;&lt;br /&gt;get(0,'more')&lt;br /&gt;&lt;br /&gt;this is actually a cool find since this lets me find awful lot of information about the main command window environment&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-4307834864993068898?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/4307834864993068898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=4307834864993068898' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/4307834864993068898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/4307834864993068898'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/06/more.html' title='more'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-5385923619091936194</id><published>2008-06-22T06:55:00.000-07:00</published><updated>2008-06-22T06:57:53.539-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='control'/><title type='text'>Linear Optimal Control Systems by H. Kwakernaak and R. Sivan</title><content type='html'>&lt;blockquote&gt;In order to preserve the Control Systems literature, the Control Systems Society will make available without cost out of print books that had significant impact on the field.&lt;br /&gt;&lt;br /&gt;Now isn't that just great !!! So why wait head over to &lt;a href="http://www.ieeecss.org/PAB/classics/"&gt;this&lt;/a&gt; page and enjoy the book :D&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-5385923619091936194?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/5385923619091936194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=5385923619091936194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/5385923619091936194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/5385923619091936194'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/06/linear-optimal-control-systems-by-h.html' title='Linear Optimal Control Systems by H. Kwakernaak and R. Sivan'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-7927237349368385203</id><published>2008-06-22T06:54:00.001-07:00</published><updated>2008-06-22T06:54:54.662-07:00</updated><title type='text'>Scientific Computing In Object-Oriented Languages</title><content type='html'>http://www.oonumerics.org/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-7927237349368385203?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/7927237349368385203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=7927237349368385203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7927237349368385203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7927237349368385203'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/06/scientific-computing-in-object-oriented.html' title='Scientific Computing In Object-Oriented Languages'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-138456246017701679</id><published>2008-06-22T06:53:00.001-07:00</published><updated>2008-06-22T06:53:50.439-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='control'/><title type='text'>transient response of non-linear systems</title><content type='html'>transient response of Finite Dimensional Linear Time Invariant (FDLTI) systems is determined by locations of the system poles, however for nonlinear systems there IS no concept of "poles of the system". in that case what really governs the transient response. what computable property/properties of a nonlinear system will be equivalent to "poles of a FDLTI system" ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-138456246017701679?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/138456246017701679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=138456246017701679' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/138456246017701679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/138456246017701679'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/06/transient-response-of-non-linear.html' title='transient response of non-linear systems'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-1458365861465386935</id><published>2008-06-22T06:52:00.000-07:00</published><updated>2008-06-22T06:53:06.315-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='control'/><title type='text'>pid</title><content type='html'>i should feel ashamed in writing about this but i guess one has to confess  his or her sins at one time or another.&lt;br /&gt;&lt;br /&gt;the transfer function of a pid controller is NOT strictly proper&lt;br /&gt;&lt;br /&gt;U(s)    kd*s^2 + kp*s + ki&lt;br /&gt;----- = --------------------          (1)&lt;br /&gt;E(s)            s&lt;br /&gt;&lt;br /&gt;doesn't it create any problems ? all undergraduate control texts say that transfer functions are(should be?) strictly proper. there is something amiss here.&lt;br /&gt;&lt;br /&gt;my guess is that since its physically impossible to construct a pure differentiator&lt;br /&gt;( kd*s term ) its therefore impossible to physically construct a PID controller&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-1458365861465386935?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/1458365861465386935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=1458365861465386935' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/1458365861465386935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/1458365861465386935'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/06/pid.html' title='pid'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-7957040249467030893</id><published>2008-06-22T04:31:00.001-07:00</published><updated>2008-06-22T06:51:23.886-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='control'/><title type='text'>degree of non-linearity</title><content type='html'>with reference to non-linear systems: is it fair rather meaningful to ask about the ``degree of non-linearity" of a system. all linear systems are linear, nothing big about it; however since the domain of nonlinear systems is vast, can the phrase/clause ``degree of non-linearity" be given some meaning?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-7957040249467030893?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/7957040249467030893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=7957040249467030893' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7957040249467030893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7957040249467030893'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/06/degree-of-non-linearity.html' title='degree of non-linearity'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-7253284463794871450</id><published>2008-06-22T04:30:00.001-07:00</published><updated>2008-06-22T04:30:55.125-07:00</updated><title type='text'>Laplace Transform</title><content type='html'>Why is the Laplace variable a complex number? The meaning of complex frequency is made clear  in the book by Valkenburg.&lt;br /&gt;What does the Laplace transform do to the integro-differential equations that makes an algebraic manipulation possible?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-7253284463794871450?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/7253284463794871450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=7253284463794871450' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7253284463794871450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7253284463794871450'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/06/laplace-transform.html' title='Laplace Transform'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-2865945956010461657</id><published>2008-06-22T04:28:00.000-07:00</published><updated>2008-06-22T04:29:11.658-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='control'/><title type='text'>step response</title><content type='html'>The system G(s) = (s+1)/( s*(s+3)*(s*s+4*s+8))  with poles at&lt;br /&gt;       0         &lt;br /&gt; -3.0000         &lt;br /&gt; -2.0000 + 2.0000i&lt;br /&gt; -2.0000 - 2.0000i&lt;br /&gt;and a zero at -1 has all stable poles, i.e. in the left hand of the s-plane . However the step response of the system is unstable !!!!&lt;br /&gt;&lt;br /&gt;This is most probably due to the pole at the origin. The system then behaves as a double integrator. The impulse response of the plant does not decay to zero ! The plant is decidedly unstable.&lt;br /&gt;&lt;br /&gt;This is food for thought , since before this I thought that the stability of the system could be determined my the location of poles alone. It now seems that its also important that whether the poles in question are open loop or closed loop !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-2865945956010461657?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/2865945956010461657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=2865945956010461657' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/2865945956010461657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/2865945956010461657'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/06/step-response.html' title='step response'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7971969401162346842.post-7488236047658050088</id><published>2008-06-22T04:22:00.000-07:00</published><updated>2008-06-22T04:27:45.907-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='control'/><title type='text'>pole zero cancellation</title><content type='html'>say a controllable system uses state feedback to cancel a zero in the lhs of s-plane. the system becomes unobservable. but does this cause ne probs. i think not. since at the start the system was controllable and observable(my assumption) what harm does it cause if now the system becomes unobservable. u need an observer only if u can't measure one or more state; so if u start with an observable and controllable system there is no problem in setting up a state feedback controller using an observer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7971969401162346842-7488236047658050088?l=awhanwork.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://awhanwork.blogspot.com/feeds/7488236047658050088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7971969401162346842&amp;postID=7488236047658050088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7488236047658050088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7971969401162346842/posts/default/7488236047658050088'/><link rel='alternate' type='text/html' href='http://awhanwork.blogspot.com/2008/06/pole-zero-cancellation.html' title='pole zero cancellation'/><author><name>awhan</name><uri>http://www.blogger.com/profile/06671072876210284951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
