Реализации алгоритмов/Алгоритм Верхуффа: различия между версиями

Содержимое удалено Содержимое добавлено
преамбула и немного перевода
м <source> -> <syntaxhighlight> (phab:T237267)
Строка 6:
== C ==
 
<sourcesyntaxhighlight lang="c">
// Таблица умножения
static int verhoeff_d[][] = {
Строка 65:
}
 
</syntaxhighlight>
</source>
 
== C# ==
 
<sourcesyntaxhighlight lang="csharp">
 
/// <summary>
Строка 173:
 
 
</syntaxhighlight>
</source>
 
== VB.NET ==
 
<sourcesyntaxhighlight lang="vbnet">
 
''' <summary>
Строка 286:
 
 
</syntaxhighlight>
</source>
 
== VB for Applications ==
 
<sourcesyntaxhighlight lang="vb">
''' <summary>
''' For more information cf. http://en.wikipedia.org/wiki/Verhoeff_algorithm
Строка 416:
Debug.Print "End Verhoeff's Asserts"
End Sub
</syntaxhighlight>
</source>
 
== Java ==
 
<sourcesyntaxhighlight lang="java">
 
/**
Строка 537:
 
 
</syntaxhighlight>
</source>
 
== Python ==
 
<sourcesyntaxhighlight lang="python">
 
# @see <a href="http://en.wikipedia.org/wiki/Verhoeff_algorithm">More Info</a>
Строка 610:
 
 
</syntaxhighlight>
</source>
 
==[[wikipedia:D_(programming_language)|D]]==
 
<sourcesyntaxhighlight lang="D">import std.conv;
 
// tested with D version 2
Строка 676:
}
return a;
}</sourcesyntaxhighlight>
 
== PHP ==
 
<sourcesyntaxhighlight lang="php">
{{<?php
# @author Semyon Velichko
Строка 764:
assert("Verhoeff::validate('122451') === false");
assert("Verhoeff::validate('128451') === false");
</syntaxhighlight>
</source>
 
== AS3 ==
Строка 876:
== Pascal/Delphi ==
 
<sourcesyntaxhighlight lang="pascal">
 
// <summary>
Строка 979:
end;
 
</syntaxhighlight>
</source>
==plsql ==
<sourcesyntaxhighlight lang="plsql">
DECLARE
/**
Строка 1104:
END;
 
</syntaxhighlight>
</source>
 
== Common Lisp ==
<sourcesyntaxhighlight lang="lisp">
(defparameter verhoeff-d
`(
Строка 1186:
)
(error "Verhoeff checksum testing failure"))
</syntaxhighlight>
</source>
 
== JavaScript ==
 
<sourcesyntaxhighlight lang="javascript">
/*
For more info on the algorithm: http://en.wikipedia.org/wiki/Verhoeff_algorithm
Строка 1265:
return (c === 0);
}
</syntaxhighlight>
</source>
 
{{BookCat}}