Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[COLOR=#0000ff]/************** main program *********************/[/color]
nr_lines [COLOR=#804040][b]=[/b][/color] 10 [COLOR=#0000ff]/* nr of lines to be generated */[/color]
lines_used. [COLOR=#804040][b]=[/b][/color] 0 [COLOR=#0000ff]/* stem for storing lines */[/color]
i [COLOR=#804040][b]=[/b][/color] 0
[COLOR=#804040][b]do [/b][/color][COLOR=#804040][b]while[/b][/color][COLOR=#804040][b] [/b][/color][COLOR=#008080]([/color]i [COLOR=#804040][b]<[/b][/color] nr_lines[COLOR=#008080])[/color]
line [COLOR=#804040][b]=[/b][/color] [COLOR=#008080]random_line()[/color]
[COLOR=#804040][b]if[/b][/color] lines_used.line [COLOR=#804040][b]=[/b][/color] 1 [COLOR=#804040][b]then[/b][/color]
[COLOR=#804040][b]nop[/b][/color] [COLOR=#0000ff]/* this line was generated before */[/color]
[COLOR=#804040][b]else[/b][/color] [COLOR=#804040][b]do[/b][/color]
lines_used.line [COLOR=#804040][b]=[/b][/color] 1 [COLOR=#0000ff]/* mark line in stem */[/color]
lines_used.0 [COLOR=#804040][b]=[/b][/color] lines_used.0 [COLOR=#804040][b]+[/b][/color] 1
i [COLOR=#804040][b]=[/b][/color] i [COLOR=#804040][b]+[/b][/color] 1
[COLOR=#804040][b]say[/b][/color] [COLOR=#008080]right([/color] i[COLOR=#804040][b]||[/b][/color][COLOR=#ff00ff]'. '[/color][COLOR=#804040][b],[/b][/color] 4[COLOR=#008080])[/color] [COLOR=#804040][b]||[/b][/color] line [COLOR=#0000ff]/* print unique line */[/color]
[COLOR=#804040][b]end[/b][/color]
[COLOR=#804040][b]end[/b][/color]
[COLOR=#804040][b]exit[/b][/color]
[COLOR=#0000ff]/******************* functions *******************/[/color]
[COLOR=#008080]random_line [/color][COLOR=#804040][b]:[/b][/color]
[COLOR=#0000ff]/* creates random line of 20 characters+digits */[/color]
line [COLOR=#804040][b]=[/b][/color] [COLOR=#ff00ff]""[/color]
nr_char [COLOR=#804040][b]=[/b][/color] 0
[COLOR=#804040][b]do [/b][/color][COLOR=#804040][b]while[/b][/color][COLOR=#804040][b] [/b][/color][COLOR=#008080]([/color]nr_char [COLOR=#804040][b]<[/b][/color] 20[COLOR=#008080])[/color]
r [COLOR=#804040][b]=[/b][/color] [COLOR=#008080]random([/color]255[COLOR=#008080])[/color]
[COLOR=#804040][b]select[/b][/color]
[COLOR=#804040][b]when[/b][/color] [COLOR=#008080]([/color]r [COLOR=#804040][b]>=[/b][/color] 0 [COLOR=#804040][b]&[/b][/color] r [COLOR=#804040][b]<=[/b][/color] 9[COLOR=#008080])[/color] [COLOR=#804040][b]then[/b][/color] [COLOR=#804040][b]do[/b][/color]
[COLOR=#0000ff]/* digit 0 to 9 */[/color]
char [COLOR=#804040][b]=[/b][/color] r
nr_char [COLOR=#804040][b]=[/b][/color] nr_char [COLOR=#804040][b]+[/b][/color] 1
line [COLOR=#804040][b]=[/b][/color] line [COLOR=#804040][b]||[/b][/color] char
[COLOR=#804040][b]end[/b][/color]
[COLOR=#804040][b]when[/b][/color] [COLOR=#008080]([/color]r [COLOR=#804040][b]>=[/b][/color] 65 [COLOR=#804040][b]&[/b][/color] r [COLOR=#804040][b]<=[/b][/color] 90[COLOR=#008080])[/color] [COLOR=#804040][b]|[/b][/color] [COLOR=#008080]([/color]r [COLOR=#804040][b]>=[/b][/color] 97 [COLOR=#804040][b]&[/b][/color] r [COLOR=#804040][b]<=[/b][/color] 122[COLOR=#008080])[/color] [COLOR=#804040][b]then[/b][/color] [COLOR=#804040][b]do[/b][/color]
[COLOR=#0000ff]/* character A..Za..z */[/color]
char [COLOR=#804040][b]=[/b][/color] [COLOR=#008080]D2C([/color]r[COLOR=#008080])[/color]
nr_char [COLOR=#804040][b]=[/b][/color] nr_char [COLOR=#804040][b]+[/b][/color] 1
line [COLOR=#804040][b]=[/b][/color] line [COLOR=#804040][b]||[/b][/color] char
[COLOR=#804040][b]end[/b][/color]
[COLOR=#804040][b]otherwise[/b][/color]
[COLOR=#804040][b]nop[/b][/color]
[COLOR=#804040][b]end[/b][/color] [COLOR=#0000ff]/* select */[/color]
[COLOR=#804040][b]end[/b][/color] [COLOR=#0000ff]/* while */[/color]
[COLOR=#804040][b]return[/b][/color] line
1. eRQZ7bJ1kdkE3GXo7rWz
2. vf0YAc3ix2AagjEhrC7n
3. ZaSplIT5fL2CHnVn3aHH
4. cLIW3aS9pzNXe7Snv5Lp
5. Nr2X4OxZNNs2Q9ezlFeo
6. FKl06G1jVp0t6ZgMHSwe
7. dPjd1tkLW0R2u2wqgdyw
8. oLZFU5MjxvUIkjWS2Rgf
9. ZbAIjD55QqPUUJORbTYo
10. AZu5oseMYj40nAIkcbgQ
[COLOR=#0000ff]/************** main program *********************/[/color]
nr_lines [COLOR=#804040][b]=[/b][/color] 10 [COLOR=#0000ff]/* nr of lines to be generated */[/color]
lines_used. [COLOR=#804040][b]=[/b][/color] 0 [COLOR=#0000ff]/* stem for storing lines */[/color]
i [COLOR=#804040][b]=[/b][/color] 0
[COLOR=#804040][b]do [/b][/color][COLOR=#804040][b]while[/b][/color][COLOR=#804040][b] [/b][/color][COLOR=#008080]([/color]i [COLOR=#804040][b]<[/b][/color] nr_lines[COLOR=#008080])[/color]
line [COLOR=#804040][b]=[/b][/color] [COLOR=#008080]random_line()[/color]
[COLOR=#804040][b]if[/b][/color] lines_used.line [COLOR=#804040][b]=[/b][/color] 1 [COLOR=#804040][b]then[/b][/color]
[COLOR=#804040][b]nop[/b][/color] [COLOR=#0000ff]/* this line was generated before */[/color]
[COLOR=#804040][b]else[/b][/color] [COLOR=#804040][b]do[/b][/color]
lines_used.line [COLOR=#804040][b]=[/b][/color] 1 [COLOR=#0000ff]/* mark line in stem */[/color]
lines_used.0 [COLOR=#804040][b]=[/b][/color] lines_used.0 [COLOR=#804040][b]+[/b][/color] 1
i [COLOR=#804040][b]=[/b][/color] i [COLOR=#804040][b]+[/b][/color] 1
[COLOR=#804040][b]say[/b][/color] [COLOR=#008080]right([/color] i[COLOR=#804040][b]||[/b][/color][COLOR=#ff00ff]'. '[/color][COLOR=#804040][b],[/b][/color] 4[COLOR=#008080])[/color] [COLOR=#804040][b]||[/b][/color] line [COLOR=#0000ff]/* print unique line */[/color]
[COLOR=#804040][b]end[/b][/color]
[COLOR=#804040][b]end[/b][/color]
[COLOR=#804040][b]exit[/b][/color]
[COLOR=#0000ff]/******************* functions *******************/[/color]
[COLOR=#008080]random_line [/color][COLOR=#804040][b]:[/b][/color]
[COLOR=#0000ff]/* creates random line of 20 characters+digits */[/color]
line [COLOR=#804040][b]=[/b][/color] [COLOR=#ff00ff]""[/color]
nr_char [COLOR=#804040][b]=[/b][/color] 0
[COLOR=#804040][b]do [/b][/color][COLOR=#804040][b]while[/b][/color][COLOR=#804040][b] [/b][/color][COLOR=#008080]([/color]nr_char [COLOR=#804040][b]<[/b][/color] 20[COLOR=#008080])[/color]
r [COLOR=#804040][b]=[/b][/color] [COLOR=#008080]random([/color]255[COLOR=#008080])[/color]
[COLOR=#804040][b]if[/b][/color] [COLOR=#008080]([/color]r [COLOR=#804040][b]>=[/b][/color] 48 [COLOR=#804040][b]&[/b][/color] r [COLOR=#804040][b]<=[/b][/color] 57[COLOR=#008080])[/color] [COLOR=#804040][b]|[/b][/color] [highlight #ffff00][COLOR=#000000],[/color][/highlight]
[COLOR=#008080]([/color]r [COLOR=#804040][b]>=[/b][/color] 65 [COLOR=#804040][b]&[/b][/color] r [COLOR=#804040][b]<=[/b][/color] 90[COLOR=#008080])[/color] [COLOR=#804040][b]|[/b][/color] [highlight #ffff00][COLOR=#000000],[/color][/highlight]
[COLOR=#008080]([/color]r [COLOR=#804040][b]>=[/b][/color] 97 [COLOR=#804040][b]&[/b][/color] r [COLOR=#804040][b]<=[/b][/color] 122[COLOR=#008080])[/color] [COLOR=#804040][b]then[/b][/color] [COLOR=#804040][b]do[/b][/color]
[COLOR=#0000ff]/* character 0..9, A..Z, a..z */[/color]
char [COLOR=#804040][b]=[/b][/color] [COLOR=#008080]D2C([/color]r[COLOR=#008080])[/color]
nr_char [COLOR=#804040][b]=[/b][/color] nr_char [COLOR=#804040][b]+[/b][/color] 1
line [COLOR=#804040][b]=[/b][/color] line [COLOR=#804040][b]||[/b][/color] char
[COLOR=#804040][b]end[/b][/color]
[COLOR=#804040][b]end[/b][/color] [COLOR=#0000ff]/* while */[/color]
[COLOR=#804040][b]return[/b][/color] line
/* REXX */
dgts='1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
maxlines=10 ; numchars=20
used.=0 ; lines=0
do while lines<maxlines
code=''
do numchars ; code=code||substr(dgts,random(length(dgts)-1)+1,1) ; end
if used.code=0 then do
used.code=1 ; lines=lines+1 ; say right(lines,length(maxlines),'0')||'. '||code
end
end
exit 0
01. 4YrSEX5Ft0HvS7XqdCAA
02. 74XQKNjZncSveH8r8U0j
03. XNxv3nKlaIHertk0gcc6
04. w1HzeSkIA3v1VsYM3JGN
05. kInJ689toGYb3r70Vw08
06. bu1eLPFm4PHNblPefIQp
07. d1VWMOaUSuYTNBheCdx2
08. 26wGXxxwsehRtFCfg9Jj
09. YmSZ3revpPfM8aAv81ed
10. rnVTGVlLPGR1KpeBgpZh
Press ENTER key to exit...
/* REXX */
dgts='1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
maxlines=10 ; numchars=20
used.=0 ; lines=0 ; rmax=length(dgts)-1 ; ixlen=length(maxlines)
do while lines<maxlines
code=''
do numchars ; code=code||substr(dgts,random(rmax)+1,1) ; end
if used.code=0 then do
used.code=1 ; lines=lines+1 ; say right(lines,ixlen,'0')||'. '||code
end
end
exit 0