This week's giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of liveProject: Build an ML Recommender System and have Kim Falk on-line!
See this thread for details.
Win a copy of liveProject: Build an ML Recommender System this week in the Artificial Intelligence and Machine Learning forum!

Gotham Sewani

+ Follow
since Feb 16, 2007
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Gotham Sewani

I designed a few AJAX pages using YUI. The experience was mixed. Recently I came across GWT (google web toolkin),which converts your java code into AJAX and javascript.Now while designing applications in Java, I use the netbeans IDE, especially the functionality to drag and drop AWT and Swing components. (I did use layout managers before switching to netbeans so its not that I have completely skipped layout managers,but its just that I find the drag and drop thing faster). Unfortunately, GWT does not support AWT and swing, and it provides its own user interface api (widgets basically). Is there a possibility that I can use GWT user interface components in netbeans like normal java AWT and swing components ?
Or is there an IDE which supports drag and drop kind of functionality for creating AJAX based web applications?
Ok,I understand their use in Application to Application communication,which one of the links referred to as B2B.But what about user to application communication,which the link referred to as B2C.

For example,in our university,the software made for course registration was done using web services.The basic function of it was a web based form,in which the student had to select courses,and then click submit to store in the database. Now why are web services required in this? This could have been made using a combination of JSP and JDBC right?
13 years ago
I am just starting with web services,and I was reading a few introductory articles on the net. What I wanted to know was under which situations would it be better/imperative to use web services when compared to server side scripting. One of the links I visited gave the example of a digital library with functions such as keyword searching,advanced searching ( But can't this be implemented using any server side scripting language which can connect to a database?

(Please excuse me if this question seems annoying,but I am really confused about the role of web services).
13 years ago
The JMF faq says that "It is posisible to build fully- featured standard-based conferencing solutions on JMF if you combine it with conferencing protocols like H.323."
How feasible is it as a student project?
And what are the requied prerequisites?
14 years ago
Then is there any other way to do it?
The game 'age of empires' is quiet famous on our LAN and we play multiplayer matches quiet often. Now,aoe listens to some specific ports while playing multiplayer matches. Is it possible to write a java code that listens to the same ports,and finds out the IP address of the machine trying to connect? Two processes listening to the same ports wont cause any problems?
One more question related to applets and JDBC.
Would it be advisable to use applets for directly communicating with the database server?
What security risks would it pose?
One,which I can think of is that I am passing the root password of the database server as an argument to the getConnection() method in my code.Now since applets are run on the clients machine,it might be possible that the client gets hold of the class files and decompiles them to get the password.
Is there any remedy to this?
14 years ago
That was exactly the problem.Calling validate() after adding the components worked like magic!
By the way,can you shed some light on why do we need to do that?
14 years ago
When I add a component to my applet,during the course of execution (that is,not inside the init() or the start() method,but,say,on clicking a button),then the component doesnt appear.In appletviewer,the component becomes visible only when I resize the window.
Why is this happening,and what can I do if I want the components to appear immediately?
14 years ago
I want to make an applet which directly accesses a MySql database. The database is on the same server from which the applet has been downloaded. Now the problem I am facing is with regard to drivers.
I use the Class.forName() method to load the drivers.
Now what changes do I need to make to the
1. Applet code
2. The Applet tag
3. The client machine
4. The server
to make this method work?
I tried changing the codebase attribute and unjarring the jar file containing the driver class file,but still it was throwing a ClassNotFound error. Please help me.
14 years ago
no replies?
14 years ago
Then why does the following code print "In Paint" to the console whenever I minimize and maximize the window? :
import java.awt.*;
import java.applet.*;
<applet code=PaintTest width=100 height=100>
public class PaintTest extends Applet {

public void paint(Graphics g) {
System.out.println("In paint");

public void update(Graphics g) {
System.out.println("In update");

14 years ago
I've just started with applets,and I was reading bout the init(),start(),paint(),stop(),destroy() and update() methods. I read that whenever a part of the appletwindow has to be redrawn:
1. The update() method is called. (BTW is this correct?)
2. The default implmentation of update method sets the the default background color and calls the paint method. (Is this correct?)

If we take the above two points to be correct,then if I override the update method such that it doesnt call the paint method,then will the paint method never be called. (Except maybe at the startup?).
14 years ago
Hey chris..sorry for the missing join statements..actually I had created two 'versions' of this..and by mistake I posted the earlier one..

But I tried with the join() statements also,and the results are the same.Maybe I am gonna try this on a single core pc to check if my idea is correct..but surprisingly they are very difficult to find nowadays.
I created the following java code:
class MyThread implements Runnable {
MyThread() {
Thread t=new Thread(this,"MyThread");

public void run() {
for(long i=0;i<200000000L;i++);


class ThreadTest {
public static void main(String args[]) throws Exception {
long a=System.currentTimeMillis();
//line1 MyThread mt=new MyThread();
//line2 MyThread mt2=new MyThread();

for(long i=0;i<200000000L;i++);

long b=System.currentTimeMillis();

Got the output at 1198.
Then I removed the comment at line 1 and the output was 1218.
Then I removed the comment at line 2 and the output was 1843.
Now my question is,there was'nt much difference in the running time of the program when I created one extra thread...but there was a large difference when I created two extra threads.Why is that?
Is it because I am running this on a dual core processor?