Widgets
Place a widget in a lesson with a self-closing tag, <caesar shift="3" />, on a line of its own for a block or inside a paragraph for an inline widget. Options are attributes; all are optional.
| Tag | Does | Options |
|---|---|---|
<caesar /> | Caesar shift of a text | shift: starting shift, default 3text: starting plaintext |
<mod-table /> | multiplication table mod n, inverses highlighted | n: starting modulus, 2 to 30, default 7 |
<nbv-2d /> | compile an nbv program and draw its r1cs in 2d | source: the program; default: the nbv code block before the widgetinputs: space separated entrypoint input lengths; default 1 per argumentsize: image size in pixels, default 480 |
<perceptron /> | train one neuron on AND, OR or XOR, one epoch per click | gate: starting gate: and, or, xor; default and |
<random-ids /> | random identifiers on a multiset: a set unless two collide | n: number of elements, 2 to 64, default 16bits: bits per identifier, the identifier space is 2^bits, 1 to 32, default 8 |
<sort-steps /> | bubble sort, one comparison per click | values: space separated numbers, default 5 2 9 1 7 3 8 4 |
<subnet /> | IPv4 CIDR block to network, broadcast, mask and host count | cidr: starting block, default 192.168.1.77/24 |
<word-count /> | word and distinct word counts, most common words | text: starting text |