Help coderanch get a
new server
by contributing to the fundraiser

Shiraz Khan

Ranch Hand
+ Follow
since Mar 20, 2006
Merit badge: grant badges
For More
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 Shiraz Khan

I am running weblogic and eclipse on my local machine. The webapp is working fine, but eclipse is not able to start debugger and gives error "Failed to connect to remote VM. Connection Refused"

This is the config while weblogic 9.2 is launched

I am not able to telnet to localhost:8555
15 years ago
According to my understanding this no-argument constructor is provided by Compiler just like any other class. Even if you write a no-argument constructor, there should not be any problem.
Please correct me if I am wrong.
15 years ago
I agree that to generate revenue, JavaRanch needs ad-clicks.
But I feel that it is unethical to ask users to deliberately click on advertisements. I doubt if the advertisement policy will allow that. In case a user is genuinely interested, only than he should click on banners.
15 years ago
Please refer to servlet life cycle, then you will understand why main method is not present in Servlet.

Basically, servlet's service method is called only when there is a request coming to that servlet. This service method calls doGet or doPost, which your servlet class overrides.
Since everthing is managed by container, you have to follow the protocols : get parameters from request object, and do the business processing blah blah blah ... and write the output to response object. Container then generates html response from this reponse object.
15 years ago
GenericServlet class implements Servlet, ServletConfig and Serialisable interfaces only.

ServletContext is altogether a different interface, which is not implemented by Servlet, GenericServlet or HttpServlet.
15 years ago
Dear Khalid,
I consulted only your book (for SCJP 1.4 certification) 3 years back and score 92%
Thanks for writing such a wonderful book. This is not just a certification book, but a reference book also. I still consult it for java basics.

I would surely buy your SCJP 1.6 guide soon.

Since I have read the SCJP 1.4 book many times, I would like to give a feedback on it (I hope 3 years ain't not too late )
Your writing style is very clear for guys who have some basic knowledge of Java. But for those Java starters who start reading your guide directly, things would not get that clear easily. e.g. why and where should abstract classes be used ? what is the practical use of interfaces ? where to use which type of Collection ? I feel that if you give some emphasis on practical aspects of Java Basics then your book would be appealing to both Java starters as well as those preparing for SCJP exam.
You have to give a direct download link to these sites. Then these sites automatically upload file to their servers.
15 years ago
Please suggest how to promote this freeware.
I have put Sudokool on some sites like Softpedia, Brothersoft, freewarefiles.
15 years ago
I have updated Sudokool to version 2.5
It nows has all the features of commercial Sudoku games, namely :
1. Play unlimited puzzles in 4 difficulty levels : Simple, Easy, Medium and Hard.
2. Can be controlled with both mouse and keyboard.
3. Statistics like how many puzzles generated/completed, avg timings etc. stored
4. Option to play with Hints : view all the possibilities on the puzzle grid.
5. Option to play with warnings in case of wrong entries.
6. User can input puzzle (from newspapers) directly on the grid. Then puzzle is validated and if solution is unique, it can be played.
7. User can save and load Games.
8. 3 fastest timings in each difficulty level are recorded and updated on each puzzle submission.
9. Game can be paused and resumed during gameplay.
10. Platform independent : Based on Java, Sudokool works flawlessly on all the platforms (personally I have tested on Ubuntu 11.10 and Windows Vista)
12. Puzzle window can be resized and the window is loaded to this size next time automatically.
13. Cool looks to provide the best GUI experience.
14. Last but not the least : It is absolutely FREE !!!

Please visit Sudokool Homepage

Will release the code if anybody is interest in helping with the future releases
15 years ago
As I mentioned, moving methods in a new Class will amount to lots of rework, which I want to avoid.
15 years ago
We are still in development process and the code of one of classes has exceeded more than 110,000 lines. This has implications on debugging in eclipse. Code above 65k lines cannot be accessed in debugger. Also, Eclipse becomes very slow on opening this code.
We don't want to move any methods to a new class, as it will impact the whole application and there will be lots of code changes.
Is there any way to break this BIG code in atleast two three parts ?
15 years ago
Thanks for the help. It is working now.
My understanding was wrong. I was calling wait on thread rather than on this object.
Thanks for pointing out mistake.
But it is still not working
In the code below, I want that thread A runs and prints 5 times, then wait is called to allow thread B run, and when B finishes A resumes back.

output should be like : AAAAABBBBBBBBBBAAAAA

Where am I wrong ?

[ July 10, 2008: Message edited by: Shiraz Khan ]
[ July 10, 2008: Message edited by: Shiraz Khan ]
Collections has always been a confusing topic, with hell lot of things which mix up and nothing comes out when you are finished reading the whole chapter.
Please suggest some good book/site where collections conecepts can be understood easily.