Sunday, May 05, 2013

Indian passport renewal - correct link to track application status

Soon after sending the application via mail, you'll receive an email saying the application has been accepted. The email will provide the application reference number, but the link to track the application is incorrect. The correct VFS site to track the application status is:

https://www.vfsglobalonline.com/IHC-USA-TRACKER/GlobalPassportTracker.aspx

Hope this helps someone

Saturday, April 14, 2012

Kernel driver not installed (rc=-1908) - VirtualBox startup error

Got the "Kernel driver not installed (rc=-1908)" error while trying to power-up my Win virtualbox on Ubuntu today. I had upgraded my kernel a few weeks back and looks like the virtualbox kernel driver needs to be reloaded. The fix: instalk dkms and run vboxdrv setup as below:

sudo apt-get install dkms
sudo /etc/init.d/vboxdrv setup


#$ sudo /etc/init.d/vboxdrv setup
 * Stopping VirtualBox kernel modules                                                                                            [ OK ] 
 * Uninstalling old VirtualBox DKMS kernel modules                                                                  [ OK ] 
 * Trying to register the VirtualBox kernel modules using DKMS                                               [ OK ] 
 * Starting VirtualBox kernel modules                                                                                               [ OK ] 

Friday, June 17, 2011

Sleep sort - ingeniously funny!

For the last two days, the Amazon intern group has been flooded with emails about a new sorting algorithm some guy "invented". Nope, it is not the usual 'yet another sorting algorithm'. This one is ingenious in that it lets the handler of an element sleep for a time based on the value of that element. That way when they come back, all threads get in line and the values are sorted. The other funny part about this, apart from the concept, is that its coded in shell script (barely 10lines)!!

Check out the new addition to Wikipedia's infamous list of "humorous sorting" algorithms: sleep sort (or derp sort!) - http://dis.4chan.org/read/prog/1295544154

p.s: Turns out this is a mod of bogosort. Check out bogobogosort for a even bigger laugh!

Monday, January 24, 2011

The awesome weirdness of latex... On \begin{table} cross references

In Latex2e, always remember to put \label in the \caption command or just after it. Else latex might get the cross-references wrong!

Example: In a recent paper, I created this table: 

 \begin{table}[t]  
   {\small  
     \caption[]{my caption}  
     \begin{tabular}{|c|cl|}  
       ...  
     \end{tabular}  
   }  
 \vspace{-4mm}  
 \label{tab:agg}  
 \end{table}  

\end{table}

And, I referenced it in the document as \ref{tab:agg}. Even though it was the first table, the compiled version read "Table 4"!! After cracking my head against this by resetting counters and creating new counters for the table, I found that the real problem was the placement of the \label. Once placed like this below, the cross-references work just fine:


 \begin{table}         
   \caption{my caption}      
    \label{tab:label}            
 \end{table}         
  or  
 \begin{table}  
   \caption{my caption%  
    \label{tab:label}}  
 \end{table}  




Saturday, January 08, 2011

The Mind and the Marathon

While doing my usual Saturday morning run today and having the mind wander between my thesis work and the upcoming 26.2, I thought it might be nice to record some of my experiences from my previous marathon. So here it goes.

Its all in the mind. The Marathon - a distance of 26mi and 385yards, or 42.2 km - is often regarded as testing the limits of human physical performance and capabilities. Bu
t what is equally important and often eclipsed by other things in running books and which I realized for the first time on 20th Dec 2009, is the need to condition and control the mind during this long 3+ hour road race. For a fairly trained person (read: someone who has been running regularly for an year or more) the marathon itself comes out as an nice opportunity to test and find your endurance peak. But in that its also a good test for the quality of your grey cells!

Get ready for some serious fun. The day itself rolls out well and the exertion and abuse your muscles endure is often masked by the excitement of being in and completing the race. However, during this period when the legs are super busy the mind is free to take a long trek into the annuls of the unknown. Often what happens is that one starts with a boat load of adrenaline and takes to the running passionately - excited by the mass of runners and cheering folks. All is well. Then the cramps and pain begin shooting from "new" muscle groups (muscles you never realized you had!) and the mind starts to extrapolate on what damage might have happened. In other times there is just nothing new... the road ahead seems endless (eve
n at the 25th mile!) and the mind doesn't have much to work with, so one gets "bored" and starts to think about taking a walking break and thus slowing down. Near the end or around the 24th mile mark, the lower body is so confused by all the pain signals it gets that it cancels them out, and it begins to feel comfortably numb. All one can do at this stage is to maintain pace by putting one foot in front of the other and mentally try to keep going. Take shorter strides with faster recovery and maintain the pace. I believe that a significant part of getting a good time on a marathon or any competitive race is knowing how to tame the mind.

The joy of music? Having an ipod streaming music into your ear might be one way to distract the mind, stay on track and not feel the pain, but it also leads to lesser enjoyment overall. Perhaps that is one reason why the Boston Marathon infamously does not allow heaphones, or recently even iPods!

Mind you body. The need for proper food, stretching and warm-ups has been well elaborated in most books. I recently added two books to my reading list. One is "
Running-Getting Started" by legend Jeff Galloway (who incidentally was in Gainesville a few months back as part of the Florida Track Club FTC talks) and the second is "The Marathon Runner's Handbook" by Bruce Fordyce with Marielle Renssen. Both are excellent sources of information for anyone from a beginner in recreational running to serious road racers. There are a few chapters in these books talking about how to stay motivated and enjoy your run which I find very interesting. Galloway's infamous advice is to take walk breaks early in the race, a technique he claims only helps improve overall running time and the experience. Though I find this hard to digest, I have realized that one needs to train to walk n drink and then start running again. Doing this run - walk n drink - run routine takes a while to get used to. Its particularly challenging at 20+ miles where a "small" walk break can easily eat up valuable time. So being able to walk n drink fluids in a marathon and still maintain a competitive time is another test of one's cognitive conditioning.

Train. Finally, the marathon is an endurance test and the best way to crack it is to train, train and then train a bit more. After all lots of exercise only does one good. Just remember to enjoy doing it!
With 42 days left for my second marathon, I have started to hike up those daily miles now. The goal is to reach optimum performance about four weeks before race-day, so thats around Jan 17th. And as a note, a good way to record and keep a journal log of your training activities is: http://dailymile.com/.
 
Happy running!

Over and out.

Friday, January 07, 2011

Tracking file/directory changes in Ubuntu

Recently, I was wget-ting a large amount of hurricane data from multiple sources -to the tune of several hundred gigs. These were gzip compressed files and so my perlscript had to download, unzip and then run some cleaning and integration code on all the data, while keeping track of the source locations and possible errors in the whole process. Since the uncompressed data volume was ~5TB, I had these things running in parallel... for most part. ;)

Anyways, the simplest way to get "live" updates of file changes by tracking their sizes is like this:
watch -n 1 --differences du -h
or watch -n 1 --differences ls -lh ~/downloads
This basically gives you highlighted updates on the file sizes every 1sec. Note how the watch command keeps du "alive".

Undoubtedly the best part about any *nix system is the terminal!

Wednesday, December 22, 2010

Setting up Gatorlink and CISE email on Thunderbird

Here are the settings for Gatorlink and CISE email accounts valid as of Dec-2010:

Gatorlink email settings for Mozilla Thunderbird on Ubuntu linux:

Outgoing SMTP:
Server name: smtp.ufl.edu
Port: 587
Authentication Method: Normal Password
Connection Security: STARTTLS
Username: your_gatorlink_username

Incoming IMAP:
Server Name: imap.cise.ufl.edu
Port: 143
Connection Security: NONE
Authentication Method: Password, transmitted insecurely

CISE email settings for Thunderbird on linux:

Outgoing SMTP:
Server name: mail.cise.ufl.edu
Port: 465
Authentication Method: Normal password
Connection Security: SSL/TLS
Username: your_cise_user_name

Incoming IMAP:
Server Name: imap.cise.ufl.edu
Port: 993
Connection Security: SSL/TLS
Authentication Method: Normal Password