Wednesday, September 09, 2015

Vim tips

How to navigate between split windows in vim editor

I felt it was time irritating to press ctr+ww to navigate between two split windows in vi editor, I wanted to find a short cut for this as usual I found one from stackoverflow, for other's benefit I am posting here

Basically you need to have a mapping in your .vimrc (which will be in your home directory)

file : .vimrc









These lines maps our ctr+ to up/down/left/right respectively, if you don't like using control you can define your own mappings with single key stroke.



Wednesday, May 05, 2010

Filling property tax online

Hi All, recently I filled my property tax online via BBMP website

http://sasbbmp.com/

I must tell you that filling tax online is just 2 min task , I never ever thought filling property tax form is so easy , thanks to BBMP they made it so easy it's more easier than filling any small online survey :). All you need to do is open the above link select form IV

1. Provide tour SAS number (also called application number) or
2. PID number

both numbers will be available on the previous year tax receipt (2008-09).
All the information will be pre-populated you just need to enter additional details (if missing like rented or occupied etc) which is optional. And next step is to pay online that it.


One more info I would like to share with you all those who paid property tax for 2008-09 in last april/may(or whatever time frame) should also have paid same for the period 2009-10 in last November (which was intimated lately by BBMP this was delayed because they were fixing the tax amount in that period) so by that if you haven't paid yet you are likely to pay fine (i think 2% I paid around 400/-) and also you will not be getting rebate on tax payment so you will be loosing around 550/- for the year 2009-10.
to save all that for the current year 2010-11 pay tax before 30th may 2010 :)

Once you pay tax for 2009-10 immediately application number for 2010-11 will be generated
use this number once again to generate form for the period 2010-11(you can use old SAS or application number also)

Take a print out of both receipt's and keep for future reference.

BBMP Rocks!!!

Wednesday, January 13, 2010

Thats kannada ದಲ್ಲಿ ನನ್ನ ವಿಮರ್ಶೆ

ಜನವರಿ ೨೦೦೮ ರಲ್ಲಿ ನನ್ನ ಗೆಳೆಯ ಸಿದ್ದು ಕರೆ ಮಾಡಿದಾಗ ನನಗೋಂದು ಅಚ್ಚರಿ ಕಾದಿತ್ತು, ನಾನು ಬರೆದ ಗಾಳಿಪಟ ಚಿತ್ರದ ವಿಮರ್ಶೆ
thatskannada.com ನಲ್ಲಿ ಚರ್ಚಿಸಲಾಗಿದೆ ಅಂತ ಹೇಳಿದಾಗ ನನಗಾದ ಸಂತೋಷ ಹೆಳತೀರದು . ಆ link ಶಾಶ್ವತವಾಗಿ ಇರಲೆಂದು ಈ ಅಂಕಣ

ಗಾಳಿಪಟ ಚಿತ್ರದ ಕುರಿತು ನಾನು ಬರೆದ ವಿಮರ್ಶೆ thatskannada.com ನ ಕೆಂಡ ಸಂಪಿಗೆ ಅಂಕಣದಲ್ಲಿ ’ಬ್ಲಾಗ್‌ಮಂಡಲದಲ್ಲಿ ಗಾಳಿಪಟ ಚಿತ್ರವಿಮರ್ಶೆ’ ಅನ್ನುವ ಶಿರ್ಷಿಕೆ ಅಡಿ ಮೂಡಿ ಬಂದಿತ್ತು.

January 12 : National Youth Day



.His thoughts and idea's always inspired millions of Indians specially youths and Indians observe his birthday as 'National Youth Day' every year on January 12.This 12th we celebrated his 147th birth anniversary.


Followings are some famous Vivekananda quotes:

"Take up one idea. Make that one idea your life - think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone. This is the way to success, that is way great spiritual giants are produced."

"We are responsible for what we are, and whatever we wish ourselves to be, we have the power to make ourselves. If what we are now has been the result of our own past actions, it certainly follows that whatever we wish to be in future can be produced by our present actions; so we have to know how to act."

"Never think there is anything impossible for the soul. It is the greatest heresy to think so. If there is sin, this is the only sin ? to say that you are weak, or others are weak."

"You have to grow from the inside out. None can teach you, none can make you spiritual. There is no other teacher but your own soul."

"We are what our thoughts have made us; so take care about what you think. Words are secondary. Thoughts live; they travel far."

"You cannot believe in God until you believe in yourself."

Monday, October 26, 2009

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!!!