awk to the rescue

Some days back I got a collection of 100 Greatest Piano Works cd collection. The first thing I did was to rip the CD in flac and preserve a lossless copy of the disks. Then I converted those to ogg files (with oggenc ) so that I could take it in my iPod and listen at any time. The problem occurred at the final moment when I realized that the file names were really long and which would be very difficult to scan through my iPod (with Rockbox). The file name was in this format : %n – %a – %t.ogg  for example : For example :
“17 – Robert Schumann (1810-1856) – THE DAVIDSBÜNDLER DANCES, 18 CHARACTERISTIC PIECES, OP. 6: XIV. Zart und singend – Dolce e cantando.ogg” . The western classical musics this combination is very long most almost all the tracks, and these files with huge file names and lot of files having ‘:’ in the name being refused to copied directly. So I needed to truncate or rename the 100 files in a way so that they are identifiable and also truncated to short names.
I decided to keep only the track name and composers names (%n – %a fields), by renaming the files with some batch file renaming process. Continue reading “awk to the rescue”

Some Coffee in Cafe Coffee Day

We entered a Cafe Coffee Day shop a bit away from the main road clutter near Bejoygarh, to get better ambience than the loud SouthCity Shopping mall outlet. We selected a corner and had a seat, and waited for the menu card. It seemed like we are invisible because the menu card was distributed to the other tables occupied after our arrival. We were joking on the significance of a drink named “xxx” displayed on the case, suddenly the menu card came, with an apology from the waiter. Continue reading “Some Coffee in Cafe Coffee Day”

See what is behind the shortened URLs

Firefox Logo
Short URLs are all over the web with many URL shortning services, like tinyurl.com , bit.ly , tr.im and even the wordpress.com blogging service has their own URL shortening service for the blog posts : wp.me. This is a very convenient feature and best suitable for social networking, by keeping messages short and cleaning the mess of long URL’s. This comes with a cost. You cannot know what is the final destination of the shortened URL, where it will take your after resolving. It can be a malicious site with scripts running behind which can do damage to the system or anything. But until today i did not think it was necessary. I just got a scrap in Orkut containing a shortened URL which was suspicious as it was sent to 246 people. I wanted to see what’s behind it without clicking it.
Continue reading to know how to elongate the URLs

Sieve of Eratosthenes : A basic implementation

The Sieve of Eratosthenes is a process to find all primes not exceeding a specific positive integer. The process is simple. First all the numbers within the range is populated in a list.The process strikes out all the numbers in the list which are multiple of some previous number. This strike-out process starts with the integer 2, thus first all the multiple of 2 upto the limit n are striked out. Note that the number 2 itself is not striked out, because it is not a multiple of any integer lesser than it (except 1). Next the just following unstriked integer is selected, which is in this case 3, and then all the multiples of 3 are striked out from the like, and again the next unstriked out integer is selected and the process continues until no such integer remains in the list which is unstriked and a multiple of some integer lesser that it. Note that the next integer to strike out after the ith unstriked integer is i * i , as all the multiples of i less than i are striked in the previous passes. At the end if the process only those numbers will be still unstriked in the list which are not a multiple of some other integer lesser that it, thus only the prime numbers will remain unstriked in the list. At the end of the process the list can be rescanned and the unstriked integers could be found.
Read more about Sieve of Eratosthenes here: http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
Read the complete implementation

Hilarious Physics Practical

I was almost at the end of my 2nd half of the Physics Practical final examination, when a guy came to start his 2nd half, and asked me : “Is this the Bridge Rectifier?” , I told “yes”. Next question “Do you know how to do it?” I told “yes” , he replied “Please tell me how to do it” . I informed him that I was busy with my one and could not provide any help at that moment. Minutes passed by, the teacher came and tried to guide the guy through the practical. The teacher almost did everything of the practical and instructed how to do it. I was not paying attention much but the real story started when I went to sign my copy.
Read the full story

Valve Portal Gameplay Video : TestChamber 10 to 14

valve_portal_logoHave you played the Valve Portal game ? It was the most different and probably the best after HalfLife2 . After completing Valve Portal, I to recorded my gameplay videos. It was difficult to determine how to play when recording. A level can be played in more than one ways. I tried to be a bit slow on the game and give the viewer a chance to enjoy the videos. Here are mode videos others are yet to be uploaded. And i also think some needs re record, as some of the gameplay looks clumsy. I will post the game play 5 videos a page. Below menu will be updated with new posted videos.

Yet another set of 5 videos. This post contains TestChamber 10 to 14
See the gameplay videos of TestChamber 10 to 14