Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,15 +0,0 @@
with Ada.Containers.Ordered_Sets, Ada.Text_IO;
use Ada.Text_IO;
procedure Duplicate is
package Int_Sets is new Ada.Containers.Ordered_Sets (Integer);
Nums : constant array (Natural range <>) of Integer := (1,2,3,4,5,5,6,7,1);
Unique : Int_Sets.Set;
begin
for n of Nums loop
Unique.Include (n);
end loop;
for e of Unique loop
Put (e'img);
end loop;
end Duplicate;

View file

@ -2,12 +2,12 @@ import extensions;
import system'collections;
import system'routines;
public program()
public Program()
{
var nums := new int[]{1,1,2,3,4,4};
auto unique := new Map<int, int>();
nums.forEach::(n){ unique[n] := n };
console.printLine(unique.MapValues.asEnumerable())
Console.printLine(unique.MapValues.asEnumerable())
}

View file

@ -1,17 +0,0 @@
include sort.e
function uniq(sequence s)
sequence out
s = sort(s)
out = s[1..1]
for i = 2 to length(s) do
if not equal(s[i],out[$]) then
out = append(out, s[i])
end if
end for
return out
end function
constant s = {1, 2, 1, 4, 5, 2, 15, 1, 3, 4}
? s
? uniq(s)

View file

@ -1 +0,0 @@
$data = 1,2,3,1,2,3,4,1

View file

@ -1,5 +0,0 @@
$h = @{}
foreach ($x in $data) {
$h[$x] = 1
}
$h.Keys

View file

@ -1 +0,0 @@
$data | Sort-Object -Unique

View file

@ -1 +0,0 @@
$data | Select-Object -Unique

View file

@ -1 +0,0 @@
print mold unique [1 $23.19 2 elbow 3 2 Bork 4 3 elbow 2 $23.19]

View file

@ -1,15 +0,0 @@
Function remove_duplicates(list)
arr = Split(list,",")
Set dict = CreateObject("Scripting.Dictionary")
For i = 0 To UBound(arr)
If dict.Exists(arr(i)) = False Then
dict.Add arr(i),""
End If
Next
For Each key In dict.Keys
tmp = tmp & key & ","
Next
remove_duplicates = Left(tmp,Len(tmp)-1)
End Function
WScript.Echo remove_duplicates("a,a,b,b,c,d,e,d,f,f,f,g,h")