Yogesh Chhawasaria

Ranch Hand
+ Follow
since Apr 02, 2004
Merit badge: grant badges
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 Yogesh Chhawasaria


I need to work with very large numbers (e.g. 2 ^ 8192 , 2 ^ (8192*8192)) and so on

I am using BigInteger but overall computing becomes very slow when i go for 2 ^ (500 * 8192)

Can someone sugggest me someway to make this faster or
Is there any way to utilize CPU power of other machine (besides my machine)

ANy suggestions are welcome.
14 years ago
Adding Further to it
If there are more one method and there is more than one choice for a specific object... the compiler freaks out and wont let you compile the code


Error MSg :
Beta.java:16: reference to m1 is ambiguous, both method m1(java.lang.String) in
Beta and method m1(java.lang.StringBuffer) in Beta match
[ February 23, 2006: Message edited by: Yogesh Chhawasaria ]
Thanks a lot Andrew !!!

I think Ill use JDK 5 for my UrlyBird Assignment
But is there no date /time limit for submission

Also Do i need to use now java 1.5 version???

I had registered for SCJD on 23rd Sep 2004 and not yet submitted the assignment.

Sicnce 1 year has passed Am i still eligible for submission ?
Well SCJP expects u 2 be a walking compiler... After reading your few other posts I can just reach the conclusion that you aint really much familiar with command prompt execution and classpath issues.
I can only advise you to leave the IDE alone initially and spend time with command prompt and start from basics....
but again these are just my thoughts...
Just wondering are you using some kind of IDE or you execute the program manually via command prompt.
My vote goes to Kathy and Sierra's book.
That with a regular participation to this forum good enuf to score past 90

Originally posted by Netty poestel:

I had a doubt on the line "case x-1:..."
afaik, x is final and it is not supposed to be changed. but it seems saying something as "case x-1" is perfectly allright.
can someone explain why mutilating a final variable is allowed ?



First lets go for the rule regarding case argument's i.e. case arguments must be final i.e. the value of the case argument must be known at compile time.


case x-1: is allright bcos we are not changing the value of x anywhere.
During compilation the case x-1 is interpreted as
case 2-1 i.e case 1

See nowhere the value of x was changed...
x-1 doesnt (attempt to) change the value of x ... but x++ , x--, ++x,--x does.

Also your above code wont compile since variable y is not final.

Originally posted by jiju ka:
I am too (doing URLyBird).

In your screen shot I noticed one thing. Does name and location repeat in jTable too?

How will you reserve? is there a reserve button needed?
Are you providing unreserve feature-emptying the owner field?

Jiju ka,
My design has changed considerable since i pasted above gui draft version.
Yes Name and location will be repeating in JTable too...
I've added a reserve/book button and I ve not thought about providing unreserve option (I might have to read the reqs again )
Ill clarify my question once more

Say theres file of size 1kb These 1024 bytes (1kb) = 1024*16 bits must be representing a final decimal value
I need this decimal value and want to perform arithmetic computations on it.

Its easy to get that decimal value for small size file; for bigger files I used BIgInteger and somehow managed it. But after a fixed size I cannot sem to read entire file contents and get that final value maybe ram limitations

What I really want is that say theres a 2GB file then that file can be represented using a unique decimal(integer) value I just want to get that value but cant seem to...
18 years ago

Say theres one file of X MB and I want to read it entirely and display the decimal value represented by these X MB of data. Can anyone guide me how to begin with.

[By decimal value I mean : all bits finally represent something in decimal; How can I convert X MegaBits to Deciaml value and perform arithmetic operations on this value]

Thanks in advance
18 years ago

Originally posted by Anton Golovin:

- Since there is no search option for smoking or non-smoking fields, both will be shown.

There are seven fields in my database schema

Am I not supposed to provide search option (GUI Widgets) for all these columns like name, location,size,smoking,rate

As per Intructions,
The new application, using the existing data file format, must allow the CSRs to generate a list of accomodations that match a customer's criteria.
It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.

So is searching should be caried out only on name/location and not on any other option???
How can we define "criteria"

Hi Guys !!

For my UrlyBird asignemnt i have made following rough draft

As Kathy says it involve end users in gui design
Anyone has got suggestions/improvements in it
If you were a CSR would you like this inital screen ))
I got lotsa queries in my urlybird asignment

Per DB description
4 byte numeric, magic cookie value. Identifies this as a data file
Q. Magic Cookie Value - What should be my role in that?? Do I need to Hardcode this somewhere and check everytime the program is executed whether the db file has this cookie ??

Per Instructions,
It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.

Q. Does all records mean the deleted ones too.
Do i have to provide search facility for all the columns possible like smoking,price etc or only name/location

Flag indicating if smoking is permitted. Valid values are "Y" indicating a smoking room, and "N" indicating a non-smoking room
Q . Smoking Y/N
When a user opts for non smoking room Do i need to display Ones with 'Y' flag too As (Practicaly)its upto customer not smoking in a room but booking one that allows smoking.

public void update(int recNo, String[] data, long lockCookie)
and delete

Assignment only describes that we should alow CSR to provide booking facility But these two methods in interfaces does it suggest that CSR can also Update and Delete a particualr record
Should the gui for the same be provided

5. public String[] read(int recNo) throws RecordNotFoundException;
thers no unique recordid in my db schema what does the int recno refer to???

Thanks in Advance