Search This Blog

Tuesday, November 8

JDBC-ODBC JSP & SERVLET

This webapp demonstrates jdbc-odbc connection with ms access database using servlets and jsp.

Download the netbeans project

Before running the project:
1)make ms access database with 1 table called 'student'
2)student has 2 columns(attributes) name and day. Both attributes are of type text.
3)Add DSN for this database, Watch Tutorial
   Set name of DSN as 'dsn1' instead of "NWIND-DSN" as shown in above tutorial.
4)Run the project in netbeans.

Wednesday, September 21

CN -TCP


This is a very amateur program i hv written..i guess its easy to understand with this example



IMP NOTE : Both programs are seperate...but are interdependent on each other..

How to run:
1)run server file in java compiler (eg jcreator,netbeans,cmd etc..)
2)run client file in another java compiler
3)enjoy

sample screenshot:








Sunday, September 4

Lone2Happy


I was alone and deprived,
From love and crucified,
On the cross and cried,
A thousand tears in night.
Full f anger and heartbreak,
From the pain I suffered and for god's sake,
Show me love and not so fake,
In lonely nights that I gape.
Hopes had crashed and tears,
Seeped into my eyes and fears,
Grabbed my heart and fierce,
Were reactions which brought nothing but tears.
God was listening and a dove,
Flew past me and love,
Came to me and from above,
Fell a leaf of clove.
I thanked god and was happy,
As I could ever be and noisy,
Wind were blowing and lovely,
Nights passed that made me happy.

Wednesday, August 24

The Error you wanna avoid in exams

Problem :
Okay,I was writing my OS pracs exam..
I wrote a for loop for accepting n numbers and store them in int array 'a'.
for(i=0;i<n;i++)
{
a[i]=Integer.parseInt(in.readLine());
}
It should get n inputs from user and store them in array indices from 0 to n-1..
Instead what happened is ...it stored the first value entered on index 0 and copied that value in all the indices of the array..
So for a input like : 42 57 98 100
the array stored :42 42 42 42

I was stuck. And got this error often since that day.

Similar problems happen ,though rarely, but these errors are so dangerous that you will not ever know why they occur and so you will not be able to correct it..

Solution:
Use System.out.println() in the for loop after each input.

for(i=0;i<n;i++)
{
a[i]=Integer.parseInt(in.readLine());
System.out.println();
}


Saturday, August 20

CN Practicals Check Sum

Here is Check Sum Method for the CN Pracs. Have Fun testing it. Do suggest any changes that you would like to have.
Download

Wednesday, August 17

Reference Books

Hey friends here is site for books. It is good. Most of them are working and few are not working. Just download it from the links. It is also good for students wanting to appear GATE.
Website for E-books