Monday, October 26, 2009

No comments

Thursday, September 03, 2009

Pioneer car audio models

Those who looking for Pioneer car audio system , here is the link
It got a variety range of products its good to buy a headunit with rear USB.

http://www.team-bhp.com/forum/product-discussions/32176-new-pioneer-car-systems-launched-3.html

And for speakers I am going with polk audio DB691

Friday, July 10, 2009

How do I find the current machines full hostname in C (hostname and domain information)?

I was searching a easy method to get hostname , when i googled i got some info and here i added some of them and also some tried on my comp of my own , it may come handy sometime never know ;-)

To get a fully qualified name for a machine, we must first get the local hostname, and then lookup the canonical name.

The easiest way to do this is by first getting the local hostname using uname() or gethostname() and then performing a lookup with gethostbyname() and looking at the h_name member of the struct it returns. If you are using ANSI c, you must use uname() instead of gethostname().

Example:

char hostname[1024];
hostname[1023] = '\0';
gethostname(hostname, 1023);
printf("Hostname: %s\n", hostname);
struct hostent* h;
h = gethostbyname(hostname);
printf("h_name: %s\n", h->h_name);
Unfortunately, gethostbyname() is deprecated in the current POSIX specification, as it doesn't play well with IPv6. A more modern version of this code would use getaddrinfo().

Example:

struct addrinfo hints, *info, *p;
int gai_result;

char hostname[1024];
hostname[1023] = '\0';
gethostname(hostname, 1023);

memset(&hints, 0, sizeof hints);
hints.ai_family = AF_UNSPEC; /*either IPV4 or IPV6*/
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_CANONNAME;

if ((gai_result = getaddrinfo(hostname, "http", &hints, &info)) != 0) {
fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(gai_result));
exit(1);
}

for(p = info; p != NULL; p = p->ai_next) {
printf("hostname: %s\n", p->ai_canonname);
}
Of course, this will only work if the machine has a FQDN to give - if not, the result of the getaddrinfo() ends up being the same as the unqualified hostname.

One more method to find hostname is using uname command
#uname -a [which is a command line utility]

If you want to use in prigram you can use uname() system call (I often use in my code)
#include

main()
{
struct utsname buf;
if ( uname(&buf) <>perror("uname");
printf(" hostname= %s ",buf.nodename);
}

uname is a very usefull system call it also provide info like
sysname,release ,version, (whatever you see when you execute uname -a command)

Hope it helps some one seeking for this , as I did ;-)

Tuesday, March 10, 2009

Get Train Details through google talk


My friend Vinod sent this link, when i read subject line i am excited to see now what from google, I read the mail  and tried the links it was simply amazing!. We always complain with IRCTC or any other web portal which don't have any live info here is the answer for that. You can interact with the virtual person ;-) sitting beside cleartrip.
It's very simple to get started

Add cleartrip.trains@gmail.com to your Gtalk friend list to search the Indian railways train.
After ten minutes you see "cleartrip.trains"  is added to your gtalk list and shows available.

So once you are done with this process just type "command" to get commands to interact it will list all the commands available for user (its a kinda help in other terms) as shown below

cleartrip.trains:  
book followed by train number and optionally passenger details - to book ticket. Ex. 'book 2925' and 'book 2925 adults 1 children 2 senior male 1 senior female 1'
pnr pnr number - check pnr status. Ex. 'pnr 123 4567890'
return date - search for return journey. Ex 'return 10th march'
avail train number - check availability of a train. Ex. 'avail 2925'
invite gmail id - invite friends
feedback your message - to send feedback to cleartrip
clear - clear your search history

So i thought i should give a shot to check this i entered following text in the chat window

me:  Bangalore Gulbarga Mar 12 3A
cleartrip.trains:  Searching for trains between Bangalore and GULBARGA on 12 Mar class 3A
6513 - Basava express Rs. 716, @ 17:25 [Available 18]
1014 - Lokmanya tt exp Rs. 738, @ 15:25 [Waitlist 11]
2627 - Karnataka exp Rs. 769, @ 19:20 [Waitlist 6]
6530 - Udyan exp Rs. 738, @ 20:10 [Waitlist 7]

To check availability say 'avail' followed by train number
To book say 'book' followed by train number and passenger details. Ex. 'book 2925 adult 1 child 1 senior female 1'

This is a amazing piece of work .. google is making life a lot more easier 
GOOGLE ROCKS!!!

Monday, October 20, 2008

Live Traffic Monitoring on Web


Nice service by Mapunity. A new web portal to get live information on traffic status, directions and auto fares for the following cities:

http://www.dtis.in/ for Delhi

http://www.btis.in/live.htm for Bangalore ( This includes live traffic cam )

http://www.ptis.in/ for Pune

http://www.htis.in/directions.htm for Hyderabad

http://www.chennaitraffic.in/ for Chennai

With the help of traffic police, they have launched a live traffic portal (Transport Information System) where you can find:

1. Optimal routes between any two places in the city
2. Auto-fares
3. Bus routes and stops, etc.

Guys lets take use of this service, bangalore Police great going , Keep the good work.

Tuesday, August 05, 2008

Moggina Manassu : Review


Cast : Shubha Poonja, Radhika Pandit, Yesh

Director : Shashank

Kannada movie industry is really going through a golden era, the directors doing a great job with their original, fresh, youthful scripts. This time the surprise came in a small package called Moggin Manassu.

Moggina manassu story is about 4 teenaged girls each of them with different mindset.

The movie starts with a flashback, where Chanchala (Radhika Pandit) belongs to a middle class family being ragged by her seniors on the first day of college. She meets another girl Renuka (Shubha Poonja) who comes from a remote village to pursue her studies. In a short time they become very close friends. Things starts changing in their lives (dressing style, speaking) when they meet two of their seniors and their boy friends. These innocent girls start haunting for their boyfriends. The film is all about how they find their boyfriends, what mistakes they do in their so called dangerous teen age, how they learn from their mistakes, how they overcome from all these and take life seriously.


If you talk about actors the real surprise is Radhika Pandit who has done exceptionally well in her first film. To enact a complex character in her first film can be a big challenge to any fresh talent, but Radhika Pandit has been able to manage a miracle. Shubha (who appeared in Chanda with Vijay) has done justice to her role, The other two girls Sangeetha Shetty and Manasi have limited opportunities still they managed to get attention , Rajesh is just perfect for his role , Yesh has nothing much to offer in the film. Actor in Radhikas father role is noticeable.

The films credit should go to Director Shashank, its yet another triumph . He has narrated a simple story in so effectively that today's teenagers would be able to identify themselves with these characters.The director has tried (and succeeded in most parts ) to convey a message to youths with his interesting narration and believable story. No doubt he will be considered as one of the finest directors of Kannada films and film too.

Moggina Manassu has some fantastic technical work which enhances the film's quality. Mano Murthy once again comes out with his melodious tunes, Chandrashekhar has shown his brilliance behind the camera you find a freshness in every frame of the film.

Its a must for every teenage girl who just entered into college and for their parents, no surprise if you remember your college days while watching this movie, Dont miss it.

Thursday, July 24, 2008

A day out @ Innovative FilmCity

This time we planned to celebrate my birthday differently than usual (going to some restaurant and having food). We planned to visit any near by places where we can hangout,travel less as well as enjoy more together , we started looking on internet (the only place for people like us) for such a place, meanwhile i remembered an article about Innovative Filmcity which opened near Bidadi recently, and many people told that its good choice to spend day with friends(later i came to know that its good with family :)). So what more we need Siddu, Anand, Sanjeev & I started our journey from Satellite busstand (as we were short of a bike)you will get lots of buses (almost one for every fifteen minutes) its 28 KM from that place on Mysore road.once you reach Bidadi we took a Auto from there its around 6 KM from Bidadi near Toyota Kirloskar factory. For the first time i saw a auto carrying 8 people (i am thinking why the hell we need Volvo buses )and we were 4 of them :) ,they charge 5/- per head.We saw a board saying outside food is not allowed than i guessed it got restaurants also. When we saw its entrance we all utter the same word WOW!.


Entrance is 50/- per head and you need to pay separatley inside for games/gallery/water sprots.
Once you Enter to FilmCity you see many things i have captured some of those, have a look

Old tent style cinema hall

Dinosaur World , good for kids actually we got bored while watching those plastic giants but some kids were crying like anything beacuse of their movments
Fossil Museum again its same as Dinosaur park , good for kids.

4D cinema hall
One of the best spot of filmcity is 4D film , the show starts at every 20 minutes (movie length is about 16 minutes) we had a lots of fun here and it was a amazing experience and if you wondering what is this 4D (we heard of 3D all the time) well i am not going to tell that you experience it.
Along with this you also find FUNPLEX where you find loads of different video games ( i bet children will never come out of this ;-) ) and also some fun electronic games for kids.
For water lovers there is a AQUA KINGDOM , for racing lovers go karting.
Have fun with yor kids AT CARTOON CITY , MIRROR MAZE & go for horse riding :) .
Avoid these - FOSSIL MUSEUM, WAX MUSEUM, GUINNES WORLD RECORD, MINI GOLF .Haunted Mansion & Mock sets were not yet ready , by this time they might have opened. Food is available inside you get all types of food Sounth & North Indian, pizza , chats etc.
Its preferable to go with kids , its strictly not for adults who are expecting a excitment like Wonderla

Some locations are good for taking pictures like the one above
How to reach : Bidadi its 30 KM away from Bangalore on Mysore road.
Transportation : Bus ,auto (from bidadi to film city).