TIL: If you have a custom domain for one GitHub repo, you can use the apex domain instead of "user.github.io" for every other repo. E.g. 255.wf also works for 255.wf/FormulaCompiler
@mınxomaτ two things: 1) your SO profile link in the footer doesn't work, it's your UserID for PPCG, not SO, 2) the link on your SO profile to your website should be updated from minxomat.github.io to 255.wf (even though it redirects)
Lenna or Lena is the name given to a standard test image widely used in the field of image processing since 1973. It is a picture of Lena Söderberg, shot by photographer Dwight Hooker, cropped from the centerfold of the November 1972 issue of Playboy magazine.
The spelling "Lenna" comes from the anglicisation used in the original Playboy article.
== History ==
Before Lenna, the first use of a Playboy magazine image to illustrate image processing algorithms was in 1961. Lawrence G. Roberts used two cropped 6-bit grayscale facsimile scanned images from Playboy's July 1960 issue featuring Playmate...
>>> from random import randint as r
>>> [r(0,99) for k in range(10)]
[75, 92, 73, 84, 26, 20, 10, 94, 53, 12]
>>> [r(0,99) for k in range(10)]
[41, 33, 53, 36, 44, 61, 98, 41, 6, 25]
Well, okay, clarification needed: I actually have a list of objects, which are one thing or another. Order needs to be preserved, but the sorting key is binary.
Did you know that a small number can borrow bits from a larger number? Here's an example. Let's say our two numbers 5 and 14. First, write them out in binary:
5 14
000101 001110
First we take the smallest on bit away from the larger number, and we give it to the smaller number. So
Thi...
What's the simplest way to get a random integer 1 through 7 using only really simple operations? Context: am working on a tetris program for quest-for-tetris, and the current algorithm is a 16-bit xorshift.
@orlp distribution should be relatively uniform, no obvious pattern when looking at small groups of successive tetriminoes. It can fail all cryptographic tests badly, though.
@orlp We don't yet have an implementation of multiplication or modulo in circuitry, so we don't have those as commands. We do have shifts and addition/subtraction.
Multiplication and modulo can be done with loops/subroutines.
# output random values from 1 to 7, inclusive
my randval;
my rand = 1;
do {
do {
call rand = random(rand).state;
randval = rand & 7;
} while(randval < 1);
display = randval;
} while (1);
sub random(state, shifted) {
shifted = state << 1;
state ^= shifted;
shifted = state >>> 5;
state ^= shifted;
shifted = state << 2;
state ^= shifted;
}
> And that's because, according to Brennan, there's no one else for people to turn to: if they don't want to use US-based technology because it's been forced to use weakened cryptography, they'll be out of luck because non-American solutions are simply "theoretical."