Monday, January 26, 2009

Forum.NOKIA Calling All Innovators contest application demo

This was my application for the Forum.NOKIA Calling All Innovators Contest.

Converting a decimal integer to binary in C

This is some C code that I wrote to convert a decimal integer to its binary equivalent. Most programs written to do so convert the decimal to a string, or an array, of the consecutive remainders modulo 2, which is then printed out in reverse order to get the binary equivalent. However I wanted an integer output of the binary equivalent. So this is what I did.

#include<stdio.h>
int power(int power)
{
int i,p=1;
for(i=0;i<power;i++)
p*=10;
return p;
}
int dectobin(int dec)
{
int bin=0,s[15],i=0,j;
while(dec!=0)
{
s[i]=dec%2;
dec/=2;
i++;
}
for(j=i-1;j>=0;j--)
bin+=s[j]*power(j);
return bin;
}
int main()
{
int num=114;
printf("The binary equivalent of %d is %d\n",num,dectobin(num));
return 0;
}

Tuesday, December 23, 2008

Hidden menu item in Nokia series 40 phones

I just discovered a hidden menu item in my nokia 3110c phone; the trick also works in the Nokia S40 SDK emulator.
  1. Go to Calendar
  2. Select "Options" -> "Go to to-do list"
  3. Select "Back" -> "Back"
Now you reach a hidden menu called "My files" that contains "Gallery", "Media" and "Organiser". What is interesting is that the three items are numbered 1,3 and 4! Sounds like a perfect Easter egg!

Monday, December 22, 2008

Bad internet access speeds for users in Asia and Middle East

There has been a damage to undersea cables linking Europe and Asia on 19th December, resulting in disruption of internet traffic in the Middle East and several parts of Asia, as pointed out by Amit Agarwal. India has been particularly affected. I have been experiencing reduced access speeds on my TATA Indicom broadband connection, and I came to know the truth today (even the customer care guy couldn't tell!).

Links:
http://gigaom.com/2008/12/19/malta-undersea-cable-fail/
http://www.labnol.org/internet/favorites/the-ships-that-cut-the-undersea-internet-cables/2904/
http://news.bbc.co.uk/2/hi/technology/7792688.stm
http://fibresystems.org/cws/article/yournews/37128