Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1 @@
A : array (1..N) of T;

View file

@ -0,0 +1 @@
A : array (1..N) of T := (others => V);

View file

@ -0,0 +1 @@
(1..N => V)

View file

@ -1,8 +1,6 @@
(phixonline)-->
<span style="color: #008080;">with</span> <span style="color: #008080;">javascript_semantics</span>
<span style="color: #004080;">sequence</span> <span style="color: #000000;">s</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">repeat</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"x"</span><span style="color: #0000FF;">,</span><span style="color: #000000;">6</span><span style="color: #0000FF;">)</span> <span style="color: #0000FF;">?</span><span style="color: #000000;">s</span>
<span style="color: #000000;">s</span><span style="color: #0000FF;">[$]</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">5</span> <span style="color: #0000FF;">?</span><span style="color: #000000;">s</span>
<span style="color: #000000;">s</span><span style="color: #0000FF;">[</span><span style="color: #000000;">1</span><span style="color: #0000FF;">]</span> <span style="color: #0000FF;">&=</span> <span style="color: #008000;">'y'</span> <span style="color: #0000FF;">?</span><span style="color: #000000;">s</span>
<span style="color: #000080;font-style:italic;">-- s[2] = s ?s</span>
<span style="color: #000000;">s</span><span style="color: #0000FF;">[</span><span style="color: #000000;">2</span><span style="color: #0000FF;">]</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">deep_copy</span><span style="color: #0000FF;">(</span><span style="color: #000000;">s</span><span style="color: #0000FF;">)</span> <span style="color: #0000FF;">?</span><span style="color: #000000;">s</span>
<!--
with javascript_semantics
sequence s = repeat("x",6) ?s
s[$] = 5 ?s
s[1] &= 'y' ?s
-- s[2] = s ?s
s[2] = deep_copy(s) ?s

View file

@ -1,3 +1 @@
(phixonline)-->
<span style="color: #004080;">sequence</span> <span style="color: #000000;">s</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">repeat</span><span style="color: #0000FF;">(</span><span style="color: #000000;">my_func</span><span style="color: #0000FF;">(),</span><span style="color: #000000;">5</span><span style="color: #0000FF;">)</span>
<!--
sequence s = repeat(my_func(),5)

View file

@ -1,6 +1,4 @@
(phixonline)-->
<span style="color: #004080;">sequence</span> <span style="color: #000000;">s</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">repeat</span><span style="color: #0000FF;">(</span><span style="color: #000000;">0</span><span style="color: #0000FF;">,</span><span style="color: #000000;">5</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">for</span> <span style="color: #000000;">i</span><span style="color: #0000FF;">=</span><span style="color: #000000;">1</span> <span style="color: #008080;">to</span> <span style="color: #7060A8;">length</span><span style="color: #0000FF;">(</span><span style="color: #000000;">s</span><span style="color: #0000FF;">)</span> <span style="color: #008080;">do</span>
<span style="color: #000000;">s</span><span style="color: #0000FF;">[</span><span style="color: #000000;">i</span><span style="color: #0000FF;">]</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">my_func</span><span style="color: #0000FF;">()</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">for</span>
<!--
sequence s = repeat(0,5)
for i=1 to length(s) do
s[i] = my_func()
end for

View file

@ -0,0 +1,32 @@
local foo_count = 0
class foo
private number
function __construct()
foo_count += 1 -- increment object counter
self.number = foo_count -- allocates a unique number to each object created
end
function getNumber() return self.number end
end
local n = 10 -- say
-- Create a List of 'n' distinct foo objects
local foos = table.create(n)
for i = 1, n do foos[i] = new foo() end
-- Show they're distinct by printing out their object numbers
foos:foreach(|f|-> do
io.write($"{f:getNumber()} ")
end)
print("\n")
-- Now create a second List where each of the 'n' elements is the same foo object
local foos2 = table.create(n)
local foo = new foo()
for i = 1, n do foos2[i] = foo end
-- Show they're the same by printing out their object numbers.
foos2:foreach(|f| -> do
io.write($"{f:getNumber()} ")
end)
print()

View file

@ -0,0 +1,3 @@
1..3 | ForEach-Object {((Get-Date -Hour ($_ + (1..4 | Get-Random))).AddDays($_ + (1..4 | Get-Random)))} |
Select-Object -Unique |
ForEach-Object {$_.ToString()}

View file

@ -0,0 +1,3 @@
1..3 | ForEach-Object {((Get-Date -Hour ($_ + (1..4 | Get-Random))).AddDays($_ + (1..4 | Get-Random)))} |
Select-Object -Unique |
ForEach-Object {$_.ToString()}