Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

bapi dhar

Ranch Hand
+ Follow
since Mar 02, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by bapi dhar

1> why does mocha.Decompiler shows arrayIndexOutOfBoundsException on decompiling a .class file .
2> How to make such a .class file that will not decompile
19 years ago
This is my first program i am
Connection to Personal oracle 8 using
i-net Auguro Driver Version 1.04 for Oracle 8.0 Server
I am working in WIN-98 which has no server.
I m getting this runtime error

DriverManager.initialize: jdbc.drivers = null
JDBC DriverManager initialized
registerDriver: driver[className=com.inet.ora.OraDriver,com.inet.ora.OraDriver@2a9835]
DriverManager.getConnection("jdbc:inetora")
trying driver[className=com.inet.ora.OraDriver,com.inet.ora.OraDriver@2a9835]
java.net.ConnectException: Connection refused: no further information
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at com.inet.ora.OraDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at auguro.main(auguro.java:32)
getConnection failed: com.inet.ora.SQLException: Connection refused: no further information
My Code :
------------------------------------------------------------

code:
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

-------------------
Please help me
1. Please suggest me a compatible driver.
2. Any corrections in the code are most welcome.
regards
bapi
bapidhar@mantrafreenet.com


[This message has been edited by Thomas Paul (edited March 28, 2001).]
Dear friend
This is my first servlet Program.
Can I not run my servlets without the ServletRunner in Jskd2.1.
I had downloaded jsdk2.1 but it does not contain servletRunner.
My jsdk2.1 installation directory contains these directories
1> webpages
2> examples
3> src
4> etc
5> tmp
6> meta-inf
do i have to download again. Please help me.
thanks
bapi
19 years ago
This is my first program i am
Connection to Personal oracle 8 using
i-net Auguro Driver Version 1.04 for Oracle 8.0 Server
I am working in WIN-98 which has no server.
I m getting this runtime error

DriverManager.initialize: jdbc.drivers = null
JDBC DriverManager initialized
registerDriver: driver[className=com.inet.ora.OraDriver,com.inet.ora.OraDriver@2a9835]
DriverManager.getConnection("jdbc:inetora")
trying driver[className=com.inet.ora.OraDriver,com.inet.ora.OraDriver@2a9835]
java.net.ConnectException: Connection refused: no further information
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.inet.ora.OraDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at auguro.main(auguro.java:32)
getConnection failed: com.inet.ora.SQLException: Connection refused: no further information
My Code :
------------------------------------------------------------


-------------------
Please help me
1. Please suggest me a compatible driver.
2. Any corrections in the code are most welcome.
bapi
bapidhar@mantrafreenet.com
Dear Friend
Extremely ...... You know it happens.
here is the code....... zzzzzzzzz

Please complete the code to make it useful .
thanx
love u all
bapi

(edited by Cindy to add formatting)

[This message has been edited by Cindy Glass (edited March 19, 2001).]
19 years ago
Dear Friend

Ihave made up a program to help myself understand java.util.Collection. Kindly help to make a sense out of the program.
This program is errorfree. i want to go step a ahead to provide an
implementation.
thanx.
bapi
19 years ago
dear friend
thanx
bapi
19 years ago
Dear friend
I could not sort the array by implementing the Comparator class
Please Help.Clock.java is in current dir.
thanx
bapi
import java.util.*;

class ClockComparator implements Comparator
{
public int compare(Object o1, Object o2) //-ve < then, 0 equal to, insertion sort +ve > than
{
if ((Clock)o1.getHours() > o2.getHours() ){ return 1;}
else
if (o2.getHours()> o2.getHours()){return -1;}
/*
if (o1.getMinutes() > o2.getMinutes() ){ return 1;}
else
if (o2.getMinutes()> o2.getMinutes()){return -1;}
if (o1.getSeconds() > o2.getSeconds() ){ return 1;}
else
if (o2.getSeconds()> o2.getSeconds()){return -1;}
*/
return 0;
}
}
public class Sort
{
static Clock clock[];
static Object temp;
public static void sort(Object[] c, ClockComparator cc)
{
for (int i=0;i<c.length;i++)>
{
for(int j=i+1;j<c.length;j++)>
{
if ((cc.compare(c[j],c[i]))<1)
{
temp=c[j];
c[j]=c[i];
c[i]=temp;
}
}
}
}

public static void main(String args[])
{
if ( args.length !=1)
{ System.out.println("Please include number of Clock times in Command Line ... Thank You");
System.exit(0);
}
int nc=Integer.parseInt(args[0]);
clock =new Clock[nc];

for (int i=0;i<nc;i++)>
{
System.out.println("Enter Clock "+(i+1));
clock[i]=getTime(String.valueOf(i+1));

}
sort(clock,new ClockComparator());



}//main

private static Clock getTime(String timeType) {
Clock t;

while(true) {
System.out.print("Enter the " + timeType + " time in HH:MM:SS, 24-hr format: ");

try { t = Clock.valueOf(SavitchIn.readLine());
break;
} catch (Throwable e) {
System.out.println(e);
System.out.println("Problem, try again!");
}
}//while

System.out.println("The " + timeType + " time is " + t);
return t;
}

}//class
19 years ago
Dear Friend
Please Help me Debug the code.I have a Clock.java in current directory which contains the methods getHours,getminutes etc.
i m trying to sort clock objects in ascending order while implementing the Comparator interface.
thanx
bapi


[This message has been edited by bapi dhar (edited March 13, 2001).]
pl use the [ code ] tags without the spaces when posting source code, please!
- satya

[This message has been edited by Madhav Lakkapragada (edited March 14, 2001).]
19 years ago
dear friend
help me with the code.

The program outputs different colored stars. I want the two
thread to print in their own designated color.i want to remove
the random part and wish to have the same output.
thanks
bapi


Please use [ code] [ /code] tags to format your code. Check out the UBB Code link below for further details


Thanks
Rahul P Mahindrakar


[This message has been edited by Rahul Mahindrakar (edited March 13, 2001).]
dear friend
Help me out
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class stars_2 extends Applet implements Runnable
{
Thread t1;int x,y;Thread t2;
public void init()
{ setBackground(Color.black); }
public void start()
{ t1=new Thread(this,"tone"); t1.setName("tone"); t1.start();
t2=new Thread(this,"ttwo"); t1.setName("ttwo"); t2.start();
}

public void run()
{ while(true)
{
try{ t1.sleep(50);}catch(Exception e){}
try{ t2.sleep(50);}catch(Exception e){}
x=(int)((getSize().width)*Math.random());
y=(int)((getSize().height)*Math.random());
repaint();
}
}
public void update(Graphics g)
{ paint(g);}
public void paint(Graphics g)
{ /*
if (this.getName()=="tone")
{ g.setColor(Color.yellow);
g.drawString("*"+getName(),x,y); return;;
}
if (this.getName()=="ttwo")
{ g.setColor(Color.yellow);
g.drawString("*"+getName(),x,y);return;
}
*/
int q=(int)(5*Math.random());
switch(q)
{ case 1: g.setColor(Color.yellow);break;
case 2: g.setColor(Color.red);break;
case 3: g.setColor(Color.green);break;
case 4: g.setColor(Color.blue);break;
case 5: g.setColor(Color.white);break;
}
g.drawString("*",x,y);
// g.drawString("*"+getName()+Thread.activeCount(),x,y);
// g.drawString("*"+getName(),x,y);
}
}
the program works but i want to uncomment the thread code and
i want the same functionality ie print different colored stars
using different thread and not using random function. how do i do it.
help
bapi


19 years ago
Dear friend
Please clarify the diff between sdk1.2 and jdk1.2
many thanks
bapi
19 years ago
dear friend
This relates to AWT.
This is not working ... HELP..... YELP.....

mb=new MenuBar();
fmnu=new Menu("File");
fmnu.setMnemonic('F'); // not working
MenuItem n=new MenuItem("New");
n.setMnemonic('N'); //not working
MenuItem s=new MenuItem("Save");
fmnu.add(s);
mb.add(fmnu);
f1.setMenuBar(mb);
bapi


[This message has been edited by bapi dhar (edited March 10, 2001).]
19 years ago
Dear Friend
Couldn't find a way to change the display label of the frame.
at runtime.
Need Help.
thanx.
bapi
19 years ago