Berkeley CSUA MOTD:2001:February:09 Friday <Thursday, Saturday>
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2001/2/9-10 [Politics/Foreign] UID:20543 Activity:moderate
2/8     Anybody tried mailing seeds outside the country?  Do most countries
        allow this?  I'm sending some seeds to Tunisia, but I'm asking about
        this in general.  Thanks.
        \_ I don't know about shipping seeds out of the country, but I
           have received seeds from out of the country (Chile) just fine.
           \_ most countries will have SERIOUS problem when they got seeds
                from foreign country.  The proper route is to go through
                custom, and it WILL take forever. When you sending the seeds
                out, I doubt U.S. is going to have problem with that, but you
                better check on Tunisia.
                \_ Agree that the legal way is to go through customs.
                   But, I would sooner just send them in a regular
                   envelope, and take my chances.  How are you going to
                   contact the Tunisia plant permit people, anyway?
           \_ I also received seeds just fine from the Netherlands. How
              will anyone know there are seeds in there unless you're
              sending enough for them to sow a whole field? --dim
2001/2/9-10 [Computer/SW/Languages/Java] UID:20544 Activity:high
2/8     can someone please recommend a beginning java book for someone
        who's only programming experience is equivalent to 61a?  thanks.
        \_ Just Java by Van der Linden is pretty good.
        \_ "Thinking In Java" is almost too verbose. like having your hand
           held every step of the way. available online, for free. google.
           type "thinking in java bruce"
        \_ Just Java by Peter Van der Linden
                \_ thank you.  this is the first time i've gotten
                   a straight answer on the motd.
                   \_ so all the previous motd answers are gay?
2001/2/9 [Computer/SW/OS/Solaris] UID:20545 Activity:nil
2/8     How do I find or calculate the total number of processes a Solaris
2001/2/9 [Computer/HW/Memory] UID:20546 Activity:kinda low
        2.8 box can run before running out?
        \_ Run out of what?  If you mean memory, there is no simple answer -
           it depends on how much RAM & swap you have and how much each process
           uses.  -alan-
        \_ 2.8 same as pre-2.8 (except ptys are dynamically alloc'd)
           Examine with: sysdef -i or
             # adb -k /dev/ksyms /dev/mem
             parameter-name/D
             ^D (to exit)
             or
             # /etc/crash
             > od -d parameter-name
             > var
           where parameter-name is: maxusers, maxnprocs, or maxnuprc
           2.8 can do >30K processes by modifying several params(bet its buggy)
             Put set pidmax=999999 in /etc/system
             modify pre-2.8 formulas:
                 max_nprocs = ( 10 + 16 * maxusers ) ==> procs system-wide
                 maxuprc = ( max_nprocs - 5 ) ==> procs per user & 5 reserved
                                                  for root but can be modified.
           See http://docs.sun.com for real details -- I'm just guessing.
2001/2/9-11 [Computer/Theory] UID:20547 Activity:high
2/8     I have 20 positive numbers and five desired totals (all floating point
        numbers).  I need to pick five mutually exclusive sets (not necessarily
        exhausive) of numbers from the 20 numbers, and then sum up the numbers
        in the five sets to get five totals.  My goal is to minimize the
        mean-of-squares of the differences between the five totals and the five
        desired totals.  I wrote a C program to do the brute-force try-all-
        combinations method (that's (5+1)^20 combinations), and it looks like
        it's going to need ~120 years of CPU time on my P-II 350MHz!  Is there
        any better algorithm for doing this kind of things?  Thanks.  -- yuen
        \_ why isn't it 20!/(20-5)! ?
        \_ This is known as a 'bin packing problem.'  It is NP-hard (in other
           words it is at least as hard as any problem in NP). -- ilyas
        \_ exclusive means (20! / (5! * (20-5)!)) right?
           \_ No, that would be the # of combinations to pick one set of five
              numbers from the 20 numbers.  But in my case I need to pick five
              exclusive (ie. non-overlapping) sets instead of one, and each
              set can contain anywhere from zero to 20 numbers.  -- yuen
        \_ Can you use an approximate solution?  I think of this problem
           as being more similar to integer programming.  It's equivalent
           to min_A ||Ax-b||^2, such that 1^T A <= 1, where x is your
           vector of 20 positive numbers, b is the five desired sum, and
           A is a 5x20 matrix with the entries constrained to be either
           zero or 1.  You won't be able to reach the exact global optimum
           in poly time, but perhaps you can try adding an L_1 constraint
           to the objective?  i.e.
               min_A ||Ax-b||^2 + lambda*sum_ij |A_ij|, s.t. 1^T A <= 1
           L_1 penalty punishes any non-zero values, so A will have as
           many non-zero values as possible.  Of course you're still
           left with the problem of deciding which entries of A to clamp
           to 1...  Uh, need more optimization fu.  -- alice
           \_ If my memory serves me right, LP relaxation isn't all that great
              for bin-packing. The first reference point to check would be
              _Approximation_Algorithms_For_NP-Hard_Problems_, edited by Dorit
              Hochbaum:
              http://www.ieor.berkeley.edu/~hochbaum/html/book-aanp.html
              It should be available at any university library by now. Chapter
              2, written by Coffman, Garey, and Johnson (yes, THOSE Garey and
              Johnson), is "Approximation Algorithms for Bin Packing: A Survey"
              -alexf
              \_ I'm not up to date with NP approximation algorithms,
                 but LP might be the easiest (and most practical) to
                 implement than more complicated methods.  BTW, one can
                 express 0/1 constraints using (2A_ij-1)^2 = 1.  The
                 problem then is no longer LP, but you can get a lower
                 bound using Lagrange relaxation (i.e.  switching min & max),
                 then use gradient descent or something on the lower bound
                 function, which is usually much more tame than the original
                 problem.  This all sounds very complicated but is actually
                 doable.  I just don't know how good the approximation is.
                 Maybe the book will say something about it.  -- alice
                 \_ Thanks for all the suggestions.  Understanding what you
                    all said is already hard enough.  Gotta refresh my
                    170-series knowledge first before I go from here.  -- yuen
                 \_ can you think of a useful lower bound for what you're
                    suggesting? you are talking about lower bounding
                    |Ax-b|^2 + l*(|2A-1|^2-1) right? I'd bet that your
                    regularization term smooths out the surface so much
                    that you could just solve this using gradient descent.
                    that you could just solve this using newton raphson.
                 \_ this is one smart broad.
2001/2/9 [Computer/SW/Security] UID:20548 Activity:very high
2/8     Question about ssh or need confirmation.
        - purpose of using ssh is to avoid information that I read at my
          terminal not being seen by someone in between the traffic, so
          does that mean if my terminal is being mornitored (i.e., my employer
          or network admin is watching my console at a remote terminal), they
          will only see garbled messages?
        - or does ssh only ensures data send between soda and my terminal not
          being intercepted, but once information gets displayed on my screen,
          a mornitoring agent can just capture the screen and still see every
          key stroke I type in or every message I am reading?
                \_ work on your fucking english
                   \_ hahhaha...having a hard time reading?  I don't see the
                   others have any problem.  Can you just point out one flaw
                   so that I can fix it.
                        \_ double negative, run-on sentence, fragmentary
                           phrase, passive voice, misspelling.  And that's
                           just the first sentence.
        \_ ssh encrypts data on the network between your host and wherever you
           ssh to ( in this case, soda).  If your host has been compromised
           by whomever might be monitoring you, there is little ssh (or
           anything else for that matter) can do to stop you from being
           monitored.
           \_ here's what I do at work: swap around the keycaps on my
              keyboard. You should see the security people tearing their
              hair out! muahhaha!
              \_ how does that help really?
                 \_ security through obscurity.  though the right way to
                    do this is to use a qwerty keyboard in dvorak mode.
                    and remove the 'W'.
2001/2/9-10 [Computer/SW/Mail] UID:20549 Activity:high
2/9     Let's say I have two UNIX accounts.  Is there .forward some trick
        that I can do (without the infinite loop) such that the email
        received at both accounts can be accessed at either account?
        \_ "man procmailex" and look for: "Suppose you have two accounts,
            you use both accounts regularly, but they are in very distinct
            places"
            \_ you don't need procmail if both of the servers involved are
               running sendmail. If your accounts are foo@bar and
               baz@garply, put this in .forward on foo@bar:
               \foo
               \baz@garply
               and this in .forward on baz@garply:
               \baz
               \foo@bar
               Note that this may not work without sendmail, since other MTAs
               may ignore backslashed email addresses on incoming mail. -alexf
                \_ uh, it also will create an infinite loop.  good job.
               \_ This also doesn't let you filter the mail.  Procmail's
                  solution is more general.
         \_ Thanks!  It works great, though some tweaking was necessary
                  due to some odd configuration on one of the servers (piping to
                  sendmail didn't work).
2001/2/9-10 [Computer/SW/Unix] UID:20550 Activity:low
2/8     Do you use RXVT instead of xterm? You should. -ali
        \_ RXVT- that's almost like RSVP.  you know like 10.  Spatz's.
        \_ Why?  I actually use tektronix mode and like xterm's configuration
           a little better (e.g. bold actually works by default)
           \_ i think you're cool for using tektronix mode, whoever you are.
              i just checked this bold thing. it works fine for me. what's
              the problem exactly?  -ali
                \_ no problem. I may agree with your logic, but I simply
                   don't like your condescending tone and I don't like you.
                   \_ that's fine. my superior ability to love transcends your
                      petty feelings. use rxvt. -ali
2001/2/9-10 [Computer/SW/OS/FreeBSD] UID:20551 Activity:moderate
2/9     I'm Trying to add sound to FreeBSD 4.2- the handbook says that
        I have to check /dev/sndstat after recompiling and rebooting for
FreeBSD Audio Driver (newpcm) Sep 21 2000 18:29:53
Installed devices:
pcm0: <Aureal Vortex 8830> at memory 0xfeb40000 irq 5 (4p/1r +channels duplex)
        /dev/sndstat doesn't exist, but the pcm0 ID does show up in dmesg.
        man pages for sndstat are nil, what do I do?
        \_ cd /dev && ./MAKEDEV snd0
        \_ Thanks, I just skipped ahead and did that.  Now how do I mount a
        CDROM drive full of mp3s?
           \_ mkdir /mnt/cd && mount /dev/acd0c /mnt/cd
        \ I got an incorrect superblock doing that.
                mount_cd9660 /dev/acd0c /mnt/cd did work though.  Thx
          \_ mount -t cd9660 blahblahblah
2001/2/9-11 [Computer/SW/Languages, Computer/SW/Unix] UID:20552 Activity:nil
2/9     How do you do multilevel command substitution? For example,
        echo `echo `echo `echo hello```
        But how do you escape the `?
        Also how do you print ' within ', without using "? For example,
        echo ' \' ' (escape doesn't work)
        \_ In sh (or ksh or bash), echo $(echo $(echo hello)).  In any
           shell, echo 'here'\''s how'
2001/2/9-10 [Recreation/Dating] UID:20553 Activity:very high
2/9     I know a 25-year old female EE grad student from China, who
        wears a red ring on her left-hand ring finger.  What does this
        mean?
        \_ it means she is married to a Triad leader and has a wide
           variety of superpowers.
        \_ why not ask her and find out!
           \_ because he's a pussy!
           \_ that's too obvious and makes too much sense. try again.
        \_ It means she's married.  The red color is probably just for fashion
           and has no special meaning.  But let us know after you ask her.
           Is she hot?  Pics?
           and has no special meaning.
        \_ Of course, she could just be wearing it to discourage clueless,
           desperate geeks from hitting on her all the time.  A friend of
           mine who worked as a waitress at a cocktail bar did that all the
           time.
           mine who worked as a waitress at a cocktail bar used that ploy.
           \_ Geek ward?
        \_ Pics?
           \_ No Pics for you!
2001/2/9-10 [Computer/SW/Security] UID:20554 Activity:nil
2/9     ssh has vunerability. Integer overflow.  Openssh is safe.
        \_ Take that, Tom!  Take that, Bowlarama!  Take that, Convenience
           Mart!  Take that, Nuclear Power Plan--oh, fiddlesticks.
           \_ Bowlarama!  Good times!
2001/2/9-10 [Politics/Domestic/President/Clinton] UID:20555 Activity:moderate
2/9     I keep hearing "Bush retreats to his ranch." What is that like, a
        mansion or somethin'? How come Clinton never retreats to his ranch
        or penthouse (possibly with interns)?
        \_ Clinton retreated to the oral^H^H^Hval office
           \_ That is so incredibly stupid it's making my eyes bleed.
        \_ Watch a western sometime, cowboy, and then you'll understand.
           \_ Is this a "Silverado" or a "Josey Wales" kinda retreat?
              \_ It's a "daddy, what do I do now?" sort of retreat.
2017/09/22 [General] UID:1000 Activity:popular
9/22    
Berkeley CSUA MOTD:2001:February:09 Friday <Thursday, Saturday>