Slashdot Mirror


User: NSRaffy

NSRaffy's activity in the archive.

Stories
0
Comments
3
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 3

  1. Re:So what will happen in practice? on Google Hacked, May Pull Out of China · · Score: 1

    haha

  2. better idea? on Can rev="canonical" Replace URL-Shortening Services? · · Score: 1

    urls posted to twitter should automatically be converted to a shortened url supported by twitter themselves:

    tweet: "check this out http://foo.com/bar/lots/of/crap.html?a=1&b=2&c=3..."

    should appears as: "check this out http://twitter.com/$user/x"
    (where x is an unique id)

    there would be a limit on the number of urls encoded per hour

    after a 24 hours or so, the urls would automatically expand in your tweet history.

    additionally, you could list all the shortened urls you are provided and convert them to long urls manually.

  3. A few lines of Mathematica on Solving the Knight's Tour Puzzle In 60 Lines of Python · · Score: 1

    ClearAll[solve, jump];
    $Jumps = {{-2, 1}, {-1, 2}, {1, 2}, {2, 1}, {2, -1}, {1, -2}, {-1, -2}, {-2, -1}};
    solve[n_] := (ClearAll[board]; Catch[jump[1, 1, 1, n]]; Array[board, {n, n}]);
    jump[x_, y_, z_, n_] /; 1 <= x <= n && 1 <= y <= n && ! ValueQ[board[x, y]] := (
       board[x, y] = z;
       If[z == n^2, Throw[1]];
       jump[x + #1, y + #2, z + 1, n] & @@@ $Jumps;
       board[x, y] =.;
       );
    Block[{$RecursionLimit = Infinity}, solve[5] // MatrixForm]