Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Hrmm, I'm not certain if Josh's response was directed towards Scru's personal pothead status or the more general usage history of all posters. I took it to refer to my comment about not knowing history based on omission - which may not have been the case :)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I haven't seen it occur with any other recent PMs. Just seemed to be a fluke today. Emptying the inbox did reset it. Running Firefox if that makes any difference.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

The user task bar at the top is showing an unread PM, however no unread PMs appear in any of the message lists. After a contact list invitation appeared, it showed 2 unread where it was 0 unread before, so that may have caused the discrepancy somewhere.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I was hoping that I could just thread the File Name text box or really updating of the File Folder List. Pressing enter in the text box would set the update going, if a key is then pressed in the text box I want the update thread to be killed with only a new thread starting once the enter key is again pressed.

Yes, that would probably be possible with the subclassing that I mentioned, but due to the layered and platform-independent UI delegation under the hood of the JFileChooser, changing that behavior requires a deeper understanding of the Swing component architecture and communication mechanisms to make sure all of the appropriate abstractions are satisfied and event notifications are handled appropriately.

It wouldn't hurt anything to give it a try if you really wanted to dig into it - you may get it just right! If you are fairly inexperienced with Swing and threading in Java though, it could be a pretty daunting jump into the deep end.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

..but we can infer ;)

Oh, you mean ASSume? Yeah, you could but it wouldn't really mean much, would it?
:P

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Collections.BinarySearch returns the index in the list where the item was found. If you need to return the object then return list.get(index) . Your foreach loop around the search call doesn't make much sense though. For a given path, it's a single call to locate it within the list. Also, sorting the list for each search is unnecessary - just sort it when the list changes (using a sorted set would manage that for you automatically)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You want it to place them on the form or just create and return them? Having three methods that only differ in the setBounds() parameters is just unnecessary code duplication and none of those methods places anything. If you just need to create and return the three buttons, your method could return a List of the buttons. If it needs to place them then you'll need a reference to the container in which they should be placed.

That's about all I can comment on without understanding more of what you are trying to do.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, the verification is occurring in BasicFileChooserUI.ApproveSelectionAction. If it's really worth it to you, you might be able to extend the necessary classes to provide an interruptible threaded implementation, but it might get stickier than you expect.

I don't know all of your requirements, but it might be more straightforward to just create your own file browser to provide the functionality you need.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

"No change in the client" isn't exactly a clear statement of the problem. Your code above does not read the response, so if you actually are reading it somewhere else we can't very well make assumptions about why it's not working.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well said Wyer. It is good to hear from someone that has actually smoked it in the past especially as pretty much all the people here despite being either for or against its legalization have never actually tried it.

Some have said they've never tried it, but many haven't mentioned one way or the other. As assumption of "pretty much all" seems unjustified.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I actually did use Quote tags back to that post but for some reason it did not post with them properly.

Well appoligies from those of us who are not perfect like josh and have enough time to post in realtime like him.

Last time i checked a Forum was not an IM system and hence does get a little bit scew wiff like that. But hey if josh thinks otherwise then i guess i was wrong. If i had of known that it was to confusing for you josh i would never have posted it.

Shame on you for running afoul of Josh's infallible judgement of relevance and acceptable posting practices. Did you not take account of his High Inquisitor Of Relevance And Forum Mores badge? Dare you question the Order and sow chaos in the Pattern of asynchronous communication?! Instigator!

joshSCH commented: haha.. FU -2
lasher511 commented: Even Josh's negative rep out for you. +3
Rashakil Fol commented: Rep doesn't matter in the Geek's Lounge. +6
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Cannot find symbol means that it can't find a class,method, or variable that you have used. It could be that you misspelled something (watch capitalization, Java is case sensitive) or you are calling a method that does not exist on that class.

These are very basic error messages. Look at each one and read it, then look at the line number that it tells you the error occurred on and fix it.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Dave, I was but a mear egg and sperm then. Hell my older brother wasn't anything more than that either!

Yeah, Dave's old...
I was only 13 in 1984 :P

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Project Darkstar (Project Darkstar Community - Home), developed by Sun Labs, is also taking aim at massive online games on Java.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

"Under or in front of", let's keep it clean. I am at an impressionable age protected by PG13!

So consider carefully if you are offered an internship...

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Wonder what you folks did in those days? No cell phones, no game-boys, no Internet, not too many computers, maybe you played cards or sports more often?

We rolled hoops with sticks and we were lucky to have them. Previous generations only had rocks and those were very difficult to roll with sticks.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Okay, this is what we have so far for the reasons the world, as we know it, will end:
Meteor
Black Hole
Gamma Rays
Nuclear War
Regular War
Religious War
Superbug
TV
Antichrist
Catastrophic release of Carbondioxide
Massive Vulcano Eruption
Massive Earthquake
Abortion
Gay Rights
High Taxes
The Poor Get Poorer
Excess Liberals
Hillary Healthcare
Social Conservatives
Fascism
Demagoguery
Surveillance Society
"Nation Building"
Chemical Contamination of Food and Toys
Overpopulation
...
and all of the above at once!

Might have missed a few major ones.

Actually, as you read this, the world as you know it just ended.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Is it just me or are you guys just building post count? :twisted:

Pasta and turkey

It's just you.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, I'm not a boby (booby?!), but here's an example:
http://www.exampledepot.com/egs/java.applet/LoadImageApplet.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I had the cassette drive for external storage! :)
http://www.mainbyte.com/ti99/hardware/cassette/recorder.html

I had the cassette drive for my Vic-20 as well. The floppy disk drive (5 1/4") was too expensive - it cost more than the computer!

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

It clearly says "not a statement". You need "."s between the object reference and methods to make those valid.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You are sending the post request, but not reading the response. See the following example: http://www.exampledepot.com/egs/java.net/Post.html

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Hm. 14. 1984. Uh... I probably had this. :p 3.0 MHz, 256 bytes RAM :D

I remember those too :)
Aside from the Vic-20 and C64 and the Atari 400 and 800, the TIs were among the computers available for "average families" (Apples and IBM PCs were expensive and mostly limited to the serious electronic hobbyists)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yay! I had one of those :) I was 11

10 PRINT "HELLO WORLD "
20 GOTO 10

RUN

He he he happy days....

And typing in game program listings that were actually printed (forget disks or downloads, those were years off) in magazines but never checked for syntax errors, resulting in even more debugging fun to get the pathetic thing to run :)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

if pot is lagalized, it will be regulated and tax and o0nly the bigb man will be able to seell, just like cigarettes, alcohol and any legal grugs out there, then the people who have been using for the past 1000 yeas will sue those comn[anies just like they did the tobaco company. therefore legalizing dope is a bad idea, people refrain from it because it's illegal, the moral being inside us tell us not to use it, at the same time the thrill from using/ doing something illegal adds to the rush, why make it easier for everyone

Did you bother to even read what you typed before you smashed the post button on this? You aren't creating a very strong argument with the poor logic and complete disregard for whether the words you attempted to type actually ended up in the message.

"the thrill from using/ doing something illegal" may be small factor in teenage experimentation, but beyond that the assertion is completely ridiculous.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, it kind of replaces all of these methods

readNumberOfTeams();
readNumberOfGames();
getTheGameScores();

to generate the data for team scores for each game. Your averages method(s) needs to loop through this info to make its calculations.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Wow that really makes sense. Thank you so much for the help. The only clarification that I need is that for

sqrt(p)

, where is that applied? Is it at the part where it says

for (int x = 2; x < p; x++)

?

Thanks

Yes, your prime check doesn't need to check numbers greater than the square root of the number. Any product greater than the number times itself will involve a factor less than the number itself, which you have already checked.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Well, you probably don't want to get into the more esoteric algorithms for finding primes, but there are a few simple modifications that will reduce the number of checks you have to make.
If p%2==0 , it's prime.
If that is not the case, you can start the loop at 3 and increment by 2 for each iteration. You don't need to check any other even numbers.
Your loop also doesn't need to check any higher than sqrt(p) .

Maybe that helps a bit.

(I'm assuming you don't need to accomodate the check for p=1)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

None of those are actually proof that pot is causing this stupidity or evidence to support the argument that it should not be legalized.

Yep, pot smokers don't have a corner on stupid behavior.

Perhaps Midi can compile a comparison list of stupid things done by people who haven't smoked pot and demonstrate to us all that it is much shorter.... ?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I can remember in college when the first visual browsers were starting to show up (Mosaic being the first). Most everything available was just text. Not long after, everyone and their dog was creating useless personal home pages with animated gifs, music, and links to crap that no one else cared about in the least.

(My first computer was a Commodore Vic-20 in the early eighties :P )

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

That looks really cool (totally new concept)lol
I will definately try that tonight. Thanks If you don't mind tomorrow I will tell you if it worked.

You might want to check out this book sometime: Head First Java

From what I have heard, it covers a lot of these object-oriented design topics very well. It was listed in a semi-recent "Top Java Books" posting over in JavaLobby and seems to be well-regarded. I've not read that one myself, but I was very impressed with the "Head First Design Patterns" book, which shares a couple of authors and the same presentation style.

ceyesuma commented: outStanding! +1
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I would put lawyers under politicians...

I thought it was mostly interns under politicians??
:P

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

"pc" is a ProcessCard object. newAccount() is just changing the account number - it is not creating a new object. To do that you need to set pc = new DebitCard(); That will create a DebitCard object, which inherits from the ProcessCard. Unless you need to call a method that is specific to the DebitCard class, you can still use the debit card object by it's ProcessCard base class interface.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

got it. thanks :)

In GridBagLayout.. i have the code:

c.gridx = 0;
    c.gridy = 1;
    c.anchor = GridBagConstraints.[B]EAST[/B];
    gridbag.setConstraints( rice, c );
    add( rice ); //the Label
    c.gridx = 1;
    c.anchor = GridBagConstraints.[B]WEST[/B];
    gridbag.setConstraints( rice1, c );
    add( rice1 ); //the TextField

screenshot
im just wondering why the Rice(Label) is on the west side and Rice(TextField) on the east side?

The anchor property describes where the control is anchored within the cell. The gridx and gridy control the cell position. So in the above, you have the label in position x=0 and anchored to the east edge of that cell. The text field is in position x=1 (which is to the right of x=0), and anchored to the west edge. Is that what you wondered about?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I will go thru and add comments I guess. If you were to run the program.creditcard processes work and debit card uses creditcard"

public DebitCard{
super();
}

but when I try the same process using DebitCard all the variables remain set for creditcard.
well thanks any way. I'll work on it some more.

Do you actually create a DebitCard object to perform the operations on? It sounds like you are still calling methods against a CreditCard object.

You should consider trying to use full, descriptive names for your variables and methods, rather than cryptic abbreviations. I thought this was touched on in the coding conventions, but looking back I don't see it and must be thinking of a different document. Clear names that spell out the intent of a variable or method will help not only other readers of your code, but you as well. It's much easier to organize your thoughts when the intent of the code is clearly spelled out by variables and methods.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Honestly, this is almost impossible to read and follow. Reading and following this may help a bit: Code Conventions for the Java(TM) Programming Language: Contents

The functioning of the methods and their names are just too non-intuitive to wade through. If you can post the relevant lines where you are having difficulty, perhaps someone can help.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Do you have any idea from where I can get some mock exams?

Yes. One idea comes directly from Google
http://www.google.com/search?hl=en&sa=X&oi=spell&resnum=1&ct=result&cd=1&q=sun+java+practice+exams&spell=1

A little initiative on your part would have discovered that very quickly. Professional programmers seldom have solutions directly handed to them, which is something worth pondering if you are preparing for certification.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yeah, you missed a couple:
Social Conservatives
Fascism
Demagoguery
Surveillance Society
"Nation Building"

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

This is natural behavior for floating point numbers. They are a limited precision representation of a decimal value and you should not expect them to be an exact result. This is why they should not be used for financial calculations which require perfect precision.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You need to read and think about these errors a bit. Is there a version of the write() method that takes a component? Nope, all of them take char or String data. A TextArea is not the same.

Take the time to examine the API documents of the classes you are using. Those explicitly lay out how you may interact with all of the JDK classes that you use. Make sure you have those bookmarked.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

First question would be: why are other classes accessing your internal arrays? That shouldn't be the case.

Second: How does having the third dimension facilitate any extra functionailty at all? It doesn't. It just adds another layer of nesting.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Heh, missed me by quite a bit. Most of the questions didn't have answers which fit. So it's batting a whopping zero so far.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

A vector is nothing more than an indexed collection of objects. A vector is also an object, which can therefore reside in a vector - a collection of collections. It's the same as a two dimensional array.

Vector teams = new Vector(numberOfTeams);
for (int i=0; i<numberOfTeams; i++){
  Vector team = new Vector(numberOfGames);
  for (int j=0; j<numberOfGames; j++){
    int gameScore = generateScore(); // some method to generate a random score
    team.add( gameScore );
  }
  teams.add( team );
}

Doing the math on these is now just a matter of writing the loops over the teams and their scores.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

It's writing whatever "output" is to a buffered file output stream. If you just copied that in from somewhere, and you don't have a variable "output", then it certainly won't work.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Hi.

I saw your thread about a messenger. May I know how much?

Can I use it to send messenge to Yahoo Messenger, If I know yahoo instant messenger usernames?

Thanks

If you want to send him a private message I guess that's up to you, but I don't think transacting the sale of programs is the purpose of the forum.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Hello

How much time does it take to register a domain name?

Thanks
<snip>

Kind of an odd question given the advertising in your sig link.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Of course a superbug like MRSA might beat them all to it!

... or SARS... or H5N1 bird flu... or Ebola...
Always something isn't there? Chicken Little will always have something in the wings to crow over.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

If you are just learning, why are you concerned with the need for the .NET environment? Learn to program before worrying about distribution issues. C++ is not dying out. There is still a lot of work available. Again, not an issue to be concerned with when you are just starting out. If you learn one of them and need to use the other, you can cross that bridge when you come to it.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

There are some system-specific ways to do it, but it's not really the place of System.out.println() to do that.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

javac -cp .\;.\classes Koetesti.java