<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2186785779032659813</id><updated>2011-09-24T18:00:00.245-07:00</updated><category term='Kernel'/><category term='javascript'/><category term='python'/><category term='Linux'/><title type='text'>My dig into unix based systems</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-2548750402678747615</id><published>2010-09-10T14:53:00.000-07:00</published><updated>2010-09-14T12:47:31.083-07:00</updated><title type='text'>Process for buildin new kernel</title><content type='html'>Build the kernel&lt;br /&gt;&lt;br /&gt;a. Download kernel&lt;br /&gt;&lt;br /&gt;b. Untar it&lt;br /&gt;c. make menuconfig&lt;br /&gt;d. This Command builds the images in the *parent directory* &lt;br /&gt;/usr/bin/fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers&lt;br /&gt;&lt;br /&gt;Install the kernel&lt;br /&gt;a. Move the packages to target machine and install&lt;br /&gt;&lt;br /&gt;sudo dpkg --purge linux-headers-2.6.35.4-custom&lt;br /&gt;sudo dpkg --purge linux-image-2.6.35.4-custom&lt;br /&gt;sudo rm -f /boot/initrd.img-2.6.35.4-custom*&lt;br /&gt;&lt;br /&gt;sudo dpkg -i linux-headers-2.6.35.4-custom_2.6.35.4-custom-10.00.Custom_amd64.deb &lt;br /&gt;sudo dpkg -i linux-image-2.6.35.4-custom_2.6.35.4-custom-10.00.Custom_amd64.deb &lt;br /&gt;sudo update-initramfs -c -k 2.6.35.4-custom&lt;br /&gt;&lt;br /&gt;b. Update initramfs&lt;br /&gt;sudo update-initramfs -c -k 2.6.35.4-custom&lt;br /&gt;&lt;br /&gt;c. Update grub.conf.&lt;br /&gt;Add initrd file path.&lt;br /&gt;Edit the path of root device in kernel options from /dev/hda1 to /dev/sda1.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reboot.. Hopefully it should come up with no kernel panics.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-2548750402678747615?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/2548750402678747615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=2548750402678747615' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/2548750402678747615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/2548750402678747615'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2010/09/process-for-buildin-new-kernel.html' title='Process for buildin new kernel'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-2481831217096726658</id><published>2010-02-17T15:56:00.001-08:00</published><updated>2010-02-19T04:14:39.505-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Kernel'/><title type='text'></title><content type='html'>I would like to start a linux kernel tutorial. The idea of this blog is to provide me with a drive to complete the book. Linux Kernel Development by Robert Love.&lt;br /&gt;&lt;br /&gt;You can access the pdf &lt;a href="http://docs.google.com/fileview?id=0B5Joo75kZSyhMWZiOTk1YzItZGRlOC00ZWQwLWE4NmEtOTdhZWE4YmUxZDBj&amp;amp;hl=en"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/jU9b2O0clTs&amp;hl=en_US&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/jU9b2O0clTs&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-2481831217096726658?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/2481831217096726658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=2481831217096726658' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/2481831217096726658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/2481831217096726658'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2010/02/i-would-like-to-start-linux-kernel.html' title=''/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-7368718480604901917</id><published>2010-01-05T12:38:00.000-08:00</published><updated>2010-02-17T13:56:10.602-08:00</updated><title type='text'>ScreenCast in Ubuntu</title><content type='html'>a. Install gtk-recordmydesktop&lt;br /&gt;Record your first screen cast using this software&lt;br /&gt;&lt;br /&gt;b. Install Audacity: To remove noise&lt;br /&gt;Get a wav file to be used with Audacity&lt;br /&gt;ffmpeg  -i out.ogv  out.wav&lt;br /&gt;&lt;br /&gt;c. Merge the edited wav file with original video file(Also convert it to avi)&lt;br /&gt;mencoder -audiofile out.wav -oac mp3lame -ovc xvid -xvidencopts fixed_quant=4 -o out.avi out.ogv&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-7368718480604901917?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/7368718480604901917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=7368718480604901917' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/7368718480604901917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/7368718480604901917'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2010/01/screencast-in-ubuntu.html' title='ScreenCast in Ubuntu'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-120178999657051196</id><published>2009-08-07T12:22:00.000-07:00</published><updated>2009-08-07T12:24:54.614-07:00</updated><title type='text'>Postgres from python</title><content type='html'>This snippet contains no validation whatsoever.&lt;br /&gt;&lt;br /&gt;import psycopg2&lt;br /&gt;&lt;br /&gt;connection = psycopg2.connect('dbname=product user=postgres host=127.0.0.1')&lt;br /&gt;mark = connection.cursor()&lt;br /&gt;query = """INSERT INTO PRODUCT(product_id, product, attribute) VALUES(%d, '%s', '%s')"""&lt;br /&gt;statement  = query % (1, "name", "attribute")&lt;br /&gt;mark.execute(statement)&lt;br /&gt;connection.commit()&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-120178999657051196?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/120178999657051196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=120178999657051196' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/120178999657051196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/120178999657051196'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2009/08/postgres-from-python.html' title='Postgres from python'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-7740005015688744791</id><published>2009-08-06T09:43:00.000-07:00</published><updated>2009-08-06T11:41:04.033-07:00</updated><title type='text'>GeoIP with Maxmind's Geolite</title><content type='html'>I was searching for a python tool to determine approximate location from IP address.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You need to download 3 tars:&lt;br /&gt;&lt;br /&gt;a. Geolite C library- Python module internally uses this C library&lt;br /&gt;http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz&lt;br /&gt;&lt;br /&gt;tar -xvzf GeoIP.tar.gz&lt;br /&gt;cd GeoIP-1.4.6&lt;br /&gt;./configure --libdir=/usr/lib/python2.5/site-packages/&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;&lt;br /&gt;b. Python api:&lt;br /&gt;http://geolite.maxmind.com/download/geoip/api/python/GeoIP-Python-1.2.4.tar.gz&lt;br /&gt;&lt;br /&gt;tar -xvzf GeoIP-Python-1.2.4.tar.gz&lt;br /&gt;cd GeoIP-Python-1.2.4&lt;br /&gt;&lt;br /&gt;# Edit setup.py to adjust the library_dirs and include_dirs&lt;br /&gt;library_dirs = ['/usr/lib/python2.5/site-packages/'],&lt;br /&gt;&lt;br /&gt;python setup.py build&lt;br /&gt;sudo python setup.py install&lt;br /&gt;&lt;br /&gt;c. Download Data file (This you probably need to update periodically)&lt;br /&gt;http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz&lt;br /&gt;&lt;br /&gt;Test your setup&lt;br /&gt;--------------------------&lt;br /&gt;(From: http://stackoverflow.com/questions/1163136/how-to-detect-the-country-and-city-of-a-user-accessing-your-site)&lt;br /&gt;&lt;br /&gt;I do not completely understand how variables in library are accessed from python.. So I export this variable&lt;br /&gt;export LD_LIBRARY_PATH=/usr/lib/python2.5/site-packages/&lt;br /&gt;&lt;br /&gt;import GeoIP&lt;br /&gt;gi = GeoIP.open("GeoLiteCity.dat", GeoIP.GEOIP_INDEX_CACHE | GeoIP.GEOIP_CHECK_CACHE)&lt;br /&gt;print gi.record_by_name("74.125.67.100") # a www.google.com IP&lt;br /&gt;&lt;br /&gt;{'city': 'Mountain View', 'region_name': 'California', 'region': 'CA', 'area_code': 650, 'time_zone': 'America/Los_Angeles', 'longitude': -122.05740356445312, 'country_code3': 'USA', 'latitude': 37.419200897216797, 'postal_code': '94043', 'dma_code': 807, 'country_code': 'US', 'country_name': 'United States'}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-7740005015688744791?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/7740005015688744791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=7740005015688744791' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/7740005015688744791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/7740005015688744791'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2009/08/geoip-with-maxminds-geolite.html' title='GeoIP with Maxmind&apos;s Geolite'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-8536764988017947851</id><published>2009-07-06T14:23:00.001-07:00</published><updated>2009-07-06T14:26:44.698-07:00</updated><title type='text'>Simple unit convertor in python</title><content type='html'>This function uses the google calculator api &lt;br /&gt;http://www.google.com/ig/calculator?hl=en&amp;q=1EUR%3D%3FUSD&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import urllib, urllib2&lt;br /&gt;import socket&lt;br /&gt;&lt;br /&gt;# Crawl header #&lt;br /&gt;default_header = { 'User-Agent' :&lt;br /&gt;    'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008121622 Ubuntu/8.10 (intrepid) Firefox/3.0.5;'}&lt;br /&gt;&lt;br /&gt;def getpage(pageurl, pageargs = None, pageheaderargs = {}):&lt;br /&gt;  fail = 0&lt;br /&gt;  content = reply_header = None&lt;br /&gt;  pageheaders = default_header&lt;br /&gt;  pageheaders.update(pageheaderargs)&lt;br /&gt;  while True:&lt;br /&gt;    print pageurl&lt;br /&gt;    retry = 0&lt;br /&gt;    try:&lt;br /&gt;      params = urllib.urlencode(pageargs) if pageargs else None&lt;br /&gt;      req = urllib2.Request(pageurl, params, pageheaders)&lt;br /&gt;      page = urllib2.urlopen(req)&lt;br /&gt;      content = page.read()&lt;br /&gt;      reply_header = str(page.headers).split('\r\n')&lt;br /&gt;      page.close()&lt;br /&gt;    except urllib2.HTTPError, e:&lt;br /&gt;      retry = 1&lt;br /&gt;    except IOError, e:&lt;br /&gt;      retry = 1&lt;br /&gt;    except socket.timeout, e:&lt;br /&gt;      retry = 1&lt;br /&gt;    except socket.sslerror, e:&lt;br /&gt;      retry = 1&lt;br /&gt;    if retry:&lt;br /&gt;      fail += 1&lt;br /&gt;      if fail == 5:&lt;br /&gt;        print 'Failed to retrieve' + pageurl + ': ' + str(e)&lt;br /&gt;        return (reply_header, content)&lt;br /&gt;      else:&lt;br /&gt;        continue&lt;br /&gt;    break&lt;br /&gt;  return (reply_header, content)&lt;br /&gt;&lt;br /&gt;def convert(unit1, unit2):&lt;br /&gt;  query = '1%s=?%s' % (unit1, unit2)&lt;br /&gt;  (header, content) = getpage('http://www.google.com/ig/calculator?hl=en&amp;q=' + query)&lt;br /&gt;  reresult = re.search('rhs: \"(.*?) ', content)&lt;br /&gt;  result = reresult.expand(r'\1') if reresult else 'Error'&lt;br /&gt;  return result if result != '' else 'Error'&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-8536764988017947851?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/8536764988017947851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=8536764988017947851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/8536764988017947851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/8536764988017947851'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2009/07/simple-currency-convertor-in-python.html' title='Simple unit convertor in python'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-2523468186478512806</id><published>2009-06-24T07:17:00.000-07:00</published><updated>2009-06-24T07:44:54.793-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python string strip function..</title><content type='html'>I just realized a super blunder, I have committed all my life&lt;br /&gt;&lt;br /&gt;url = 'abcdc.com'&lt;br /&gt;print url.strip('.com')&lt;br /&gt;Expect: abcdc&lt;br /&gt;Resut: abcd&lt;br /&gt;&lt;br /&gt;Instead try&lt;br /&gt;url.rsplit('.com', 1)&lt;br /&gt;&lt;br /&gt;strip function takes in an array of characters and chops any pattern of characters in the array.. :(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-2523468186478512806?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/2523468186478512806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=2523468186478512806' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/2523468186478512806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/2523468186478512806'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2009/06/python-string-strip-function.html' title='Python string strip function..'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-2629827956270836872</id><published>2009-06-12T18:04:00.000-07:00</published><updated>2009-06-12T18:07:36.240-07:00</updated><title type='text'>Lambda function and class in python</title><content type='html'>I had a hash with hash value an object. I wanted to sort by one of the elements (integer) of the class.. Here is neat way..&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class cl:&lt;br /&gt;  def __init__(self, val):&lt;br /&gt;    self.val = val&lt;br /&gt;&lt;br /&gt;arr = {'a' : cl(10), 'ab' : cl(75), 'bd' : cl(50)}&lt;br /&gt;&lt;br /&gt;g = lambda (x, y): y.val&lt;br /&gt;for (x, y) in sorted(arr.iteritems(), key = g):&lt;br /&gt;  print x + ' ' + str(y.val)&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-2629827956270836872?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/2629827956270836872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=2629827956270836872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/2629827956270836872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/2629827956270836872'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2009/06/lambda-function-and-class-in-python.html' title='Lambda function and class in python'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-2981315772915958417</id><published>2009-06-03T13:56:00.000-07:00</published><updated>2009-06-03T14:10:40.817-07:00</updated><title type='text'>Mercurial on code.google</title><content type='html'>I played with mercurial on code.google.. Here are some simple instructions&lt;br /&gt;&lt;br /&gt;a. Create the project in the interface&lt;br /&gt;b. Create a local repository&lt;br /&gt;&lt;br /&gt;hg clone https://USERNAME@PROJECT.googlecode.com/hg PROJECTDIR&lt;br /&gt;&lt;br /&gt;When it prompts for a password, key-in the password available on&lt;br /&gt;http://code.google.com/hosting/settings (Profile &gt; Settings)&lt;br /&gt;&lt;br /&gt;I created trunk directory and stored all the code.. (to allow branching).. This probably not mercurial way and is svnish..&lt;br /&gt;&lt;br /&gt;c. I prefer to edit wiki through mercurial..&lt;br /&gt;&lt;br /&gt;hg clone https://wiki.PROJECT.googlecode.com/hg wiki-PROJECTDIR&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-2981315772915958417?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/2981315772915958417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=2981315772915958417' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/2981315772915958417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/2981315772915958417'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2009/06/mercurial-on-codegoogle.html' title='Mercurial on code.google'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-7144255944423268170</id><published>2009-03-17T13:22:00.000-07:00</published><updated>2009-03-17T13:27:52.748-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>"reset is not a function" - Firebug error</title><content type='html'>I am a newbee to javascripting and I was stuck at reseting a form to default values for 2 full days..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Firebug kept saying&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;$("#addpropertyForm")[0].reset is not a function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Turned out that I had named the reset button as reset...!! &lt;br /&gt;input type="reset" name="reset".....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-7144255944423268170?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/7144255944423268170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=7144255944423268170' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/7144255944423268170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/7144255944423268170'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2009/03/reset-is-not-function-firebug-error.html' title='&quot;reset is not a function&quot; - Firebug error'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-7108389213989123895</id><published>2009-03-13T13:16:00.000-07:00</published><updated>2009-03-13T13:27:14.220-07:00</updated><title type='text'>Django serialization - Deserialization</title><content type='html'>I have a table&lt;br /&gt;desc property;&lt;br /&gt;+--------------------+--------------+------+-----+---------+----------------+&lt;br /&gt;| Field              | Type         | Null | Key | Default | Extra          |&lt;br /&gt;+--------------------+--------------+------+-----+---------+----------------+&lt;br /&gt;| property_id        | int(11)      | NO   | PRI | NULL    | auto_increment |&lt;br /&gt;| property_name      | varchar(30)  | NO   |     | NULL    |                |&lt;br /&gt;| property_address_1 | varchar(120) | NO   |     | NULL    |                |&lt;br /&gt;| property_address_2 | varchar(120) | YES  |     | NULL    |                |&lt;br /&gt;| property_city      | varchar(30)  | NO   |     | NULL    |                |&lt;br /&gt;| property_state     | varchar(30)  | NO   |     | NULL    |                |&lt;br /&gt;| property_pincode   | int(7)       | NO   |     | NULL    |                |&lt;br /&gt;| property_country   | varchar(30)  | NO   |     | NULL    |                |&lt;br /&gt;| property_user_id   | int(11)      | NO   | MUL | NULL    |                |&lt;br /&gt;| property_price     | int(20)      | NO   |     | NULL    |                |&lt;br /&gt;+--------------------+--------------+------+-----+---------+----------------+&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Serialize&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;python manage.py shell&lt;br /&gt;Python 2.5.2 (r252:60911, Oct  5 2008, 19:24:49)&lt;br /&gt;&gt;&gt;&gt; from users.models import Property&lt;br /&gt;&gt;&gt;&gt; from django.core import serializers&lt;br /&gt;&lt;br /&gt;&gt;&gt;&gt; json = serializers.serialize("json", Property.objects.filter(pk=2)&lt;br /&gt;&gt;&gt;&gt; print json&lt;br /&gt;[{"pk": 1, "model": "users.property", "fields": {"property_user_id": 1, "property_state": "aa", "property_country": "aa", "property_pincode": 323, "property_city": "aa", "property_price": 1, "property_address_1": "aa", "property_name": "aa", "property_address_2": "aa"}}]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Deserialize&lt;/span&gt;&lt;br /&gt;&gt;&gt;&gt; json = '[{"pk": 2, "model": "users.property", "fields": {"property_user_id": 2, "property_state": "aa", "property_country": "aa", "property_pincode": 323, "property_city": "aa", "property_price": 1, "property_address_1": "aa", "property_name": "aa", "property_address_2": "aa"}}]'&lt;br /&gt;&lt;br /&gt;&gt;&gt;&gt; for obj in serializers.deserialize("json", json):&lt;br /&gt;...   obj.save()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I finally dint use it because I dint know how to convert a UTF encoded dictionary to string.. shame on me..!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-7108389213989123895?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/7108389213989123895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=7108389213989123895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/7108389213989123895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/7108389213989123895'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2009/03/django-serialization-deserialization.html' title='Django serialization - Deserialization'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-8642108767073960376</id><published>2009-03-11T12:44:00.000-07:00</published><updated>2009-03-11T12:48:14.557-07:00</updated><title type='text'>foreign key across different mysql engines</title><content type='html'>I had a pre existing table(MYISAM) and I was creating new table innodb.&lt;br /&gt;Dint realize for a long time that you cant have a foreign key relationship across 2 tables of different engines.&lt;br /&gt;Error that you would see are&lt;br /&gt;&lt;br /&gt;mysql&gt; alter table property add (FOREIGN KEY(id) REFERENCES AUTH_USER(id));&lt;br /&gt;ERROR 1005 (HY000): Can't create table 'sportland.#sql-134d_a' (errno: 150)&lt;br /&gt;mysql&gt; show engine innodb status;&lt;br /&gt;------------------------                                                                                                                                   &lt;br /&gt;LATEST FOREIGN KEY ERROR                                                                                                                                    &lt;br /&gt;------------------------                                                                                                                                    &lt;br /&gt;090311 15:36:27 Error in foreign key constraint of table sportland/#sql-134d_a:                                                                             &lt;br /&gt;FOREIGN KEY(id) REFERENCES AUTH_USER(id)):                                                                                                                  &lt;br /&gt;Cannot resolve table name close to:                                                                                                                         &lt;br /&gt;(id))                            &lt;br /&gt;&lt;br /&gt;took me sometime to figure out the issue..!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-8642108767073960376?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/8642108767073960376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=8642108767073960376' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/8642108767073960376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/8642108767073960376'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2009/03/foreign-key-across-different-mysql.html' title='foreign key across different mysql engines'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-432627435753787127</id><published>2008-03-22T10:01:00.000-07:00</published><updated>2008-03-22T10:12:23.882-07:00</updated><title type='text'>Qemu and Debian</title><content type='html'>&lt;div style="text-align: justify;"&gt;After a few hiccups, I had a new debian machine running on Qemu in my Ubuntu Gutsy machine&lt;br /&gt;&lt;br /&gt;1. sudo apt-get install qemu&lt;br /&gt;2. wget http://cdimage.debian.org/debian-cd/4.0_r3/i386/iso-cd/debian-40r3-i386-CD-1.iso&lt;br /&gt;Ensure the md5 check sum matches with the site(md5sum debian-40r3-i386-CD-1.iso of the file should match what is there on the server). This would save a lot of trouble. Don't skip it.&lt;br /&gt;3. Create the image file&lt;br /&gt;dd if=/dev/zero of=rootfile bs=1M count=2048&lt;br /&gt;4. qemu -cdrom debian-40r3-i386-CD-1.iso -hda rootfile -net user -net nic -boot d&lt;br /&gt;Install only the base system if you want to save time&lt;br /&gt;5. If you complete the above step... Voila you can now boot into your brand new debian machine&lt;br /&gt;qemu -hda rootfile -net user -net nic&lt;br /&gt;Boot into it and get excited about seeing the shell prompt.&lt;br /&gt;&lt;br /&gt;No wonder I soooooo love debian..&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-432627435753787127?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/432627435753787127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=432627435753787127' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/432627435753787127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/432627435753787127'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2008/03/qemu-and-debian.html' title='Qemu and Debian'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-2114148447392853141</id><published>2008-03-15T01:46:00.000-07:00</published><updated>2008-03-15T01:51:54.394-07:00</updated><title type='text'>New kubuntu system..</title><content type='html'>Here is something I have to brag out. I scrapped the default (only prescribed) OS on my office laptop and installed Kubuntu- gutsy... What a relief..&lt;br /&gt;&lt;br /&gt;Must haves in no particular order&lt;br /&gt;1. Amarok&lt;br /&gt;2. Firefox&lt;br /&gt;3. Compiz &lt;br /&gt;4. Pidgin&lt;br /&gt;5. KNetworkManager&lt;br /&gt;6. Ktorrent (Yes in office laptop.. cant live without it..)&lt;br /&gt;7. Kontact&lt;br /&gt;8. AventailLinuxconnect..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Voila.. I am up and running (Running.. no flying high)...&lt;br /&gt;&lt;br /&gt;Life has never been better..&lt;br /&gt;apt-get... never ending list..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-2114148447392853141?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/2114148447392853141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=2114148447392853141' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/2114148447392853141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/2114148447392853141'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2008/03/new-kubuntu-system.html' title='New kubuntu system..'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-2379818747125776070</id><published>2008-03-12T09:48:00.000-07:00</published><updated>2008-03-12T09:53:04.298-07:00</updated><title type='text'>Torn between C and Java</title><content type='html'>I started my career 3 years back.. Fresh out of college, I stepped into the wonderful world of C and Linux with a great mentor. I dint realise how lucky I am. I have thrown all that away for a few more bucks and great company name. Tomorrow I shall be committing the sin of opening an Eclipse for the first time. Shame on me...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-2379818747125776070?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/2379818747125776070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=2379818747125776070' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/2379818747125776070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/2379818747125776070'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2008/03/torn-between-c-and.html' title='Torn between C and Java'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-8714874515266906557</id><published>2008-02-24T11:32:00.000-08:00</published><updated>2008-02-25T05:48:19.521-08:00</updated><title type='text'>Eternal love - Assembly lines</title><content type='html'>I decided to brush some of basics, before I get on with my life... I picked up random stuff and started reading from middle.&lt;br /&gt;&lt;br /&gt;I. First stop&lt;br /&gt;http://asm.sourceforge.net/articles/linasm.html&lt;br /&gt;Assembly&lt;br /&gt;1. AT &amp;amp; T syntax and Intel&lt;br /&gt;&lt;br /&gt;a. AT &amp;amp; T prefix % for registers  and $ for immeds&lt;br /&gt;movl $1 %eax&lt;br /&gt;movl $0xff %ebx&lt;br /&gt;int $0x80&lt;br /&gt;b. Intel does not use prefix for registers.. mark immeds with b (binary and hexa)&lt;br /&gt;    mov eax, 1&lt;br /&gt;    mov ebx, 0ffh&lt;br /&gt;    int 80h&lt;br /&gt;&lt;br /&gt;Note: directions are opposite .. AT&amp;amp;T src dst .. Intel   dst src&lt;br /&gt;&lt;br /&gt;2. Memory operands&lt;br /&gt;a. Intel&lt;br /&gt;mov ebx, [ebx]&lt;br /&gt;mov ebx, [ebx + 3]&lt;br /&gt;b. AT&amp;amp;T&lt;br /&gt;movl (%ebx), eax&lt;br /&gt;movl 3(%ebx), eax&lt;br /&gt;&lt;br /&gt;a. Intel&lt;br /&gt;instr foo segreg:[base + index * scale + disp]&lt;br /&gt;sub eax, [ebx + ecx * 4h - 20h]&lt;br /&gt;b. AT&amp;amp;T&lt;br /&gt;instr %segreg:disp(base, index, scale), foo&lt;br /&gt;sub -0x20(%ebx, %ecx, 0x4), eax&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. Suffix indicate length of operands&lt;br /&gt;l - long, w - word, b - byte&lt;br /&gt;&lt;br /&gt;Intel&lt;br /&gt;mov al, bl&lt;br /&gt;mov ax, bx&lt;br /&gt;mov eax, dword ptr [ebx]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;AT&amp;amp;T&lt;br /&gt;movb %bl %al&lt;br /&gt;movw %bx, %ax&lt;br /&gt;movl %eax, %ebx&lt;br /&gt;&lt;br /&gt;I dint understand something here... free&lt;br /&gt;&lt;br /&gt;II. Next stop&lt;br /&gt;http://www.scribd.com/doc/6900/PC-Assembly-Tutorial&lt;br /&gt;&lt;br /&gt;1.&lt;br /&gt;6897 - In nibbles (bits) -  1 1010 1111 0001&lt;br /&gt;6897 - In hex                     1  a        f        1&lt;br /&gt;(Group from right.. This is why hex is important... Hex compresses bits and there is a direct conversion possible)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. ASCII - Maps simple characters like A -  65 (I guess).. B-66&lt;br /&gt;Uses 1 Byte&lt;br /&gt;&lt;br /&gt;To accommodate more characters (many other languages) unicode is used&lt;br /&gt;Uses 2 bytes&lt;br /&gt;(Thats all there to unicode.. and the word sounded like a jargon to me all these days.. which stone was I living under)&lt;br /&gt;&lt;br /&gt;3. Compilers convert high level language programs into machine specific instructions for that particular architecture (duh 4 years of education.. you should know it by now...)&lt;br /&gt;&lt;br /&gt;4. I remember wagely, the joy of tying instructions in hex on a 8085 / 8086.. and getting the result. World was lot more simple atleast in college&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8088 / 8086-&lt;br /&gt;Must read - &lt;span style="font-style: italic;"&gt;http://www.cpu-world.com/Arch/8088.html&lt;/span&gt;&lt;br /&gt;16 bit registers - Hence segments of size 64 KB possible&lt;br /&gt;Hence to access more than 64KB(1 MB), the special segment registers CS - code, DS - Data, SS - Stack, Extra ES&lt;br /&gt;1. 8088 16 bits&lt;br /&gt;(address) - Lower order byte&lt;br /&gt;(address + 1) - Higher ordere byte&lt;br /&gt;2. 80386 32 bits&lt;br /&gt;(address) - segment lower order&lt;br /&gt;(address + 1) - segment higher order&lt;br /&gt;(address + 2) -  offset lower order&lt;br /&gt;(address + 3) -  offset higher order&lt;br /&gt;address (segment * 16) + offset&lt;br /&gt;Code segment -&lt;br /&gt;64KB segment, Jump can be short jump within the segment or long jump outside the segment&lt;br /&gt;&lt;br /&gt;Reserved locations&lt;br /&gt;0000h - 03ffh ( Interrupt vectors - 32 bit format segment:offset)&lt;br /&gt;fff0h - ffffh (reset starting point)&lt;br /&gt;&lt;br /&gt;Code segment: holds the code&lt;br /&gt;All instructions that uses the IP (instruction pointer) retrieves the instruction using CS * 16 + IP&lt;br /&gt;&lt;br /&gt;Stack segment:(address) -&lt;br /&gt;All access to Base pointer (BP) and stack pointer(SP) are offsets in segment pointed to SS register.&lt;br /&gt;&lt;br /&gt;Data segment:&lt;br /&gt;All access by AX, BX, CX, DX, index registers (SI, DI) are offsets into segment pointed to be DS register&lt;br /&gt;&lt;br /&gt;Extra Segment&lt;br /&gt;DI by default is used with data segment. During string manipulation this might be used.. (not very clear - free)&lt;br /&gt;&lt;br /&gt;AX (Accumulator)&lt;br /&gt;BX (Base registers)&lt;br /&gt;CX (Counters)&lt;br /&gt;DX (Data)&lt;br /&gt;SP (Stack pointer)&lt;br /&gt;BP (Base pointer)&lt;br /&gt;SI (Source Index)&lt;br /&gt;DI (Destination index)&lt;br /&gt;IP (Instruction pointer)&lt;br /&gt;&lt;br /&gt;Flags&lt;br /&gt;OF - Overflow&lt;br /&gt;DF - Direction flag (For string manipulation)&lt;br /&gt;IF - Interrupt enable flag&lt;br /&gt;TF - Single-Step flag&lt;br /&gt;SF - Sign flag&lt;br /&gt;ZF - Zero flag&lt;br /&gt;AF - Auxiliary flag&lt;br /&gt;PF - Parity flag&lt;br /&gt;CF - Carry flag&lt;br /&gt;&lt;br /&gt;8086/ 8088 - 16 bit + segments&lt;br /&gt;80286 - Protected mode&lt;br /&gt;80386 - Extends registers 32 bit protected mode - Hence 4GB segments possible.. Bulb.. 4GB process space in linux..&lt;br /&gt;80486/Pentium - MMX &lt;br /&gt;AX - 16 bits EAX - 32 bits&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-8714874515266906557?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/8714874515266906557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=8714874515266906557' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/8714874515266906557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/8714874515266906557'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2008/02/eternal-love-assembly-lines.html' title='Eternal love - Assembly lines'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-3314395994383628195</id><published>2008-02-17T12:33:00.000-08:00</published><updated>2008-02-17T14:15:50.115-08:00</updated><title type='text'>Career advice C or Java</title><content type='html'>&lt;div style="text-align: justify;"&gt;For the past three years, I have been a hard core C programmer, working on a variety of open source technologies like qmail, netfilter... Six months back I got an offer from a highly respected company. Good company, nice pay, I couldn't resist the offer. Now only problem, everything is Java.. at least in my locale. I am probably the only person trying find my through Java code using vim, ctags and cscope. I cant bring myself to open a eclipse. So I don't know how it works. Anyways, now I am ready to re look at my decision. Should I let my interest in system programming, C, linux kernel pass and start taking up work in Java.. or should I stick to my interests.&lt;br /&gt;&lt;br /&gt;If I take up Java.. I am scared I will loose touch with system side.. like how do I filter packets of a particular kind.. How many connections are going to server...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If I don't take up Java.. I might earn the wrath of management. Probably cost me the job, I am now used to the comforts provided here..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I badly want to learn assembly language programming... Work on those for my bread.. Am I living in a well... Do people have such cool jobs.. Am I asking for an non feasible job position.  People around me are into Java.. Is this a problem specific to India.. Do these jobs don't get outsourced to India..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is probably one helluva situation.. and I am not sure which way to go..&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-3314395994383628195?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/3314395994383628195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=3314395994383628195' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/3314395994383628195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/3314395994383628195'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2008/02/career-advice-c-or-java.html' title='Career advice C or Java'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-486256397626185940</id><published>2007-12-15T23:37:00.000-08:00</published><updated>2007-12-15T23:44:25.322-08:00</updated><title type='text'>Miscellaneous scripts</title><content type='html'>Initrd image&lt;br /&gt;1.  To create initrd image on debian / ubuntu based systems&lt;br /&gt;update-initramfs  -k 2.6.23.9 -c -v&lt;br /&gt;&lt;br /&gt;2. To unpack initrd image&lt;br /&gt;cpio --extract &lt;  initrd file&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-486256397626185940?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/486256397626185940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=486256397626185940' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/486256397626185940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/486256397626185940'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2007/12/miscellaneous-scripts.html' title='Miscellaneous scripts'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2186785779032659813.post-5782245177931200390</id><published>2007-12-12T07:31:00.000-08:00</published><updated>2007-12-12T08:01:16.673-08:00</updated><title type='text'>Ubuntu  Gutsy 7.10 from USB disk...</title><content type='html'>This article is not intended to be a step by step installation process.&lt;br /&gt;&lt;br /&gt;Why? I wanted to just carry around a usb harddisk around, plug on to any CPU(with BIOS support to boot from external USB disk) and boot from it.&lt;br /&gt;&lt;br /&gt;Hardware. I got a 320 GB seagate harddisk (Requires external power supply) and Zippy cover that connects the hard disk as a USB device on to the machine. Costs totally around Rs.4300&lt;br /&gt;&lt;br /&gt;Some installation considerations&lt;br /&gt;1. Inspite of the fact that my processor is 64 bit, installed 32 bit, as 32 bit machines are ubiquitous.&lt;br /&gt;2. I created a swap partition on the USB, as the host machine can be a W$ only machine. Probably not efficient, as access over USB is definitely slow.&lt;br /&gt;3. I installed on my laptop and dint want the internal harddisk to be touched. I tried booting by disabling it in BIOS, but Ubuntu installer was still able to see it. Wonder how and why?&lt;br /&gt;4. Two problems with MBR grub installation&lt;br /&gt;a. Ubuntu by default installs the MBR on first disk&lt;br /&gt;b. During installation, the USB disk appears second (hd1) and during boot (after installation) appears first (hd0)&lt;br /&gt;How to overcome it -&lt;br /&gt;a. The advanced option on the last screen of installer, allows changes to the partition where MBR is to be installed (change from hd0 to hd1)&lt;br /&gt;b. Once the installation is complete, the /boot/grub/menulist needs to be updated back to hd0.&lt;br /&gt;&lt;br /&gt;Well its worth all the pain.. I have a brand new kubuntu (with Compiz fusion) on it working.....&lt;br /&gt;Kubuntu (Gutsy) + Compiz just rocks...&lt;br /&gt;Going crazy over super + tab and cubes......&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2186785779032659813-5782245177931200390?l=unixdig.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixdig.blogspot.com/feeds/5782245177931200390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2186785779032659813&amp;postID=5782245177931200390' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/5782245177931200390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2186785779032659813/posts/default/5782245177931200390'/><link rel='alternate' type='text/html' href='http://unixdig.blogspot.com/2007/12/ubuntu-gutsy-710-from-usb-disk.html' title='Ubuntu  Gutsy 7.10 from USB disk...'/><author><name>Ramya</name><uri>http://www.blogger.com/profile/08898298530302409444</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
