Search Results

Showing results 1 to 40 of 87
Search took 0.01 seconds.
Search: Posts Made By: freelancelote
Forum: Java Oct 22nd, 2009
Replies: 6
Views: 433
Posted By freelancelote
thank you,
here is the file
Forum: Java Oct 22nd, 2009
Replies: 6
Views: 433
Posted By freelancelote
Hi, thanks to both. That solved the problem although I still don't quite understand.
Cgeier, the thing is, the NullPointerException doesn't come when it's finished reading the original file. It...
Forum: Java Oct 21st, 2009
Replies: 6
Views: 433
Posted By freelancelote
I'd appreciate if somebody could have a look at this code and tell me where the problem is.
The program is meant to take a .txt file and split it in three different files: one with words of 1 to 4...
Forum: Java Oct 3rd, 2009
Replies: 4
Views: 410
Posted By freelancelote
Have a good sleep and then have a look in the trails (http://java.sun.com/docs/books/tutorial/java/nutsandbolts/index.html)
Forum: Java Sep 23rd, 2009
Replies: 5
Views: 319
Posted By freelancelote
Raik.48,
welcome to the forum. Please next time use code tags when you post code.

When you make a call to calcArea() method the area is calculated as it says in the method. When you call...
Forum: Java Sep 21st, 2009
Replies: 8
Views: 787
Posted By freelancelote
axelle,
if your problem is how to use NetBeans IDE take a look at the tutorials (http://www.netbeans.org/kb/index.html).
Gook luck,
Forum: Java Sep 18th, 2009
Replies: 13
Views: 1,859
Posted By freelancelote
ah! right! now I see why I never got into a club!
Forum: Java Sep 18th, 2009
Replies: 13
Views: 1,859
Posted By freelancelote
ah!, it was too late in the morning!
Forum: Java Sep 18th, 2009
Replies: 13
Views: 1,859
Posted By freelancelote
I'm guessing that by "the number of alphabets" you mean the number of letters your word has. If I'm guessing wright then use length() method of the String class.
Hava a look at the String ...
Forum: Java Sep 18th, 2009
Replies: 13
Views: 1,859
Posted By freelancelote
and your problem being...?
Forum: Java Sep 17th, 2009
Replies: 3
Views: 452
Posted By freelancelote
newjavastudent,
as it's coded, you just have to break your while loop with ctrl+c while the program is running and once you've finished writing whatever you'd like on the new generated file.
Forum: Java Sep 17th, 2009
Replies: 8
Views: 868
Posted By freelancelote
wendellrob,
if you make all your variables and the computeNetPay() method static you'll be able to access them from main() (that should be also static). Since your variables are static you don't...
Forum: Java Sep 14th, 2009
Replies: 2
Views: 279
Posted By freelancelote
Forum: Java Sep 13th, 2009
Replies: 2
Views: 279
Posted By freelancelote
Hi,

I'm trying to print a string on the center of a window using GridBagLayout.
All I see printed is a part of the string I expect (the current month) instead of the whole string.
I don't seem...
Forum: Java Sep 3rd, 2009
Replies: 10
Views: 471
Posted By freelancelote
hi valleymorning.
Perhaps an idea would be:
1. split the 6 digit number in two: divide the number by 1000 and put the result as an int into a variable (say firstPart). Find the modulo 1000 of the 6...
Forum: Java Sep 3rd, 2009
Replies: 10
Views: 471
Posted By freelancelote
So, where's your problem? finding the algorithm or coding it?
Forum: Java Sep 3rd, 2009
Replies: 23
Views: 708
Posted By freelancelote
wait a minute!
akulkarni: did you try to compile and run it? did you run it several times with diferent strings?
Try inputing "naan".
What happens?
Bulls: 0;
Cows: 3;
What happens with "nana"?...
Forum: Java Sep 2nd, 2009
Replies: 11
Views: 342
Posted By freelancelote
Daiva,
it does the trick.
I wouldn't have add an unnecessary member to the array, though. Instead I would have called the correct one when you need to call it. But this is just my opinion.
Forum: Java Sep 2nd, 2009
Replies: 11
Views: 342
Posted By freelancelote
Daiva,
did you read what javaAddict mentioned about arrays being zero based?
Forum: Java Sep 2nd, 2009
Replies: 11
Views: 342
Posted By freelancelote
latinajoyce,
just a small addition.
In your problem description you tell us you need to choose numbers between 1 and 10. However your code chooses numbers between 0 (included) and 10 (excluded)....
Forum: Java Sep 2nd, 2009
Replies: 11
Views: 319
Posted By freelancelote
No worries
Forum: Java Sep 2nd, 2009
Replies: 11
Views: 319
Posted By freelancelote
javaAddict,
if a problem is marked as solved I don't normally look at it anymore. It's helpfull because I can look at other problems instead.
True, perhaps I was being selfish and should have...
Forum: Java Sep 2nd, 2009
Replies: 11
Views: 319
Posted By freelancelote
OK, congrats, you got your code running.

Will you please mark it as solved?
That'll be of great help. Thanks
Forum: Java Sep 2nd, 2009
Replies: 11
Views: 319
Posted By freelancelote
did you compile it and get any errors?
Forum: Java Aug 31st, 2009
Replies: 4
Views: 488
Posted By freelancelote
OK, thanks to you both, that helped a lot.
I've been doing some more reading and inserted a new line of code after the while loop int count = d.getComponentCount();. It actually returns only one...
Forum: Java Aug 31st, 2009
Replies: 7
Views: 210
Posted By freelancelote
Lokth,
a possible solution could be to put every digit of your int answer variable on a int[] (to do that you could divide the number by 10, put the modulus on the array, divide again the result by...
Forum: Java Aug 31st, 2009
Replies: 4
Views: 488
Posted By freelancelote
Thanks VernonDozier.
The code as I showed it runs. After you answered I just noticed there are dozens of nullPointerExceptions showing on command line as in

Exception in thread "AWT-EventQueue-0"...
Forum: Java Aug 31st, 2009
Replies: 7
Views: 210
Posted By freelancelote
Forum: Java Aug 31st, 2009
Replies: 7
Views: 210
Posted By freelancelote
Lokth,
can't you put an if statement saying if input equals h then give hint?

Something like,



String inputString = String.valueOf(input);
if (inputString == "h") {
// give hint function
Forum: Java Aug 31st, 2009
Replies: 4
Views: 488
Posted By freelancelote
Hi,
I'm starting working with the Graphics and related and strugling to understand it.
I'm trying to do something as simple as drawing a String on a panel. The string changes on runtime. I post the...
Forum: Java Aug 28th, 2009
Replies: 23
Views: 708
Posted By freelancelote
Oh, sorry VernonDozier, I didn't see your answer.
Forum: Java Aug 28th, 2009
Replies: 23
Views: 708
Posted By freelancelote
akulkarni,
in loop on line 30 to 36: Think what happens when i == 3... you need to reset j to 0. That way you check letters before variable i.
try


for(int j=i+1;j>3;j++) {
if (j>3) j = 0;...
Forum: Java Aug 28th, 2009
Replies: 1
Views: 187
Posted By freelancelote
google search (http://www.google.com/search?q=how+spam+filter+works&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a)
http://computer.howstuffworks.com/spam.htm

Have a good...
Forum: Java Aug 26th, 2009
Replies: 2
Views: 230
Posted By freelancelote
Hi, thanks Ezzaral.
Yeah, you are right, fiddeling with setFirstDayOfWeek(int) sounds messy.
I was trying to find a way to change the Locale and hoping that all the rest would change automatically...
Forum: Java Aug 26th, 2009
Replies: 2
Views: 230
Posted By freelancelote
Hi,
I'm trying to understand how the Calendar, GregorianCalendar and Locale classes work.

Say I instantiate two Locale objects and then two Calendar objects, each with their respective Locale.
...
Forum: Java Aug 25th, 2009
Replies: 2
Views: 252
Posted By freelancelote
You'll have to give some more details and some code to chew on.
Forum: Java Aug 19th, 2009
Replies: 7
Views: 566
Posted By freelancelote
@sam_inquisitive, chill out man! Nobody told you were going to ask for implementation, it's just that we've all seen in here what Salem said. Surely Salem didn't mean it personaly.
Anyhow, Salem's...
Forum: Java Aug 19th, 2009
Replies: 6
Views: 331
Posted By freelancelote
Yeah, I'd like to know too. Also, if the problem is solved, could you please mark it as solved?
Thanks
Forum: Computer Science Jun 10th, 2009
Replies: 3
Views: 421
Posted By freelancelote
Oh, yeah and I forgot, have a look to

http://www.amazon.co.uk/SAS-Certification-Prep-Guide-Programming/dp/159047922X/ref=sr_1_1?ie=UTF8&s=books&qid=1244665068&sr=8-1
Forum: Computer Science Jun 10th, 2009
Replies: 3
Views: 421
Posted By freelancelote
http://support.sas.com/certify/
Showing results 1 to 40 of 87

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC