Follow Slashdot stories on Twitter


Forgot your password?
Slashdot Deals: Deal of the Day - Pay What You Want for the Learn to Code Bundle, includes AngularJS, Python, HTML5, Ruby, and more. ×

Comment Mode of list of numbers (Score 2) 208

The author used Python for his example and suggested using a Dict to solve the first problem, so presumably we have the Standard Python Library at our disposal:

from collections import Counter
def get_mode(nums): return Counter(nums).most_common(1)

This will give the mode and the count. I don't think the author's solution (14 lines) would get you the job!

Normally, I wouldn't make it one line, but the Slashdot Editor Window doesn't seem to support a proper code block and also doesn't support non-breakings spaces.

Comment Michael Medved (Score 1) 309

I bring this up occasionally -- get on the Michael Medved Radio Show. Medved is a nationally-syndicated, conservative, radio talk show host who invites debate and frequently has guests with opposing viewpoints. He is very polite to his guests and callers, so Lessig would definitely be allowed to make his points. This is an area of frequent discussion on the Medved show, so I'm sure that he'd be interested in having Lessig as a guest.

Comment Re: Read the paper. Disagree with "symbols" (Score 1) 103

True story - my brother and I were at a financial services institution to take care of my mother's accounts when her Alzheimer's took over. So, he's creating a password and the system wouldn't take it -- it kept giving an obvious database error (not something that would normally be shown to an end-user). He showed me what he was typing and it contained a single-quote, something like "Mom's account". I told him to take out the single quote and it was happy.

I insisted that the representative get their developers on the phone, immediately, which she did, and then I had her relay my concerns about their obviously vulnerable design.

Comment Re:A perfect example of why tech is cyclical.... (Score 1) 94

That's odd. I always thought the quote was from the book "The Eudaemonic Pie" (the true story of the MIT group beating the casinos at roulette), in which there actually was a station wagon full of tapes hurtling down the highway. I suppose the author could have just reused the quote, but it seems like a pretty big coincidence.

Comment Re:Fun Movie, Not Future Reality (Score 4, Insightful) 124

I just watched this tonight with a lady friend. I was bored enough to browse /. on my phone for a little while. Then she grabbed my hand and whispered that I'm supposed to be watching the movie.

Wow - you just casually admit to this? For the sake of others, please never do this again. There's a reason that theaters run the little public service announcements about turning off your phone before the movie. This should be a standard question on a test designed to identify sociopaths: "If you bored while watching a movie in a theater, do you a) suffer silently, b) leave the theater, or c) ignore the rest of the people in the theater that have paid to watch the movie and pull out your phone."

"If I do not want others to quote me, I do not speak." -- Phil Wayne