Follow Slashdot stories on Twitter


Forgot your password?

Comment From his Facebook post on his Sudoku solver (Score 5, Interesting) 230

He posted this on his Facebook.

For techies: the program does a backtrack search, choosing the next cell to guess which minimises the fanout.

Here’s a question for those reading the source code: if x is an (binary) integer, what does (x & -x) compute?

Hope you have fun playing with this. Please tell me if you find any bugs! – LHL


As several of you noted, (x & –x) returns the least significant ‘1’ bit of x, i.e. the highest power of two that divides x. This assumes two’s complement notation for negative numbers, as some of you also pointed out. e.g. if x=12 (binary 1100), then (x & -x) = 4 (binary 100). I didn’t invent this; it is an old programming trick.


Comment Human *FLESH* Search is correct! (Score 1) 109

No, "flesh" is NOT a racist typo! That is the direct translation of the actual Chinese phrase "ren rou sou suo".

ren rou: human flesh
sou suo: search

The idea is simply to leverage on the wide viewership of Internet communities (i.e.g forums and BBSes) to search or identify the actual "human flesh" responsible for the atrocities depicted in viral videos.

Comment Toy quads! (Score 1) 83

If the Lego quad interests you, you might want to check out V929, V939, V949, or V959. These toy grade quadcopters are dirt cheap. You can get one online for less than 50 bucks and they fly really well.

Comment Limited Android Market (Score 1) 278

Not only that the price is expensive after factoring in the shipping charges, this tablet is MIPS-based, so it will have a very limited Android Market. Take note!

The tablet to get is actually Ainol Novo 7 Advanced, not the Novo 7 Basic stated in the article. The 7A has a much better hardware. It is widely believed that the Novo7A will get ICS real soon as there are videos of it running ICS circulating in the chinese forums.

Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (7) Well, it's an excellent idea, but it would make the compilers too hard to write.