<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type='text/xsl' href='http://tharakadev.spaces.live.com/mmm2008-07-24_12.50/rsspretty.aspx?rssquery=en-US;http%3a%2f%2ftharakadev.spaces.live.com%2fcategory%2fUseful%2bTips%2ffeed.rss' version='1.0'?><rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:msn="http://schemas.microsoft.com/msn/spaces/2005/rss" xmlns:live="http://schemas.microsoft.com/live/spaces/2006/rss" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Tharaka Devadithya's space: Useful Tips</title><description /><link>http://tharakadev.spaces.live.com/?_c11_BlogPart_BlogPart=blogview&amp;_c=BlogPart&amp;partqs=catUseful%2bTips</link><language>en-US</language><pubDate>Mon, 14 Apr 2008 21:56:19 GMT</pubDate><lastBuildDate>Mon, 14 Apr 2008 21:56:19 GMT</lastBuildDate><generator>Microsoft Spaces v1.1</generator><docs>http://www.rssboard.org/rss-specification</docs><ttl>60</ttl><cf:parentRSS>http://tharakadev.spaces.live.com/blog/feed.rss</cf:parentRSS><live:type>blogcategory</live:type><live:identity><live:id>5555804332650269538</live:id><live:alias>tharakadev</live:alias></live:identity><cf:listinfo><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="typelabel" label="Type" /><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="tag" label="Tag" /><cf:group element="category" label="Category" /><cf:sort element="pubDate" label="Date" data-type="date" default="true" /><cf:sort element="title" label="Title" data-type="string" /><cf:sort ns="http://purl.org/rss/1.0/modules/slash/" element="comments" label="Comments" data-type="number" /></cf:listinfo><item><title>Fedora Setup</title><link>http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!584.entry</link><description>&lt;p&gt;These tips are mainly for installing applications that are not open source. For most of the open source applications, FC package manager, Yum will do the job.
&lt;p&gt;Personal Fedora Core 6 Installation Guide (&lt;a href="http://www.mjmwired.net/resources/mjm-fedora-fc6.html"&gt;link&lt;/a&gt;)&lt;br&gt;Sun J2SDK-1.5 on Fedora Core 5 and 6 (FC5 and FC6) (&lt;a href="http://ccl.net/cca/software/SOURCES/JAVA/JSDK-1.5/index.shtml"&gt;link&lt;/a&gt;)&lt;p&gt;How to make fonts on Fedora Core 6 look like on Microsoft Windows (&lt;a href="http://dudi.wordpress.com/2006/11/04/howto-make-fonts-on-fedora-core-6-looks-like-on-windows/"&gt;link&lt;/a&gt;)&lt;br&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=5555804332650269538&amp;page=RSS%3a+Fedora+Setup&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=tharakadev.spaces.live.com&amp;amp;GT1=tharakadev"&gt;</description><comments>http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!584.entry#comment</comments><guid isPermaLink="true">http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!584.entry</guid><pubDate>Mon, 25 Dec 2006 23:09:48 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://tharakadev.spaces.live.com/blog/cns!4D1A2E9AC9320B62!584/comments/feed.rss</wfw:commentRss><wfw:comment>http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!584.entry#comment</wfw:comment><dcterms:modified>2007-04-19T01:28:58Z</dcterms:modified></item><item><title>Doxygen</title><link>http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!582.entry</link><description>&lt;div&gt;Main source: &lt;a href="http://www.stack.nl/~dimitri/doxygen/manual.html"&gt;http://www.stack.nl/~dimitri/doxygen/manual.html&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Create a configuration file&lt;/div&gt;
&lt;div&gt;&lt;font face="Courier New, Courier, Monospace"&gt;doxygen -g &amp;lt;config-file&amp;gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;If &amp;lt;config-file&amp;gt; is not given, the default is &lt;em&gt;Doxyfile&lt;/em&gt;.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The generated file has configuration parameters. Most of them have comments and are self explanatory. Some parameters that need to be modified are,&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;PROJECT_NAME&lt;/font&gt;
&lt;li&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;OUTPUT_DIRECTORY&lt;/font&gt;
&lt;li&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;REPEAT_BRIEF&lt;br&gt;- If YES, prepends the brief description of a member or function before the detailed description.&lt;/font&gt;
&lt;li&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;EXTRACT_ALL&lt;br&gt;&lt;/font&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;- If YES, all entities in the documentation are documented, even if no documentation was available.&lt;br&gt;- Warnings about undocumented members will not be generated as long as this is set to YES.&lt;/font&gt;
&lt;li&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;INPUT&lt;br&gt;&lt;/font&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;- List of directories containing source files.&lt;br&gt;- If left blank, the current directory will be used.&lt;/font&gt;
&lt;li&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;RECURSIVE&lt;br&gt;&lt;/font&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;- If YES, processes sub-directories recursively.&lt;/font&gt;
&lt;li&gt;SOURCE_BROWSER&lt;br&gt;- If YES, generates cross-reference a (documented) entity with its definition in the source files.
&lt;li&gt;GENERATE_HTML, GENERATE_LATEX&lt;/ul&gt;
&lt;div&gt;&lt;font face="Verdana, Geneva, Arial, Sans-serif"&gt;Most of the others can be left with their default values&lt;/font&gt;.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Examples of documeting the code can be found at, &lt;a href="http://www.stack.nl/~dimitri/doxygen/docblocks.html"&gt;http://www.stack.nl/~dimitri/doxygen/docblocks.html&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Running doxygen&lt;/div&gt;
&lt;div&gt;&lt;font face="Courier New, Courier, Monospace"&gt;doxygen &amp;lt;config-file&amp;gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=5555804332650269538&amp;page=RSS%3a+Doxygen&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=tharakadev.spaces.live.com&amp;amp;GT1=tharakadev"&gt;</description><comments>http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!582.entry#comment</comments><guid isPermaLink="true">http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!582.entry</guid><pubDate>Sat, 23 Dec 2006 19:18:42 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://tharakadev.spaces.live.com/blog/cns!4D1A2E9AC9320B62!582/comments/feed.rss</wfw:commentRss><wfw:comment>http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!582.entry#comment</wfw:comment><dcterms:modified>2006-12-25T12:17:46Z</dcterms:modified></item><item><title>SVN</title><link>http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!565.entry</link><description>&lt;h3&gt;Import existing project to new repository&lt;/h3&gt;Assumption: each project has its own repository. This is so that each project has its own revision numbering.&lt;br&gt;Create a new repository:&lt;br&gt;
&lt;div&gt;&lt;font size=2&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;svnadmin create --fs-type fsfs /path/to/repos&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;a href="http://svnbook.org/"&gt;Subversion book&lt;/a&gt; recommends having the folder structure as branches, tags, trunk in its '&lt;a href="http://svnbook.red-bean.com/en/1.2/svn.intro.quickstart.html"&gt;A Quick Start&lt;/a&gt;'. I.e. all project files in trunk while branches and tags directories are empty.&lt;br&gt;
&lt;div&gt;&lt;font size=2&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;/tmp/myproject/branches/&lt;/span&gt;&lt;br style="font-family:Courier New,Courier,Monospace"&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;/tmp/myproject/tags/&lt;/span&gt;&lt;br style="font-family:Courier New,Courier,Monospace"&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;/tmp/myproject/trunk/&lt;/span&gt;&lt;br style="font-family:Courier New,Courier,Monospace"&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;foo.c&lt;/span&gt;&lt;br style="font-family:Courier New,Courier,Monospace"&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;bar.c&lt;/span&gt;&lt;br style="font-family:Courier New,Courier,Monospace"&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;Makefile&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;Import the existing code (remove binaries before this step):&lt;br&gt;
&lt;div&gt;&lt;font size=2&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;svn import /tmp/myproject file:///path/to/repos/myproject -m 'Initial import'&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;Checkout:&lt;br&gt;
&lt;div&gt;&lt;font size=2&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;svn checkout file:///&lt;/span&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;path/to/repos/myproject/trunk myproject&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font size=2&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;Or&lt;br&gt;&lt;font size=2&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;svn checkout svn+ssh://hostname/&lt;/span&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;path/to/repos/myproject/trunk myproject&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;br&gt;&lt;font size=2&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;&lt;br&gt;&lt;/span&gt;&lt;/font&gt;Tagging:&lt;font size=2&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;&lt;br&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Courier New" size=2&gt;svn copy &lt;/font&gt;&lt;font size=2&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;svn+ssh://hostname/&lt;/span&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;path/to/repos/myproject/trunk&lt;/span&gt;&lt;/span&gt; &lt;/font&gt;&lt;font size=2&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;svn+ssh://hostname/&lt;/span&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;path/to/repos/myproject&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Courier New" size=2&gt;/tags/release-1.0 -m &amp;quot;Tagging the 1.0 release of &lt;/font&gt;&lt;font size=2&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;myproject&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Courier New" size=2&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;font size=2&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;&lt;br&gt;&lt;/span&gt;&lt;/font&gt;
&lt;h3&gt;Differences from CVS&lt;/h3&gt;Separate commands to &lt;br&gt;1. check status of working copy - &lt;font size=2&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;svn status&lt;/span&gt;&lt;/font&gt;&lt;br&gt;2. update working copy with repository - &lt;font style="font-family:Courier New,Courier,Monospace" size=2&gt;svn update&lt;/font&gt;&lt;br&gt;In CVS, &lt;font size=2&gt;&lt;span style="font-family:Courier New,Courier,Monospace"&gt;cvs update&lt;/span&gt;&lt;/font&gt; would do both the above.&lt;br&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=5555804332650269538&amp;page=RSS%3a+SVN&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=tharakadev.spaces.live.com&amp;amp;GT1=tharakadev"&gt;</description><comments>http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!565.entry#comment</comments><guid isPermaLink="true">http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!565.entry</guid><pubDate>Sun, 22 Oct 2006 02:19:34 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://tharakadev.spaces.live.com/blog/cns!4D1A2E9AC9320B62!565/comments/feed.rss</wfw:commentRss><wfw:comment>http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!565.entry#comment</wfw:comment><dcterms:modified>2007-08-02T16:46:36Z</dcterms:modified></item><item><title>MySQL</title><link>http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!448.entry</link><description>&lt;h3&gt;Installing MySQL as a non-privileged user&lt;/h3&gt;The installation instructions as root are pretty straightforward in the official &lt;a href="http://dev.mysql.com/doc/refman/5.1/en/installing.html"&gt;documentation&lt;/a&gt;. However for non-roots, lot of details are missing there. Some useful information can be found &lt;a href="http://archives.neohapsis.com/archives/mysql/2005-q1/2256.html"&gt;here&lt;/a&gt;.&lt;br&gt;&lt;br&gt;Some of the steps I followed with a source distribution are shown below:&lt;br&gt;
&lt;ol&gt;
&lt;li&gt;configure&lt;br&gt;CFLAGS=&amp;quot;-O3 -mpentiumpro&amp;quot; CXX=gcc CXXFLAGS=&amp;quot;-O3 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti&amp;quot; ./configure --prefix=$INSTDIR/mysql-5.0 --localstatedir=$INSTDIR/mysql/data --with-unix-socket-path=$INSTDIR/mysql/tmp/mysql.sock --enable-assembler --with-mysqld-ldflags=-all-static&lt;br&gt;Notes: &lt;br&gt;
&lt;ol&gt;
&lt;li&gt;Not all programs in MySQL are affected by these parameters. For those that are not affected, command line parameters must be used. 
&lt;li&gt;If embedded server functionality is required, then use &lt;span style="font-style:italic"&gt;--with-embedded-server&lt;/span&gt; flag when running configure.&lt;br&gt;&lt;/ol&gt;
&lt;li&gt;Initialize server&lt;br&gt;$INSTDIR/mysql-5.0/bin/mysql_install_db --ldata=$INSTDIR/mysql/data&lt;br&gt;
&lt;li&gt;Start server&lt;br&gt;$INSTDIR/mysql-5.0/bin/mysqld_safe --datadir=$INSTDIR/mysql/data --pid-file=$INSTDIR/mysql/tmp/mysql.pid --socket=$INSTDIR/mysql/tmp/mysql.sock &amp;amp; 
&lt;li&gt;Verify the server is running&lt;br&gt;$INSTDIR/mysql-5.0/bin/mysqladmin version&lt;br&gt;$INSTDIR/mysql-5.0/bin/mysqladmin variables 
&lt;li&gt;Shut down the server&lt;br&gt;$INSTDIR/mysql-5.0/bin/mysqladmin -u root shutdown&lt;br&gt;&lt;/ol&gt;Notes: Most of the arguments are needed to override options in /etc/my.cnf (assuming there is another version of MySQL installed by a root). Some of the options can be include in an options file, so that it is not required to specify them as command line parameters. More information can be found &lt;a href="http://dev.mysql.com/doc/refman/5.1/en/option-files.html"&gt;here&lt;/a&gt;.&lt;br&gt;&lt;br&gt;
&lt;h3&gt;Installing as root on Fedora Core&lt;br&gt;&lt;/h3&gt;Binary RPM seems to be the most convenient.&lt;br&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;rpm -ivh MySQL-server-VERSION.ARCH.rpm 
&lt;li&gt;rpm -ivh MySQL-client-VERSION.ARCH.rpm 
&lt;li&gt;rpm -ivh MySQL-devel-VERSION.ARCH.rpm&lt;/ul&gt;&lt;/div&gt;This runs the following as well.&lt;br&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;mysql_install_db 
&lt;li&gt;/bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/.pid&lt;/ul&gt;&lt;/div&gt;&lt;br&gt;An alternative is to install from source.&lt;br&gt;Some useful information can be found &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/quick-install.html"&gt;here&lt;/a&gt;.&lt;br&gt;&lt;br&gt;If installed with yum, the group permissions for mysql db and related tables (/var/lib/mysql/mysql/) are set incorrectly as root:root. It should be modified as mysql:root. Anyway, this approach seems to be pretty messy and should be attempted only if one has nothing to do for the next 24-48 hours!&lt;br&gt;
&lt;h3&gt;Basic usage&lt;/h3&gt;
&lt;p&gt;Connect: mysql -h host -u user -p&lt;br&gt;Disconnect: quit&lt;br&gt;List of DBs: show databases;&lt;br&gt;Create DB: create database db_name;&lt;br&gt;Delete DB: drop database db_name;&lt;br&gt;Export DB: mysqldump -u username -ppassword database_name &amp;gt; backup.sql&lt;br&gt;Import DB: mysql -u username -ppassword database_name &amp;lt; backup.sql&lt;br&gt;&lt;br&gt;&lt;span style="font-weight:bold;text-decoration:underline"&gt;Other links&lt;/span&gt;&lt;br&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html"&gt;Change passwords&lt;/a&gt;&lt;br&gt;&lt;a href="http://dev.mysql.com/doc/refman/5.0/en/adding-users.html"&gt;Add a new user&lt;/a&gt;&lt;br&gt;&lt;a href="http://www.kitebird.com/mysql-book/ch06-1ed.pdf"&gt;C API&lt;/a&gt;&lt;br&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=5555804332650269538&amp;page=RSS%3a+MySQL&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=tharakadev.spaces.live.com&amp;amp;GT1=tharakadev"&gt;</description><comments>http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!448.entry#comment</comments><guid isPermaLink="true">http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!448.entry</guid><pubDate>Thu, 28 Sep 2006 11:15:36 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://tharakadev.spaces.live.com/blog/cns!4D1A2E9AC9320B62!448/comments/feed.rss</wfw:commentRss><wfw:comment>http://tharakadev.spaces.live.com/Blog/cns!4D1A2E9AC9320B62!448.entry#comment</wfw:comment><dcterms:modified>2007-04-25T01:48:09Z</dcterms:modified></item></channel></rss>