The Google India Women In Engineering Award 2010   2 comments

Hello Googlers!
I am pleased to inform you about The Google India Women In Engineering Award 2010‘. This is an initiative launched by Google India in 2007-2008 with an objective of recognizing and rewarding deserving women students in the field of Computer Science In this third edition of our awards, we welcome applications from female students pursuing Bachelors, Masters and PhD in computer science, who meet the eligibility criteria. Applications are open from15th Sept ’09 to 31st Oct ’09. A group of most deserving students will be chosen form the applicant pool and the award recipients will receive a sum of INR 100,000 each.Highlights of the last years awards can be found on the website.
Feel free to share this within your friends network.
For any questions, please write in to ind-diversity@google.com
I wish i would be from Venus! :)

Posted September 18, 2009 by neeraj in Notice

Tagged with , , ,

Turned my Ubuntu’s desktop as Fedora’s!   1 comment

I always had a willing to turn my desktop as fedora’s desktop. In my UbuntuBox, the desktop doesn’t show the computer’s icon, the Home folder or the trash. But now, all are there in one go. Have a look:

All icons

All icons

What say?? All you have to do is to install Ubuntu Tweak. Launch it from Applications-> System Tools-> Ubuntu Tweak.

Tweak your Ubuntu

Tweak your Ubuntu

Go under the tab Desktop->Icons and do whatever you want. That’s it! It has so many other features, explore as much as you can! Cool na! :)

Posted September 11, 2009 by neeraj in Fun, Linux tips and tricks, new release, Techtip, ubuntu

Tagged with , , , , ,

LAMP installation on Ubuntu 9.04   6 comments

Last night, i was thinking of configuring LAMP on my UbuntuBox. LAMP is an open source Web development platform that uses Linux as the operating system, Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language. (Sometimes Perl or Python is used instead of PHP.) Because the platform has four layers, LAMP is sometimes referred to as a LAMP stack. Stacks can be built on different operating systems. Developers that use these tools with a Windows operating system instead of Linux are said to be using WAMP; with a Macintosh system, MAMP; and with a Solaris system, SAMP.

I tried the following and got success:

Open terminal and typed:

neeraj@nee-pc:~$ sudo apt-get install lamp-server^

The total size downloaded was 43 mb approx and took about 20 minutes.
let us see, whether the installation succeeded??
open Firefox and type http://localhost/ . If the browser displays "It Works", means the installation is successful.

PHP test:

type in the terminal the following

neeraj@nee-pc:~$ sudo gedit /var/www/testphp.php

and type in the following code:

<?phpinfo();?>

Save and close the file and restart Apache by:

neeraj@nee-pc:~$ sudo /etc/init.d/apache2 restart

Open the browser and put http://localhost/testphp.php in the addressbar, hit enter and if you see the following, php has been successfully installed.

php info
php info

Next is the turn of MySQL:

MySQL has to be bound with the localhost so type in the following to check whether the bind-address is 127.0.0.1?

neeraj@nee-pc:~$ gksudo gedit /etc/mysql/my.cnf

I also installed phpMyAdmin which is optional:

open terminal and type

neeraj@nee-pc:~$ sudo apt-get install libapache2-mod-auth-mysql phpmyadmin

After this type in:

neeraj@nee-pc:~$ sudo ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin

type in http://localhost/phpMyAdmin in the addressbar of your browser and you get the following homepage:

phpMyAdmin
phpMyAdmin

Log in with the MySQL accoun and you are done. I forgot the password and hence tried the following:

sudo dpkg-reconfigure mysql-server-5.0

to reset the MySQL Password.

Now, everything’s peachy. :)

neeraj@nee-pc:~$ gksudo gedit /etc/mysql/my.cnf

Posted September 8, 2009 by neeraj in LAMP, Linux tips and tricks, Techtip, ubuntu

Tagged with , , , , , , ,

Artha – Open Thesaurus   3 comments

Although Ubuntu and several other Linux Distros provide it’s own dictionary which connects online to give you the results. Meanwhile i was thinking of something like Wordweb in windows. I found one mail regarding the same ..i managed somehow to install Artha on my UbuntuBox..it works good..and i love it…

The open dictionary
The open dictionary

Posted August 25, 2009 by neeraj in new release, ubuntu

Tagged with , ,

Running Servlets! Tomcat and JDK configs.   3 comments

Though this post is worthless for a developer who is in touch of these at priori, but it matters much for the newbies who do it without any help and succeed. That newbie is of course, i am!
Well.. past a week, Ritu (one of 2nd yrs.) asked me about the problem she was facing with the Java servlets and mapping. As i was aware of running only simple Java programs (of cors, without any help of apache), i made some permanent changes in the system environment path variable so that she might not face any problem with the paths of the servlet or java codes. For mapping purpose, i was unable to instruct her anything because it was quite a new thing for me (Goddamnit… :( i never tried these things even on my UbuntuBox). Yesterday, i was pinged by Amit (another 2nd yr. guy) for more or less the same problem. So, i thought that it would be better if i somehow do it myself on my box and then on others. After such a long time, i prepared myself to boot windows and do the things as required. I uninstalled the previous JDK and downloaded the fresh one from Sun’s site. I already had Tomcat 5.5.20 downloaded from DC++ when i was in BHU (Thanks to IT-BHU guys..they share whole lot of things whether you require it or not), though never used before purposefully. If you don’t have, download it from Tomcat’s site.
I installed Java Development Kit followed by Tomcat with its default settings. Started the server manually, and tested it by typing http://localhost:8080 (i used firefox…i feel people get stuck when they try it on Internet Explorer, without changing the port 8080 to 80. Microsoft itself has it’s IIS). The index page was shown, i felt a bit relaxed as apache was running successfully.
I also explored the documentation a bit.
Thereafter a bunch of tragic things persistently came to bother me. Let’s chuck them off and see some easy steps to make the things work:

a) I turned on servlet reloading, by editing install_dir/conf/context.xml and changed

    <Context>

to

    <Context reloadable="true">

b) Enabled the invoker servlet which lets us run servlets without first making changes to our Web application’s deployment descriptor (i.e., the WEB-INF/web.xml file)
To enable the invoker servlet, uncommented the following servlet and servlet-mapping elements in install_dir/conf/web.xml.

    <servlet>
        <servlet-name>invoker</servlet-name>
        <servlet-class>
          org.apache.catalina.servlets.InvokerServlet
        </servlet-class>
        ...
    </servlet>
    ...
    <servlet-mapping>
        <servlet-name>invoker</servlet-name>
        <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>

c) Created a Development directory in C:, where i could write all the servlet codes and compile them sideways.

d) Then arrived a situation when i had to set the CLASSPATH in a batch file named autoexec.bat in C: drive itself (where the development directory lies). OMG! i edited this file with the following approximately 20 times when i got success:

set CLASSPATH=.;
C:\Servlets+JSP;
install_dir\common\lib\servlet-api.jar;
install_dir\common\lib\jsp-api.jar

I Googled to find out this link which says these lines should be in one line. Servlets+JSP is the directory i had just created.
i saved the autoexec.bat file there in C, and put a sample servlet code in the development directory. Compiled it with javac, only to find some errors which said that javax.servlet.blah blah is not found.
I was seriously not enjoying the thing as it was turning bad to worse after doing any changes anywhere. As a newbie..i uninstalled the jdk, reinstalled it with no changes, but compilation failure was a must. I left no stone unturned last night around 3 am to serve the purpose but, in vain before i slept. Today, in the evening, i was trying my luck to do the same thing. Did everyting well with keeping my mind cool, and edited the autoexec.bat file once again with a slight change of spacing between the semicolon (;) and the next path. Saved it, and tried to compile the servlet code once again, i was amazed to see that the code was compiled successfully leaving the .class file there in the development directory.

e) and then came the final step of running the servlet in the browser. Before doing this i placed this .class files into the folder install_dir/webapps/ROOT/WEB-INF/classes. This is a need. put http://localhost:8080/servlet/HelloServlet in the browser’s address bar, hit enter and saw the servlet running in my browser with a big Hello.

This was certainly one of the best experiences i ever had on my PC as i have heard people finding it very difficult to do what i have done in less than two days.
Whole credit goes to my juniors…!

Posted August 12, 2009 by neeraj in Tomcat

Tagged with , , , , , , ,

Redundant entries in GRUB menu: Solved   Leave a comment

When you are not trying, you are not gaining anything!
That’s what i found to be authentic when i risked to change my GRUB menu in my UbuntuBox. I upgarded my hardy to jaunty a month ago, which left my system’s Grub list to show 3 copies of Ubuntu 9.04 including their failsafe modes and memtests options. I was certainly annoyed with this thing. But i recovered my original startup grub menu by following these simple steps:
#1: press alt+f2, write gksu gedit /boot/grub/menu.lst
it will show the menu.lst file in gedit.
#2: search for the string “#howmany=all”
make it “#howmany=1″
#3: save the file close it and go to terminal
#4: write ‘sudo update-grub’
it will update the menu.
restart the computer and see your previous grub!
:)

Posted August 5, 2009 by neeraj in Linux tips and tricks, operating system, ubuntu

Tagged with , , , ,

Introducing Karmic Koala: Ubuntu 9.10   Leave a comment

The next release of Ubuntu Linux is going to be called “Karmic Koala”. Here is a list of features to look forward to
One big change is that Empathy will be the new chat program (instead of Pidgin). Empathy supports audio and video chat.
Here’s the full release schedule for Karmic Koala — October 29th, 2009 is the planned date of the final release.
The alpha version is available for download here.

Posted August 4, 2009 by neeraj in new release, ubuntu

Live desktop sharing through Yuuguu   Leave a comment

Certainly, i was thinking about the desktop sharing on windows, i used to do this with what is called “Netmeeting” wayback in 2006.
Now when i am using Linux, why can’t i do the same on my UbuntuBox. It is possible and today i installed Yuuguu
It requires jre (Java runtime environment) to be installed on the system and the browser must be java enabled. It took about 15 minutes to install all these along with Yuuguu on my system. Now it’s working fine.
Have a look on my Yuuguu:

Yuuguu works!

Yuuguu works!


The Desktop sharing thing is very very cool. There are other things which are yet to explore. I send my thanks to my colleague Narendra for online help in testing. I will surely recommend it to the project managers.
I am waiting for the Yuuguu release which supports IRC account also.

Posted August 2, 2009 by neeraj in Linux tips and tricks, new release, Techtip

Tagged with , , , , , ,

Predict the output!   4 comments

Q. I have an error free C code, am writing for you. This code searches for the string “C+Trivia” in Google. Surprised, how it can be?

#include "stdio.h"
#include "stdlib.h"
int main()
{

http://www.google.com;

char* str;
printf("C + Trivia",str);
puts(str);
return 0;
}

Read more about this program here.

Read the rest of this entry »

Posted August 1, 2009 by neeraj in Fun, Interview, Programming

There is something about “Vim”!   Leave a comment

Vim offer several functionalities that improve our editing and saves time. Here are some of them.

1. Copying a whole line

yy or shift y or :ny

where n is the number of line if n is not specified then copy the current line

2. Copying from current position to end of line.

y$

3. Copying 3 lines after the current position

3yy

4. Copying a range of line

:1,5y or :1y 5

The above example copy 5 lines, from 1 to 5

5. Deleting a whole line (Deleted line is copy to the registers)

dd or :nd

Where n is the number of line if n is not specified then delete the current line

6. Deleting from current position to end of line (Deleted text is copied to the registers)

d$ or shift d

7. Deleting a range of line

:1,5d or :1d 5

The above example remove 5 lines, from 1 to 5 and copy them to a register

8. Put n times a text, previously copied, after the cursor

: np

9. Put n times a text, previously copied, before the cursor

n Shift p

10. Word completion, works in insert mode

1. Ctrl n search forward for next matching

2. Ctrl p search backward for previous matching Very useful in programming (perl, bash, java, other)

11. Put vim in replace mode

Shift r

12. Undo

u

13. Redo

Ctrl r

14. Getting help about a topic

:help topic

Note: previous commands work in command mode except 10.

Posted July 31, 2009 by neeraj in Linux tips and tricks, Programming

Follow

Get every new post delivered to your Inbox.