Cricket World Cup 2011

Cricket World Cup 2011 Logo I was keeping myself updated and was watching portions of the matches casually but I started watching the matches seriously from the semi-finals. The Ind v Pak match was a fine one (although the next day was one final examination). India-Pakistan matches have always been high-voltage matches. After defeating Pakistan I was feeling like it was the 2003 world cup, India again in the finals. 2003 final match was a painful memory, India was loosing from the very first moment. But in 2011 things have changed Australia is eliminated, and India is the one to do this cleaning job.

Continue reading

Posted in Writings | 4 Comments

Bash Script : Bitwise Not Operation in bash

This is a post to present one method to inverse the bit pattern of an input number, the bitwise not operation on a bit pattern. I am presenting one method which i figured out.
Continue reading

Posted in Computer Science, Linux / Unix Shell | Tagged , , | Leave a comment

Simpson’s 1/3rd Rule

A brief introduction to the Simpson’s 1/3rd rule and a uniform interval Composite Simpson’s 1/3rd Rule implementation.
Continue reading

Posted in Coding Discussions, Computer Science | Tagged , , | 1 Comment

Bash Script: Generating Primes within Range

Objective

Generating prime numbers within a range using bash script. The technique used in this implementation to generate the prime numbers is still the good old divide and check method, but with some tweaks attempting to make the execution a bit better.

Approach

The core method is, we check if an integer p is prime by:

  1. Dividing with integers which are not multiples of 2′s and 3′s
  2. Dividing with integers upto floor ( sqrt ( p ) )

The integer p itself is needed to be not divisible by 2 or 3 or both.
Read more to get the bash script

Posted in Computer Science, Linux / Unix Shell | Tagged , , | Leave a comment

Rockbox in iPod Video 5G

For a long time i am using the Rockbox OS in my Apple iPod Nano 1G as the primary OS, which also has iPodlinux and ofcourse the Apple OS installed. You can find the step-by-step guide how i made this stuff here : Triple Boot Your iPod. Yesterday my brother asked me if there are other options for his iPod Video 5G, and can it be dual booted just like a computer. Because what he wants is operational iPod, i stroke iPodLinux out of the list, as has a lot of problems (sorry for that). Rockbox is the primary choice which gives tons of features and also performance. I sat down and started to follow my own guide, three causes: [1] Wanted to make sure nothing goes wrong, [2] Wanted to see if the guide i wrote is really a helpful one, [3] It is still thrilling. Although there is no need to manually install Rockbox as they now supply auto installers, but installing manually although needs some time and might need some responsibility, but with auto install messing things up is as easy as installing with the auto installer. Although i should not comment about the Rockbox auto installer, as i have never used the installer in a proper manner, and have just had a look at it. I would encourage you to use Rockbox auto installer, they have provided every recourse and features which can be installed in your iPod and all kind of links in that compact installer, and is recommended. You can get it here: http://www.rockbox.org/download/
I am re-writing only the Rockbox installation process, probably this would be a bit easier to read than the previous guide, for the people who wants to avoid installing iPodLinux.
Continue reading

Posted in GNU+Linux+FOSS, Tutorials | Tagged | 2 Comments

Trapezoidal Rule

A brief introduction to the Trapezoidal rule and a uniform interval Composite Trapezoidal Rule implementation.
Continue reading

Posted in Coding Discussions, Computer Science | Tagged , , | 2 Comments

Balanced Parenthesis Check

Objective

To check if an entered string containing nested parenthesis are balanced and valid. This write-up presents a function with which a string is checked for balanced parenthesis.
Continue reading

Posted in Coding Discussions, Computer Science | Tagged , | 5 Comments

GCD of n integers

Greatest Common Divisor

Let a and b be integers, not both zero. The largest integer d such that d exactly divides both a and b is called the greatest common divisor of a and b . The GCD of the two integers a and b is denoted as gcd(a, b)
Continue reading

Posted in Coding Discussions, Computer Science | Tagged , | Leave a comment

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

Posted in Computer Science, Linux / Unix Shell | Tagged , , | Leave a comment

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

Posted in Writings | 3 Comments