
Signature
Puzzle: You are given a deck of cards all face down
except for 10 cards mixed in which are face up.
If you are in a pitch black room, how do you divide
the deck into two piles (may be uneven) that each
contain the same number of face-up cards?
Answer (rot13): Sebz naljurer va gur qrpx, qrny bhg
gra pneqf naq syvc gurz bire.
Thomas G. Marshall <tgm2tothe10thpower@replacetextwithnumber.hotmail.com> wrote or quoted:
> Tim Tyler coughed up:
> > Tim Slattery <Slattery_T@bls.gov> wrote or quoted:
> >>> I would like to prompt the user for a password and turn off echoing
> >>> what the user inputs ("stty echo off" command in unix). Is this
[quoted text clipped - 11 lines]
> It's entirely possible that the OP was looking for something non-command
> line based, but didn't know how to ask for it in swing/awt/etc.
The URL covers that too:
``If you wish to provide a graphical login dialog box for your
application, you can use the AWT's TextField class, which is a text
component that allows editing of a single line of text. To mask the
password field, use the setEchoChar method. For example, to set the
echo char to an asterisk, you would do the following:
TextField password = new TextField(8);
password.setEchoChar('*');''
There's also a Swing version.
> But in any case, I think that the solution you provided is both clever *and*
> hysterical!
It's a real problem for those writing command line tools in Java.
Echoing passwords to the screen is simply not normally acceptable.
It's good that there's a way around the problem - even if it is ridiculous.

Signature
__________
|im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.