events and threads

Discussion in 'Java' started by farseer, Apr 8, 2005.

  1. farseer

    farseer Guest

    Hello,
    i'd like to do the following. I have two classes that implement
    Runnable, ThreadA and ThreadB. There may be many ThreadA instances,
    but only one ThreadB instance. ThreadB will "fire" various events and
    The ThreadA instance will listen for these events.

    My questions are:
    1) is this possible
    2) How do i do this?
    i know the following. I create an EventListener in ThreadA and it's
    actionPerformed method will just add the Events to an ArrayList (i am
    not worried about synchronization, since only the instance of ThreadA
    will be modifying that ArrayList). The run method of ThreadA will
    process the queue (ArrayList) as long as it's not empty.
    THAT SAID, i am not sure how to register an event in this case? or do i
    need to do that? If i fire an event from ThreadB, will any class that
    has a listener method for that event be able to "catch" that event?

    i guess i need some help in figuring out how to implement this
    scenario, in particular, how to register the EventListener and whether
    this will create problems since it's two threads..one firing the events
    and one listening for the events?

    thanks much.
     
    farseer, Apr 8, 2005
    #1
    1. Advertising

  2. farseer

    John McGrath Guest

    On 4/7/2005 at 11:59:09 PM, farseer wrote:

    > i'd like to do the following. I have two classes that implement
    > Runnable, ThreadA and ThreadB. ....


    I already answered his question in the comp.lang.java.help newsgroup.
    Multiposting is generally frowned on, so please do not do it. Thanks.

    --
    Regards,

    John McGrath
     
    John McGrath, Apr 8, 2005
    #2
    1. Advertising

  3. farseer

    farseer Guest

    what is the more active java groups?
     
    farseer, Apr 8, 2005
    #3
  4. "farseer" <> wrote in message
    news:...
    > what is the more active java groups?
    >


    Both are active. .help is more for beginners and .programmer is more for
    advanced topics.

    Cheers,
    Matt Humphrey http://www.iviz.com/
     
    Matt Humphrey, Apr 8, 2005
    #4
  5. Matt Humphrey coughed up:
    > "farseer" <> wrote in message
    > news:...
    >> what is the more active java groups?
    >>

    >
    > Both are active. .help is more for beginners and .programmer is more
    > for advanced topics.
    >
    > Cheers,
    > Matt Humphrey http://www.iviz.com/



    This is how it seems to be accepted, which is fine, but I don't mind if
    people don't realize this. After all, the published "official" big-8
    newsgroup list does not say this in the group description at all.

    The description for comp.lang.java.help is:

    "Set-up problems, catch-all first aid."

    It does *not* say (perhaps it should, perhaps not):

    "Set-up problems, beginner questions"

    Here are the java groups with descriptions, as posted monthly in
    news.announce.newgroups, under the subject "List of Big Eight Newsgroups":

    http://groups-beta.google.com/group...fa272cf2cbb/1edfac4b68b6de8c#1edfac4b68b6de8c


    comp.lang.java.3d 3D Graphics API's for the Java language.
    comp.lang.java.advocacy Support for and criticism of the Java System.
    comp.lang.java.announce Announcements re the Java System. (Moderated)
    comp.lang.java.beans Java software components (JavaBeans).
    comp.lang.java.corba Topics relating to Java and CORBA.
    comp.lang.java.databases Databases, java.sql, JDBC, ODBC.
    comp.lang.java.gui GUI toolkits and windowing: AWT, IFC etc.
    *comp.lang.java.help* Set-up problems, catch-all first aid.
    comp.lang.java.machine JVM, native methods, hardware.
    comp.lang.java.programmer Programming in the Java language.
    comp.lang.java.security Security issues raised by Java.
    comp.lang.java.softwaretools IDEs, browsers, compilers, other tools.

    Note the mispelling of "JFC" in c.l.j.gui :)

    --
    Unix users who vehemently argue that the "ln" command has its arguments
    reversed do not understand much about the design of the utilities. "ln
    arg1 arg2" sets the arguments in the same order as "mv arg1 arg2".
    Existing file argument to non-existing argument. And in fact, mv
    itself is implemented as a link followed by an unlink.
     
    Thomas G. Marshall, Apr 8, 2005
    #5
  6. farseer

    Chris Smith Guest

    Thomas G. Marshall wrote:
    > This is how it seems to be accepted, which is fine, but I don't mind if
    > people don't realize this. After all, the published "official" big-8
    > newsgroup list does not say this in the group description at all.


    Indeed. If you carefully read the charters, you'll notice that .help is
    supposedly only vaguely appropriate for programming questions, and
    mainly for setup/installation problems. The main problem here is that
    charters can not be changed, so we're stuck with what Peter van der
    Linden came up with back in 1997. (This also explains clj.gui's
    inclusion of IFC, but not the newer JFC.)

    Two conclusions:

    1. Usage needs to be defined by group concensus, not by the charter or
    description of the groups when they were created.

    2. Because no one has authority on the usage of the groups, being a
    netcop on topicality between the groups just makes one look silly.

    --
    www.designacourse.com
    The Easiest Way To Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
     
    Chris Smith, Apr 9, 2005
    #6
  7. Chris Smith coughed up:
    > Thomas G. Marshall wrote:
    >> This is how it seems to be accepted, which is fine, but I don't mind
    >> if people don't realize this. After all, the published "official"
    >> big-8 newsgroup list does not say this in the group description at
    >> all.

    >
    > Indeed. If you carefully read the charters, you'll notice that .help
    > is supposedly only vaguely appropriate for programming questions, and
    > mainly for setup/installation problems. The main problem here is that
    > charters can not be changed, so we're stuck with what Peter van der
    > Linden came up with back in 1997. (This also explains clj.gui's
    > inclusion of IFC, but not the newer JFC.)
    >
    > Two conclusions:
    >
    > 1. Usage needs to be defined by group concensus, not by the charter or
    > description of the groups when they were created.


    Almost. Believe me, I'm not one of the usenet nazi's. But the charter as
    applicable to group descriptions /is/ done by vote, which is a consensus of
    sorts. The problem with having it be common usage dictated is the
    following:

    1. people continually educate others (often way too emphatically) about
    reading the charters and reading descriptions to find the right group for
    their posts.

    2. the same people who holler at people for posting in the wrong place
    are the same /types/ of people that holler at people for not posting
    beginner quotes into .help.

    In other words, if there is a description, it really oughtta be "right".
    How "right" is determined, be it common usage or pretended fiat, is not my
    concern.


    > 2. Because no one has authority on the usage of the groups, being a
    > netcop on topicality between the groups just makes one look silly.


    I agree. (I hope you weren't fingering me in that). The problem is that
    there isn't the following, which is desperately needed:

    comp.lang.java.beginner

    I've promised to myself to go through the hoopla of requesting that group,
    but have since found a million other things to do.

    The other *HUGE* problem, IMO, is that the retired newsgroups are not
    retired in most places. There really should be monthly postings in
    comp.lang.java for example:

    Subject: This newsgroup has been retired.

    <content>
    The official ng's are now. Please don't post in comp.lang.java, but find a
    suitable alternative:

    comp.lang.java.3d 3D Graphics API's for the Java language.
    comp.lang.java.advocacy Support for and criticism of the Java System.
    (etc.)
    </content>

    What makes this a huge problem IMO is that retired ng's tend to suck the
    life out of non-retired groups by placing posts into a void where many of
    the folks that know better do not venture.


    --
    Everythinginlifeisrealative.Apingpongballseemssmalluntilsomeoneramsitupyournose.
     
    Thomas G. Marshall, Apr 9, 2005
    #7
  8. Thomas G. Marshall wrote:
    > The other *HUGE* problem, IMO, is that the retired newsgroups are not
    > retired in most places. There really should be monthly postings in
    > comp.lang.java for example:
    >
    > Subject: This newsgroup has been retired.
    >
    > <content>
    > ...


    Are you volunteering? You did say it was a *HUGE* (double emphasis) problem ;^)

    You know: everyone complains about the weather, but nobody does anything about it.

    --
    Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
    ==============================================================
    * The Ultimate DBMS is here!
    * FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
     
    Lee Fesperman, Apr 9, 2005
    #8
  9. Lee Fesperman coughed up:
    > Thomas G. Marshall wrote:
    >> The other *HUGE* problem, IMO, is that the retired newsgroups are not
    >> retired in most places. There really should be monthly postings in
    >> comp.lang.java for example:
    >>
    >> Subject: This newsgroup has been retired.
    >>
    >> <content>
    >> ...

    >
    > Are you volunteering? You did say it was a *HUGE* (double emphasis)
    > problem ;^)
    >
    > You know: everyone complains about the weather, but nobody does
    > anything about it.



    Such postings should really be automated, and automated postings are
    suitable fodder for abuse complaints out the wazoo.

    If you think it'd help, I'll be glad to post something like that once in a
    while. Do you think it would be well received? Or would I condemned as a
    self appointed ruler...



    --
    If I can ever figure out how, I hope that someday I'll
    succeed in my lifetime goal of creating a signature
    that ends with the word "blarphoogy".
     
    Thomas G. Marshall, Apr 9, 2005
    #9
  10. Thomas G. Marshall wrote:
    >
    > Lee Fesperman coughed up:
    > > Thomas G. Marshall wrote:
    > >> The other *HUGE* problem, IMO, is that the retired newsgroups are not
    > >> retired in most places. There really should be monthly postings in
    > >> comp.lang.java for example:
    > >>
    > >> Subject: This newsgroup has been retired.
    > >>
    > >> <content>
    > >> ...

    > >
    > > Are you volunteering? You did say it was a *HUGE* (double emphasis)
    > > problem ;^)
    > >
    > > You know: everyone complains about the weather, but nobody does
    > > anything about it.

    >
    > Such postings should really be automated, and automated postings are
    > suitable fodder for abuse complaints out the wazoo.
    >
    > If you think it'd help, I'll be glad to post something like that once in a
    > while. Do you think it would be well received? Or would I condemned as a
    > self appointed ruler...


    I have to say it does bother me too, so I'd say go ahead if you're a mind. I won't worry
    about reactions from the somewhat clueless ones that post there. You should have a
    fairly thick skin from posting here ;^)

    Thinking about it, what bothers me more is those who answer questions there. I've never
    checked, but apparently some do that. Maybe your posting will get them to see the light
    too, or maybe they like having their own little pond.

    --
    Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
    ==============================================================
    * The Ultimate DBMS is here!
    * FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
     
    Lee Fesperman, Apr 10, 2005
    #10
  11. Lee Fesperman coughed up:
    > Thomas G. Marshall wrote:
    >>
    >> Lee Fesperman coughed up:
    >>> Thomas G. Marshall wrote:
    >>>> The other *HUGE* problem, IMO, is that the retired newsgroups are
    >>>> not retired in most places. There really should be monthly
    >>>> postings in comp.lang.java for example:
    >>>>
    >>>> Subject: This newsgroup has been retired.
    >>>>
    >>>> <content>
    >>>> ...
    >>>
    >>> Are you volunteering? You did say it was a *HUGE* (double emphasis)
    >>> problem ;^)
    >>>
    >>> You know: everyone complains about the weather, but nobody does
    >>> anything about it.

    >>
    >> Such postings should really be automated, and automated postings are
    >> suitable fodder for abuse complaints out the wazoo.
    >>
    >> If you think it'd help, I'll be glad to post something like that
    >> once in a while. Do you think it would be well received? Or would
    >> I condemned as a self appointed ruler...

    >
    > I have to say it does bother me too, so I'd say go ahead if you're a
    > mind. I won't worry about reactions from the somewhat clueless ones
    > that post there. You should have a fairly thick skin from posting
    > here ;^)


    lol. Yep.

    Ok, done. Let'm bring it on. This is the message:

    <QUOTE>

    (Subject: *NOTE* This is a RETIRED java newsgroup. Please redirect.)

    This message is sent to these newsgroups because they are no longer valid:

    comp.lang.java
    comp.lang.java.api
    comp.lang.java.bugs
    comp.lang.java.misc
    comp.lang.java.setup
    comp.lang.java.tech

    These are long since retired newsgroups. You may have ended up in one by
    posting on google groups, or verizon, or any number of ISP's that still
    carry them (and should not). You will get a far better audience by
    redirecting your future posts to one of the "officially active" newsgroups
    below.

    Here are the java groups with descriptions, as posted monthly in
    news.announce.newgroups, under the subject "List of Big Eight Newsgroups":

    http://groups-beta.google.com/group...fa272cf2cbb/1edfac4b68b6de8c#1edfac4b68b6de8c


    comp.lang.java.3d 3D Graphics API's for the Java language.
    comp.lang.java.advocacy Support for and criticism of the Java System.
    comp.lang.java.announce Announcements re the Java System. (Moderated)
    comp.lang.java.beans Java software components (JavaBeans).
    comp.lang.java.corba Topics relating to Java and CORBA.
    comp.lang.java.databases Databases, java.sql, JDBC, ODBC.
    comp.lang.java.gui GUI toolkits and windowing: AWT, IFC etc.
    comp.lang.java.help Set-up problems, catch-all first aid.
    comp.lang.java.machine JVM, native methods, hardware.
    comp.lang.java.programmer Programming in the Java language.
    comp.lang.java.security Security issues raised by Java.
    comp.lang.java.softwaretools IDEs, browsers, compilers, other tools.

    </QUOTE>

    --
    Framsticks. 3D Artificial Life evolution. You can see the creatures
    that evolve and how they interact, hunt, swim, etc. (Unaffiliated with
    me). http://www.frams.alife.pl/
     
    Thomas G. Marshall, Apr 10, 2005
    #11
  12. Thomas G. Marshall wrote:
    >
    > Lee Fesperman coughed up:
    > > Thomas G. Marshall wrote:
    > >> If you think it'd help, I'll be glad to post something like that
    > >> once in a while. Do you think it would be well received? Or would
    > >> I condemned as a self appointed ruler...

    > >
    > > I have to say it does bother me too, so I'd say go ahead if you're a
    > > mind. I won't worry about reactions from the somewhat clueless ones
    > > that post there. You should have a fairly thick skin from posting
    > > here ;^)

    >
    > lol. Yep.
    >
    > Ok, done. Let'm bring it on. This is the message:
    >
    > <QUOTE>
    >
    > (Subject: *NOTE* This is a RETIRED java newsgroup. Please redirect.)
    >
    > This message is sent to these newsgroups because they are no longer valid:
    >
    > comp.lang.java
    > comp.lang.java.api
    > comp.lang.java.bugs
    > comp.lang.java.misc
    > comp.lang.java.setup
    > comp.lang.java.tech
    >
    > These are long since retired newsgroups. You may have ended up in one by
    > posting on google groups, or verizon, or any number of ISP's that still
    > carry them (and should not). You will get a far better audience by
    > redirecting your future posts to one of the "officially active" newsgroups
    > below.
    >
    > Here are the java groups with descriptions, as posted monthly in
    > news.announce.newgroups, under the subject "List of Big Eight Newsgroups":
    >
    > http://groups-beta.google.com/group...fa272cf2cbb/1edfac4b68b6de8c#1edfac4b68b6de8c
    >
    > comp.lang.java.3d 3D Graphics API's for the Java language.
    > comp.lang.java.advocacy Support for and criticism of the Java System.
    > comp.lang.java.announce Announcements re the Java System. (Moderated)
    > comp.lang.java.beans Java software components (JavaBeans).
    > comp.lang.java.corba Topics relating to Java and CORBA.
    > comp.lang.java.databases Databases, java.sql, JDBC, ODBC.
    > comp.lang.java.gui GUI toolkits and windowing: AWT, IFC etc.
    > comp.lang.java.help Set-up problems, catch-all first aid.
    > comp.lang.java.machine JVM, native methods, hardware.
    > comp.lang.java.programmer Programming in the Java language.
    > comp.lang.java.security Security issues raised by Java.
    > comp.lang.java.softwaretools IDEs, browsers, compilers, other tools.
    >
    > </QUOTE>


    Nicely put. It was a great idea to hit them all at once, Thomas.

    It's got my approval. Anyone else want to chime in?

    --
    Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
    ==============================================================
    * The Ultimate DBMS is here!
    * FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)
     
    Lee Fesperman, Apr 10, 2005
    #12
  13. Lee Fesperman coughed up:
    > Thomas G. Marshall wrote:
    >>
    >> Lee Fesperman coughed up:
    >>> Thomas G. Marshall wrote:
    >>>> If you think it'd help, I'll be glad to post something like that
    >>>> once in a while. Do you think it would be well received? Or would
    >>>> I condemned as a self appointed ruler...
    >>>
    >>> I have to say it does bother me too, so I'd say go ahead if you're a
    >>> mind. I won't worry about reactions from the somewhat clueless ones
    >>> that post there. You should have a fairly thick skin from posting
    >>> here ;^)

    >>
    >> lol. Yep.
    >>
    >> Ok, done. Let'm bring it on. This is the message:
    >>
    >> <QUOTE>
    >>
    >> (Subject: *NOTE* This is a RETIRED java newsgroup. Please redirect.)
    >>
    >> This message is sent to these newsgroups because they are no longer
    >> valid:
    >>
    >> comp.lang.java
    >> comp.lang.java.api
    >> comp.lang.java.bugs
    >> comp.lang.java.misc
    >> comp.lang.java.setup
    >> comp.lang.java.tech
    >>
    >> These are long since retired newsgroups. You may have ended up in
    >> one by posting on google groups, or verizon, or any number of ISP's
    >> that still carry them (and should not). You will get a far better
    >> audience by redirecting your future posts to one of the "officially
    >> active" newsgroups below.
    >>
    >> Here are the java groups with descriptions, as posted monthly in
    >> news.announce.newgroups, under the subject "List of Big Eight
    >> Newsgroups":
    >>
    >> http://groups-beta.google.com/group...fa272cf2cbb/1edfac4b68b6de8c#1edfac4b68b6de8c
    >>
    >> comp.lang.java.3d 3D Graphics API's for the Java language.
    >> comp.lang.java.advocacy Support for and criticism of the Java System.
    >> comp.lang.java.announce Announcements re the Java System. (Moderated)
    >> comp.lang.java.beans Java software components (JavaBeans).
    >> comp.lang.java.corba Topics relating to Java and CORBA.
    >> comp.lang.java.databases Databases, java.sql, JDBC, ODBC.
    >> comp.lang.java.gui GUI toolkits and windowing: AWT, IFC etc.
    >> comp.lang.java.help Set-up problems, catch-all first aid.
    >> comp.lang.java.machine JVM, native methods, hardware.
    >> comp.lang.java.programmer Programming in the Java language.
    >> comp.lang.java.security Security issues raised by Java.
    >> comp.lang.java.softwaretools IDEs, browsers, compilers, other
    >> tools.
    >>
    >> </QUOTE>

    >
    > Nicely put. It was a great idea to hit them all at once, Thomas.


    Actually, there's two I cannot hit unless I go through google: developer and
    javascript----I'll do that soon. Javascript should be
    comp.lang.javascript, not comp.lang.java.javascript, which is there in
    google.



    > It's got my approval. Anyone else want to chime in?





    --
    Sometimes life just sucks and then you live.
     
    Thomas G. Marshall, Apr 10, 2005
    #13
  14. farseer

    Chris Smith Guest

    Thomas G. Marshall wrote:
    > Actually, there's two I cannot hit unless I go through google: developer and
    > javascript----I'll do that soon. Javascript should be
    > comp.lang.javascript, not comp.lang.java.javascript, which is there in
    > google.


    For the record, comp.lang.java.javascript was a group for discussing
    communication between Java and JavaScript; different from
    comp.lang.javascript, which has nothing to do with Java at all.

    --
    www.designacourse.com
    The Easiest Way To Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
     
    Chris Smith, Apr 10, 2005
    #14
  15. Chris Smith coughed up:
    > Thomas G. Marshall wrote:
    >> Actually, there's two I cannot hit unless I go through google:
    >> developer and javascript----I'll do that soon. Javascript should
    >> be comp.lang.javascript, not comp.lang.java.javascript, which is
    >> there in google.

    >
    > For the record, comp.lang.java.javascript was a group for discussing
    > communication between Java and JavaScript; different from
    > comp.lang.javascript, which has nothing to do with Java at all.


    Ok, but it's not on the list. I'm starting to feel like senator mccarthy.
    I'll leave it out.

    By the way, is there /no/ way to have an obfuscated email address with
    google?

    --
    Puzzle: You are given a deck of cards all face up
    except for 10 cards mixed in which are face down.
    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, Apr 10, 2005
    #15
  16. Thomas G. Marshall wrote:
    > comp.lang.java.gui GUI toolkits and windowing: AWT, IFC etc.

    [...]
    > Note the mispelling of "JFC" in c.l.j.gui :)


    Thats not a misspelling. IFC = Netscape's Internet Foundation Classes.
    At the time of the group's creation that was considered the best
    candidate for an AWT successor. IFC, like other technologies became
    input to the JFC, and the IFC was a base for Swing. Other stuff that
    went into the JFC was technology from Taligent, which became the Java 2D
    API.

    The short description just shows the age of the group.

    /Thomas


    --
    The comp.lang.java.gui FAQ:
    ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
     
    Thomas Weidenfeller, Apr 11, 2005
    #16
  17. "Thomas G. Marshall" <>
    wrote in message news:Gke6e.9593$Xm3.8757@trndny01...
    > Chris Smith coughed up:
    > > Thomas G. Marshall wrote:
    > >> Actually, there's two I cannot hit unless I go through google:
    > >> developer and javascript----I'll do that soon. Javascript should
    > >> be comp.lang.javascript, not comp.lang.java.javascript, which is
    > >> there in google.

    > >
    > > For the record, comp.lang.java.javascript was a group for discussing
    > > communication between Java and JavaScript; different from
    > > comp.lang.javascript, which has nothing to do with Java at all.

    >
    > Ok, but it's not on the list. I'm starting to feel like senator mccarthy.
    > I'll leave it out.
    >
    > By the way, is there /no/ way to have an obfuscated email address with
    > google?
    >
    > --
    > Puzzle: You are given a deck of cards all face up
    > except for 10 cards mixed in which are face down.
    > 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.


    Off topic (well, not much more than the current discussion)

    Are you sure your puzzle is correct with respect to your answer? Shouldn't
    the request be for the same number of face-down cards in each pile, not
    face-up cards? (Your answer is to deal 10 at random and flip them [the 10]
    over. That gives an equal amount face-down in each pile. Dealing 10 at
    random and flipping the remainder of the deck gives the same number face-up.
    Or dealing 42 and flipping them [the 42] over gives the same number of
    face-up.)

    Cheers,
    Matt Humphrey http://www.iviz.com/
     
    Matt Humphrey, Apr 11, 2005
    #17
  18. Matt Humphrey coughed up:
    > "Thomas G. Marshall"
    > <> wrote in
    > message news:Gke6e.9593$Xm3.8757@trndny01...
    >> Chris Smith coughed up:
    >>> Thomas G. Marshall wrote:
    >>>> Actually, there's two I cannot hit unless I go through google:
    >>>> developer and javascript----I'll do that soon. Javascript should
    >>>> be comp.lang.javascript, not comp.lang.java.javascript, which is
    >>>> there in google.
    >>>
    >>> For the record, comp.lang.java.javascript was a group for discussing
    >>> communication between Java and JavaScript; different from
    >>> comp.lang.javascript, which has nothing to do with Java at all.

    >>
    >> Ok, but it's not on the list. I'm starting to feel like senator
    >> mccarthy. I'll leave it out.
    >>
    >> By the way, is there /no/ way to have an obfuscated email address
    >> with google?
    >>
    >> --
    >> Puzzle: You are given a deck of cards all face up
    >> except for 10 cards mixed in which are face down.
    >> 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.

    >
    > Off topic (well, not much more than the current discussion)
    >
    > Are you sure your puzzle is correct with respect to your answer?
    > Shouldn't the request be for the same number of face-down cards in
    > each pile, not face-up cards? (Your answer is to deal 10 at random
    > and flip them [the 10] over. That gives an equal amount face-down in
    > each pile. Dealing 10 at random and flipping the remainder of the
    > deck gives the same number face-up. Or dealing 42 and flipping them
    > [the 42] over gives the same number of face-up.)
    >
    > Cheers,
    > Matt Humphrey http://www.iviz.com/


    YES! In my [unbelievablystupiddumbass] haste, I mistyped. THANKS!!!!!!



    --
    http://www.allexperts.com is a nifty way to get an answer to just about
    /anything/.
     
    Thomas G. Marshall, Apr 11, 2005
    #18
  19. Matt Humphrey coughed up:

    ....[rip]...


    > Are you sure your puzzle is correct with respect to your answer?


    thanks again.

    ....[rip]...

    --
    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, Apr 11, 2005
    #19
  20. Lee Fesperman coughed up:

    ....[rip]...

    > Nicely put. It was a great idea to hit them all at once, Thomas.
    >
    > It's got my approval. Anyone else want to chime in?



    Well Lee, as I (we?) predicted, there were a couple of angry knee-jerk
    reactions to the post in comp.lang.java. The first person seemed to
    understand after some back and forth, the 2nd guy was just, well, off the
    wall. It's a pretty sad set of posts he made actually. He argued so poorly
    that I actually am in the weird position of feeling bad for him.

    Actually, this is not my prediction really: I was expecting something more
    like 10-20 death threats. So I'm fairly pleased with the outcome. I figure
    I'll post a few more from time to time. Beats me if it'll have any real
    effect---but maybe at least a person here or there will learn how to find
    the right groups.


    --
    If I can ever figure out how, I hope that someday I'll
    succeed in my lifetime goal of creating a signature
    that ends with the word "blarphoogy".
     
    Thomas G. Marshall, Apr 26, 2005
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shiv
    Replies:
    0
    Views:
    500
  2. newbye
    Replies:
    0
    Views:
    587
    newbye
    Jul 6, 2006
  3. Replies:
    4
    Views:
    665
    Ben Sizer
    Aug 25, 2006
  4. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    406
    Chris
    Aug 30, 2005
  5. Une bévue
    Replies:
    0
    Views:
    177
    Une bévue
    Jun 14, 2006
Loading...

Share This Page