Rosetta Code/Count examples: Difference between revisions
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: secondary sort on task name for initial table order) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: Use a better matcher to cut down on both the false positives and false negatives) |
||
Line 1,690: | Line 1,690: | ||
:prop<title> |
:prop<title> |
||
).map({ |
).map({ |
||
my $page = |
my $page = |
||
$client.get("{ $url }/index.php?title={ uri-escape .<title> }&action=raw").content; |
|||
$url, 'pages', |
|||
my $count = +$page.comb(/ ^^'==' <-[\n=]>* '{{header|' \w+ \N+ '==' \h* $$ /); |
|||
:titles(.<title>), |
|||
:prop<revisions>, |
|||
:rvprop<content>, |
|||
); |
|||
my $count = +$page.comb(/'=={{header|'/); |
|||
%tasks{.<title>} = {'cat' => %cat{$cat}, :$count}; |
%tasks{.<title>} = {'cat' => %cat{$cat}, :$count}; |
||
print $progress.inc; |
print $progress.inc; |
||
Line 1,772: | Line 1,768: | ||
<div style="height:80ex;overflow:scroll;"> |
<div style="height:80ex;overflow:scroll;"> |
||
{|class="wikitable sortable" |
{|class="wikitable sortable" |
||
|+ As of 2018-03-30 :: Tasks: 871 :: Draft Tasks: 209 :: Total Tasks: 1080 :: Total Examples: |
|+ As of 2018-03-30 :: Tasks: 871 :: Draft Tasks: 209 :: Total Tasks: 1080 :: Total Examples: 55684 |
||
! Count !! Task !! Category |
! Count !! Task !! Category |
||
|- |
|- |
||
| |
| 382 |
||
| [[Hello%20world%2FText|Hello world/Text]] |
| [[Hello%20world%2FText|Hello world/Text]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 270 |
||
|data-sort-value="0C99 bottles of beer"| [[99%20Bottles%20of%20Beer|99 Bottles of Beer]] |
|data-sort-value="0C99 bottles of beer"| [[99%20Bottles%20of%20Beer|99 Bottles of Beer]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 262 |
||
| [[FizzBuzz|FizzBuzz]] |
|||
| Task |
|||
|- |
|||
| 265 |
|||
|data-sort-value="0D100 doors"| [[100%20doors|100 doors]] |
|data-sort-value="0D100 doors"| [[100%20doors|100 doors]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 262 |
||
| [[FizzBuzz|FizzBuzz]] |
|||
| [[Fibonacci%20sequence|Fibonacci sequence]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 239 |
||
| [[Comments|Comments]] |
| [[Comments|Comments]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 239 |
||
| [[Fibonacci%20sequence|Fibonacci sequence]] |
|||
| [[Factorial|Factorial]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 230 |
||
| [[ |
| [[Factorial|Factorial]] |
||
| Task |
| Task |
||
|- |
|- |
||
Line 1,811: | Line 1,803: | ||
| Task |
| Task |
||
|- |
|- |
||
| |
| 214 |
||
| [[A%2BB|A+B]] |
|||
| [[Function%20definition|Function definition]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 207 |
||
| [[Function%20definition|Function definition]] |
|||
| [[Loops%2FFor|Loops/For]] |
|||
| Task |
|||
|- |
|||
| 195 |
|||
| [[Loops%2FInfinite|Loops/Infinite]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 1,827: | Line 1,815: | ||
| Task |
| Task |
||
|- |
|- |
||
| |
| 192 |
||
| [[Loops% |
| [[Loops%2FInfinite|Loops/Infinite]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 188 |
||
| [[ |
| [[Loops%2FWhile|Loops/While]] |
||
| Task |
| Task |
||
|- |
|- |
||
Line 1,839: | Line 1,827: | ||
| Task |
| Task |
||
|- |
|- |
||
| |
| 184 |
||
| [[Arrays|Arrays]] |
|||
| [[Arithmetic%2FInteger|Arithmetic/Integer]] |
|||
| Task |
|||
|- |
|||
| 177 |
|||
| [[Loops%2FFor|Loops/For]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 176 |
||
| [[Greatest%20common%20divisor|Greatest common divisor]] |
| [[Greatest%20common%20divisor|Greatest common divisor]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 171 |
||
| [[Arithmetic%2FInteger|Arithmetic/Integer]] |
|||
| [[Conditional%20structures|Conditional structures]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 171 |
| 171 |
||
| [[Conditional%20structures|Conditional structures]] |
|||
| Task |
|||
|- |
|||
| 170 |
|||
| [[Greatest%20element%20of%20a%20list|Greatest element of a list]] |
| [[Greatest%20element%20of%20a%20list|Greatest element of a list]] |
||
| Task |
| Task |
||
Line 1,859: | Line 1,855: | ||
| Task |
| Task |
||
|- |
|- |
||
| |
| 162 |
||
| [[Integer%20comparison|Integer comparison]] |
| [[Integer%20comparison|Integer comparison]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 158 |
||
| [[Increment%20a%20numerical%20string|Increment a numerical string]] |
| [[Increment%20a%20numerical%20string|Increment a numerical string]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 158 |
||
| [[Repeat%20a%20string|Repeat a string]] |
|||
| [[Loops%2FFor%20with%20a%20specified%20step|Loops/For with a specified step]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 157 |
||
| [[Array%20concatenation|Array concatenation]] |
|||
| Task |
|||
|- |
|||
| 159 |
|||
| [[Loops%2FDownward%20for|Loops/Downward for]] |
| [[Loops%2FDownward%20for|Loops/Downward for]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 156 |
||
| [[Array%20concatenation|Array concatenation]] |
|||
| [[Repeat%20a%20string|Repeat a string]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 156 |
| 156 |
||
| [[ |
| [[Boolean%20values|Boolean values]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 152 |
||
| [[Loops%2FFor%20with%20a%20specified%20step|Loops/For with a specified step]] |
|||
| [[Boolean%20values|Boolean values]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 151 |
||
| [[Copy%20a%20string|Copy a string]] |
| [[Copy%20a%20string|Copy a string]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 148 |
||
| [[Hello%20world%2FGraphical|Hello world/Graphical]] |
| [[Hello%20world%2FGraphical|Hello world/Graphical]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 148 |
||
| [[Sum%20and%20product%20of%20an%20array|Sum and product of an array]] |
| [[Sum%20and%20product%20of%20an%20array|Sum and product of an array]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 147 |
||
| [[Even%20or%20odd|Even or odd]] |
| [[Even%20or%20odd|Even or odd]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 146 |
||
| [[String%20case|String case]] |
|||
| Task |
|||
|- |
|||
| 148 |
|||
| [[String%20length|String length]] |
| [[String%20length|String length]] |
||
| Task |
|||
|- |
|||
| 146 |
|||
| [[Character%20codes|Character codes]] |
|||
| Task |
|||
|- |
|||
| 146 |
|||
| [[Hailstone%20sequence|Hailstone sequence]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 1,928: | Line 1,908: | ||
|- |
|- |
||
| 144 |
| 144 |
||
| [[Loops% |
| [[Loops%2FForeach|Loops/Foreach]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 143 |
||
| [[Character%20codes|Character codes]] |
|||
| [[Hello%20world%2FNewline%20omission|Hello world/Newline omission]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 143 |
||
| [[Loops%2FDo-while|Loops/Do-while]] |
|||
| [[String%20concatenation|String concatenation]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 141 |
||
| [[String%20case|String case]] |
|||
| [[Loops%2FN%20plus%20one%20half|Loops/N plus one half]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 138 |
| 138 |
||
| [[Hello%20world%2FNewline%20omission|Hello world/Newline omission]] |
|||
| [[Binary%20digits|Binary digits]] |
|||
| Task |
|||
|- |
|||
| 138 |
|||
| [[Sum%20of%20a%20series|Sum of a series]] |
|||
| Task |
|||
|- |
|||
| 138 |
|||
| [[Tokenize%20a%20string|Tokenize a string]] |
|||
| Task |
|||
|- |
|||
| 137 |
|||
| [[Filter|Filter]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 1,964: | Line 1,932: | ||
|- |
|- |
||
| 137 |
| 137 |
||
| [[Loops% |
| [[Loops%2FN%20plus%20one%20half|Loops/N plus one half]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 137 |
| 137 |
||
| [[String%20concatenation|String concatenation]] |
|||
| [[Palindrome%20detection|Palindrome detection]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 136 |
||
| [[Hailstone%20sequence|Hailstone sequence]] |
|||
| [[Sum%20of%20squares|Sum of squares]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 1,980: | Line 1,948: | ||
|- |
|- |
||
| 136 |
| 136 |
||
| [[Sum%20of%20a%20series|Sum of a series]] |
|||
| [[Logical%20operations|Logical operations]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 136 |
| 136 |
||
| [[Sum%20of%20squares|Sum of squares]] |
|||
|data-sort-value="rot-0C13"| [[Rot-13|Rot-13]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 135 |
| 135 |
||
| [[Binary%20digits|Binary digits]] |
|||
| [[Execute%20a%20system%20command|Execute a system command]] |
|||
| Task |
|||
|- |
|||
| 135 |
|||
| [[Filter|Filter]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 134 |
| 134 |
||
| [[Loops%2FBreak|Loops/Break]] |
|||
| [[Sieve%20of%20Eratosthenes|Sieve of Eratosthenes]] |
|||
| Task |
|||
|- |
|||
| 134 |
|||
| [[Palindrome%20detection|Palindrome detection]] |
|||
| Task |
|||
|- |
|||
| 134 |
|||
|data-sort-value="rot-0C13"| [[Rot-13|Rot-13]] |
|||
| Task |
|||
|- |
|||
| 133 |
|||
| [[Execute%20a%20system%20command|Execute a system command]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 133 |
| 133 |
||
| [[Towers%20of%20Hanoi|Towers of Hanoi]] |
| [[Towers%20of%20Hanoi|Towers of Hanoi]] |
||
| Task |
|||
|- |
|||
| 131 |
|||
| [[Logical%20operations|Logical operations]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,007: | Line 1,995: | ||
| Task |
| Task |
||
|- |
|- |
||
| |
| 128 |
||
| [[Sieve%20of%20Eratosthenes|Sieve of Eratosthenes]] |
|||
| [[File%20input%2Foutput|File input/output]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 127 |
||
| [[Associative%20array%2FCreation|Associative array/Creation]] |
|||
| [[Leap%20year|Leap year]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 127 |
| 127 |
||
| [[File%20input%2Foutput|File input/output]] |
|||
| [[Associative%20array%2FCreation|Associative array/Creation]] |
|||
| Task |
|||
|- |
|||
| 127 |
|||
| [[Tokenize%20a%20string|Tokenize a string]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,024: | Line 2,016: | ||
|- |
|- |
||
| 126 |
| 126 |
||
| [[Leap%20year|Leap year]] |
|||
| [[Remove%20duplicate%20elements|Remove duplicate elements]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 126 |
| 126 |
||
| [[Remove%20duplicate%20elements|Remove duplicate elements]] |
|||
| [[Sorting%20algorithms%2FBubble%20sort|Sorting algorithms/Bubble sort]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,036: | Line 2,028: | ||
|- |
|- |
||
| 124 |
| 124 |
||
| [[Sorting%20algorithms%2FBubble%20sort|Sorting algorithms/Bubble sort]] |
|||
| [[Array%20length|Array length]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 123 |
| 123 |
||
| [[ |
| [[Array%20length|Array length]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 122 |
||
| [[Hello%20world%2FStandard%20error|Hello world/Standard error]] |
|||
| Task |
|||
|- |
|||
| 123 |
|||
| [[Quine|Quine]] |
| [[Quine|Quine]] |
||
| Task |
|||
|- |
|||
| 123 |
|||
| [[User%20input%2FText|User input/Text]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 122 |
| 122 |
||
| [[Roman%20numerals%2FEncode|Roman numerals/Encode]] |
|||
| [[Guess%20the%20number|Guess the number]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 121 |
||
| [[Empty%20string|Empty string]] |
|||
| [[Read%20entire%20file|Read entire file]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 121 |
| 121 |
||
| [[Read%20entire%20file|Read entire file]] |
|||
| [[Command-line%20arguments|Command-line arguments]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 121 |
| 121 |
||
| [[ |
| [[User%20input%2FText|User input/Text]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 120 |
| 120 |
||
| [[Command-line%20arguments|Command-line arguments]] |
|||
| [[Create%20a%20file|Create a file]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 120 |
| 120 |
||
| [[Hello%20world%2FStandard%20error|Hello world/Standard error]] |
|||
| [[Loops%2FContinue|Loops/Continue]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 119 |
| 119 |
||
| [[Create%20a%20file|Create a file]] |
|||
| [[Primality%20by%20trial%20division|Primality by trial division]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 118 |
| 118 |
||
| [[Guess%20the%20number|Guess the number]] |
|||
| [[Bitwise%20operations|Bitwise operations]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 118 |
| 118 |
||
| [[Primality%20by%20trial%20division|Primality by trial division]] |
|||
| [[Ethiopian%20multiplication|Ethiopian multiplication]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 117 |
||
| [[Bitwise%20operations|Bitwise operations]] |
|||
| [[Loop%20over%20multiple%20arrays%20simultaneously|Loop over multiple arrays simultaneously]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 117 |
| 117 |
||
| [[ |
| [[Loop%20over%20multiple%20arrays%20simultaneously|Loop over multiple arrays simultaneously]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 117 |
| 117 |
||
| [[Sorting%20algorithms%2FQuicksort|Sorting algorithms/Quicksort]] |
|||
| [[Sleep|Sleep]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 116 |
| 116 |
||
| [[Sleep|Sleep]] |
|||
| [[Day%20of%20the%20week|Day of the week]] |
|||
| Task |
|||
|- |
|||
| 116 |
|||
| [[Factors%20of%20an%20integer|Factors of an integer]] |
|||
| Task |
|||
|- |
|||
| 116 |
|||
| [[Sorting%20algorithms%2FQuicksort|Sorting algorithms/Quicksort]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,120: | Line 2,096: | ||
|- |
|- |
||
| 115 |
| 115 |
||
| [[ |
| [[Factors%20of%20an%20integer|Factors of an integer]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 114 |
||
| [[Check%20that%20file%20exists|Check that file exists]] |
|||
| [[Happy%20numbers|Happy numbers]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 114 |
||
| [[ |
| [[Day%20of%20the%20week|Day of the week]] |
||
| Task |
|||
|- |
|||
| 115 |
|||
| [[Substring|Substring]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 114 |
| 114 |
||
| [[ |
| [[Happy%20numbers|Happy numbers]] |
||
| Task |
| Task |
||
|- |
|- |
||
Line 2,144: | Line 2,116: | ||
|- |
|- |
||
| 113 |
| 113 |
||
| [[Caesar%20cipher|Caesar cipher]] |
|||
| [[Literals%2FInteger|Literals/Integer]] |
|||
| Task |
|||
|- |
|||
| 113 |
|||
| [[Least%20common%20multiple|Least common multiple]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 113 |
| 113 |
||
| [[Mutual%20recursion|Mutual recursion]] |
| [[Mutual%20recursion|Mutual recursion]] |
||
| Task |
|||
|- |
|||
| 113 |
|||
| [[Substring|Substring]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 112 |
| 112 |
||
| [[Literals%2FInteger|Literals/Integer]] |
|||
| [[Detect%20division%20by%20zero|Detect division by zero]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,159: | Line 2,139: | ||
| Task |
| Task |
||
|- |
|- |
||
| |
| 112 |
||
| [[Stack|Stack]] |
|||
| [[Averages%2FRoot%20mean%20square|Averages/Root mean square]] |
|||
| Task |
|||
|- |
|||
| 111 |
|||
| [[Balanced%20brackets|Balanced brackets]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,176: | Line 2,152: | ||
|- |
|- |
||
| 110 |
| 110 |
||
| [[Include%20a%20file|Include a file]] |
|||
| [[Program%20termination|Program termination]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 110 |
| 110 |
||
| [[Loops%2FContinue|Loops/Continue]] |
|||
| [[Stack|Stack]] |
|||
| Task |
|||
|- |
|||
| 109 |
|||
| [[Averages%2FRoot%20mean%20square|Averages/Root mean square]] |
|||
| Task |
|||
|- |
|||
| 109 |
|||
| [[Balanced%20brackets|Balanced brackets]] |
|||
| Task |
|||
|- |
|||
| 109 |
|||
| [[Ethiopian%20multiplication|Ethiopian multiplication]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,196: | Line 2,184: | ||
|- |
|- |
||
| 108 |
| 108 |
||
| [[ |
| [[Date%20format|Date format]] |
||
| Task |
| Task |
||
|- |
|- |
||
Line 2,204: | Line 2,192: | ||
|- |
|- |
||
| 107 |
| 107 |
||
| [[Program%20termination|Program termination]] |
|||
| [[Date%20format|Date format]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 106 |
||
| [[Read%20a%20file%20line%20by%20line|Read a file line by line]] |
| [[Read%20a%20file%20line%20by%20line|Read a file line by line]] |
||
| Task |
|||
|- |
|||
| 106 |
|||
| [[Delete%20a%20file|Delete a file]] |
|||
| Task |
|||
|- |
|||
| 106 |
|||
| [[Generate%20lower%20case%20ASCII%20alphabet|Generate lower case ASCII alphabet]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 106 |
| 106 |
||
| [[Real%20constants%20and%20functions|Real constants and functions]] |
| [[Real%20constants%20and%20functions|Real constants and functions]] |
||
| Task |
|||
|- |
|||
| 106 |
|||
| [[Rename%20a%20file|Rename a file]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,232: | Line 2,208: | ||
|- |
|- |
||
| 105 |
| 105 |
||
| [[Anagrams|Anagrams]] |
|||
| [[Mandelbrot%20set|Mandelbrot set]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 105 |
||
| [[Detect%20division%20by%20zero|Detect division by zero]] |
|||
| [[ABC%20Problem|ABC Problem]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 105 |
||
| [[Variables|Variables]] |
|||
| [[Count%20in%20octal|Count in octal]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 104 |
| 104 |
||
| [[Classes|Classes]] |
|||
| [[Function%20composition|Function composition]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 104 |
| 104 |
||
| [[ |
| [[Delete%20a%20file|Delete a file]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 104 |
| 104 |
||
| [[ |
| [[Rename%20a%20file|Rename a file]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 103 |
||
| [[Averages%2FMedian|Averages/Median]] |
|||
| [[Return%20multiple%20values|Return multiple values]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,265: | Line 2,241: | ||
| 103 |
| 103 |
||
| [[Case-sensitivity%20of%20identifiers|Case-sensitivity of identifiers]] |
| [[Case-sensitivity%20of%20identifiers|Case-sensitivity of identifiers]] |
||
| Task |
|||
|- |
|||
| 103 |
|||
| [[Classes|Classes]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,276: | Line 2,248: | ||
|- |
|- |
||
| 103 |
| 103 |
||
| [[Function%20composition|Function composition]] |
|||
| [[Loops%2FNested|Loops/Nested]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 103 |
| 103 |
||
| [[Return%20multiple%20values|Return multiple values]] |
|||
| [[Sorting%20algorithms%2FInsertion%20sort|Sorting algorithms/Insertion sort]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 102 |
| 102 |
||
| [[ABC%20Problem|ABC Problem]] |
|||
| [[Averages%2FMedian|Averages/Median]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 102 |
| 102 |
||
| [[Count% |
| [[Count%20in%20octal|Count in octal]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 102 |
| 102 |
||
| [[Hostname|Hostname]] |
| [[Hostname|Hostname]] |
||
| Task |
|||
|- |
|||
| 102 |
|||
| [[Input%20loop|Input loop]] |
|||
| Task |
|||
|- |
|||
| 102 |
|||
| [[Loops%2FNested|Loops/Nested]] |
|||
| Task |
|||
|- |
|||
| 102 |
|||
| [[Null%20object|Null object]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,307: | Line 2,291: | ||
| Task |
| Task |
||
|- |
|- |
||
| |
| 101 |
||
| [[Sorting%20algorithms%2FInsertion%20sort|Sorting algorithms/Insertion sort]] |
|||
| [[HTTP|HTTP]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 100 |
| 100 |
||
| [[Count%20occurrences%20of%20a%20substring|Count occurrences of a substring]] |
|||
| [[Multiplication%20tables|Multiplication tables]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 100 |
| 100 |
||
| [[Multiplication%20tables|Multiplication tables]] |
|||
| [[Pick%20random%20element|Pick random element]] |
|||
| Task |
|||
|- |
|||
| 99 |
|||
| [[Anagrams|Anagrams]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,328: | Line 2,308: | ||
|- |
|- |
||
| 99 |
| 99 |
||
| [[Generate%20lower%20case%20ASCII%20alphabet|Generate lower case ASCII alphabet]] |
|||
| [[Find%20limit%20of%20recursion|Find limit of recursion]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,344: | Line 2,324: | ||
|- |
|- |
||
| 99 |
| 99 |
||
| [[Pick%20random%20element|Pick random element]] |
|||
| [[Pangram%20checker|Pangram checker]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 98 |
| 98 |
||
| [[HTTP|HTTP]] |
|||
| [[Conway%27s%20Game%20of%20Life|Conway's Game of Life]] |
|||
| Task |
|||
|- |
|||
| 98 |
|||
| [[Guess%20the%20number%2FWith%20feedback|Guess the number/With feedback]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,360: | Line 2,336: | ||
|- |
|- |
||
| 97 |
| 97 |
||
| [[Create%20a%20two-dimensional%20array%20at%20runtime|Create a two-dimensional array at runtime]] |
|||
| [[Accumulator%20factory|Accumulator factory]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 97 |
| 97 |
||
| [[Guess%20the%20number%2FWith%20feedback|Guess the number/With feedback]] |
|||
| [[Align%20columns|Align columns]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 97 |
| 97 |
||
| [[Pangram%20checker|Pangram checker]] |
|||
| [[Create%20a%20two-dimensional%20array%20at%20runtime|Create a two-dimensional array at runtime]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 96 |
||
| [[Accumulator%20factory|Accumulator factory]] |
|||
| [[Perfect%20numbers|Perfect numbers]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,388: | Line 2,364: | ||
|- |
|- |
||
| 96 |
| 96 |
||
| [[Mandelbrot%20set|Mandelbrot set]] |
|||
| [[Roman%20numerals%2FDecode|Roman numerals/Decode]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 96 |
| 96 |
||
| [[Perfect%20numbers|Perfect numbers]] |
|||
| [[Strip%20a%20set%20of%20characters%20from%20a%20string|Strip a set of characters from a string]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 96 |
| 96 |
||
| [[Roman%20numerals%2FDecode|Roman numerals/Decode]] |
|||
| [[Temperature%20conversion|Temperature conversion]] |
|||
| Task |
|||
|- |
|||
| 95 |
|||
| [[Align%20columns|Align columns]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,408: | Line 2,388: | ||
|- |
|- |
||
| 95 |
| 95 |
||
| [[Find%20limit%20of%20recursion|Find limit of recursion]] |
|||
| [[String%20matching|String matching]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 95 |
||
| [[String%20matching|String matching]] |
|||
| [[Middle%20three%20digits|Middle three digits]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 95 |
||
| [[Strip%20a%20set%20of%20characters%20from%20a%20string|Strip a set of characters from a string]] |
|||
| [[Substring%2FTop%20and%20tail|Substring/Top and tail]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 94 |
| 94 |
||
| [[Temperature%20conversion|Temperature conversion]] |
|||
| [[Variadic%20function|Variadic function]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,432: | Line 2,412: | ||
|- |
|- |
||
| 93 |
| 93 |
||
| [[Substring%2FTop%20and%20tail|Substring/Top and tail]] |
|||
| [[Zero%20to%20the%20zero%20power|Zero to the zero power]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 93 |
||
| [[Variadic%20function|Variadic function]] |
|||
| [[Arithmetic-geometric%20mean|Arithmetic-geometric mean]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 93 |
||
| [[Zero%20to%20the%20zero%20power|Zero to the zero power]] |
|||
| [[Program%20name|Program name]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 92 |
| 92 |
||
| [[Exceptions|Exceptions]] |
|||
| [[Shell%20one-liner|Shell one-liner]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 92 |
| 92 |
||
| [[Zig-zag%20matrix|Zig-zag matrix]] |
|||
| [[Strip%20whitespace%20from%20a%20string%2FTop%20and%20tail|Strip whitespace from a string/Top and tail]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 91 |
||
| [[Arithmetic-geometric%20mean|Arithmetic-geometric mean]] |
|||
| [[Zig-zag%20matrix|Zig-zag matrix]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 91 |
| 91 |
||
| [[ |
| [[Program%20name|Program name]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 91 |
| 91 |
||
| [[Strip%20whitespace%20from%20a%20string%2FTop%20and%20tail|Strip whitespace from a string/Top and tail]] |
|||
| [[Trigonometric%20functions|Trigonometric functions]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,480: | Line 2,460: | ||
|- |
|- |
||
| 90 |
| 90 |
||
| [[Shell%20one-liner|Shell one-liner]] |
|||
| [[String%20interpolation%20%28included%29|String interpolation (included)]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 89 |
| 89 |
||
| [[Combinations|Combinations]] |
| [[Combinations|Combinations]] |
||
| Task |
|||
|- |
|||
| 89 |
|||
| [[Conway%27s%20Game%20of%20Life|Conway's Game of Life]] |
|||
| Task |
|||
|- |
|||
| 89 |
|||
| [[String%20interpolation%20%28included%29|String interpolation (included)]] |
|||
| Task |
|||
|- |
|||
| 89 |
|||
| [[Trigonometric%20functions|Trigonometric functions]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,492: | Line 2,484: | ||
|- |
|- |
||
| 88 |
| 88 |
||
| [[Middle%20three%20digits|Middle three digits]] |
|||
| [[Enumerations|Enumerations]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,501: | Line 2,493: | ||
| 88 |
| 88 |
||
| [[Random%20number%20generator%20%28included%29|Random number generator (included)]] |
| [[Random%20number%20generator%20%28included%29|Random number generator (included)]] |
||
| Task |
|||
|- |
|||
| 88 |
|||
| [[Short-circuit%20evaluation|Short-circuit evaluation]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,524: | Line 2,512: | ||
|- |
|- |
||
| 87 |
| 87 |
||
| [[Enumerations|Enumerations]] |
|||
| [[One-dimensional%20cellular%20automata|One-dimensional cellular automata]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 87 |
| 87 |
||
| [[Ordered%20words|Ordered words]] |
| [[Ordered%20words|Ordered words]] |
||
| Task |
|||
|- |
|||
| 87 |
|||
| [[Short-circuit%20evaluation|Short-circuit evaluation]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,536: | Line 2,528: | ||
|- |
|- |
||
| 86 |
| 86 |
||
| [[One-dimensional%20cellular%20automata|One-dimensional cellular automata]] |
|||
| [[Interactive%20programming|Interactive programming]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,545: | Line 2,537: | ||
| 85 |
| 85 |
||
| [[Exponentiation%20operator|Exponentiation operator]] |
| [[Exponentiation%20operator|Exponentiation operator]] |
||
| Task |
|||
|- |
|||
| 85 |
|||
| [[Inheritance%2FSingle|Inheritance/Single]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,552: | Line 2,548: | ||
|- |
|- |
||
| 85 |
| 85 |
||
| [[Look-and-say%20sequence|Look-and-say sequence]] |
|||
| [[Queue%2FDefinition|Queue/Definition]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,568: | Line 2,564: | ||
|- |
|- |
||
| 84 |
| 84 |
||
| [[Interactive%20programming|Interactive programming]] |
|||
| [[Look-and-say%20sequence|Look-and-say sequence]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,581: | Line 2,577: | ||
| 84 |
| 84 |
||
| [[Reverse%20words%20in%20a%20string|Reverse words in a string]] |
| [[Reverse%20words%20in%20a%20string|Reverse words in a string]] |
||
| Task |
|||
|- |
|||
| 84 |
|||
|data-sort-value="sum multiples of 0B3 and 0B5"| [[Sum%20multiples%20of%203%20and%205|Sum multiples of 3 and 5]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,588: | Line 2,588: | ||
|- |
|- |
||
| 83 |
| 83 |
||
| [[Queue%2FDefinition|Queue/Definition]] |
|||
| [[Cumulative%20standard%20deviation|Cumulative standard deviation]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,596: | Line 2,596: | ||
|- |
|- |
||
| 82 |
| 82 |
||
| [[Cumulative%20standard%20deviation|Cumulative standard deviation]] |
|||
| [[Bulls%20and%20cows|Bulls and cows]] |
|||
| Task |
|||
|- |
|||
| 82 |
|||
| [[Inheritance%2FSingle|Inheritance/Single]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,609: | Line 2,605: | ||
| 82 |
| 82 |
||
| [[Range%20expansion|Range expansion]] |
| [[Range%20expansion|Range expansion]] |
||
| Task |
|||
|- |
|||
| 81 |
|||
| [[Bulls%20and%20cows|Bulls and cows]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,621: | Line 2,621: | ||
| 81 |
| 81 |
||
| [[Sorting%20algorithms%2FGnome%20sort|Sorting algorithms/Gnome sort]] |
| [[Sorting%20algorithms%2FGnome%20sort|Sorting algorithms/Gnome sort]] |
||
| Task |
|||
|- |
|||
| 81 |
|||
| [[String%20prepend|String prepend]] |
|||
| Task |
|||
|- |
|||
| 81 |
|||
|data-sort-value="sum multiples of 0B3 and 0B5"| [[Sum%20multiples%20of%203%20and%205|Sum multiples of 3 and 5]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 81 |
| 81 |
||
| [[Symmetric%20difference|Symmetric difference]] |
| [[Symmetric%20difference|Symmetric difference]] |
||
| Task |
|||
|- |
|||
| 81 |
|||
| [[Window%20creation|Window creation]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,653: | Line 2,641: | ||
| 80 |
| 80 |
||
| [[Y%20combinator|Y combinator]] |
| [[Y%20combinator|Y combinator]] |
||
| Task |
|||
|- |
|||
| 79 |
|||
| [[Averages%2FSimple%20moving%20average|Averages/Simple moving average]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,660: | Line 2,652: | ||
|- |
|- |
||
| 79 |
| 79 |
||
| [[String% |
| [[String%20prepend|String prepend]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 79 |
| 79 |
||
| [[Window%20creation|Window creation]] |
|||
| [[Sum%20digits%20of%20an%20integer|Sum digits of an integer]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 78 |
| 78 |
||
| [[Abstract%20type|Abstract type]] |
|||
| [[Averages%2FSimple%20moving%20average|Averages/Simple moving average]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,677: | Line 2,669: | ||
| 78 |
| 78 |
||
| [[File%20modification%20time|File modification time]] |
| [[File%20modification%20time|File modification time]] |
||
| Task |
|||
|- |
|||
| 78 |
|||
| [[Monty%20Hall%20problem|Monty Hall problem]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,688: | Line 2,676: | ||
|- |
|- |
||
| 77 |
| 77 |
||
| [[ |
| [[Averages%2FMode|Averages/Mode]] |
||
| Task |
| Task |
||
|- |
|- |
||
Line 2,700: | Line 2,688: | ||
|- |
|- |
||
| 77 |
| 77 |
||
| [[Monty%20Hall%20problem|Monty Hall problem]] |
|||
| [[Sierpinski%20carpet|Sierpinski carpet]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 77 |
| 77 |
||
| [[Sierpinski%20carpet|Sierpinski carpet]] |
|||
| [[Vector%20products|Vector products]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 77 |
||
| [[ |
| [[String%20append|String append]] |
||
| Task |
| Task |
||
|- |
|- |
||
| |
| 77 |
||
| [[Vector%20products|Vector products]] |
|||
| [[Entropy|Entropy]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,724: | Line 2,712: | ||
|- |
|- |
||
| 76 |
| 76 |
||
| [[Sum%20digits%20of%20an%20integer|Sum digits of an integer]] |
|||
| [[Menu|Menu]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 75 |
||
| [[Babbage%20problem|Babbage problem]] |
|||
| [[Sorting%20algorithms%2FCocktail%20sort|Sorting algorithms/Cocktail sort]] |
|||
| Task |
|||
|- |
|||
| 76 |
|||
| [[Spiral%20matrix|Spiral matrix]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 75 |
| 75 |
||
| [[Entropy|Entropy]] |
|||
| [[Averages%2FMode|Averages/Mode]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 75 |
| 75 |
||
| [[Menu|Menu]] |
|||
| [[Hello%20world%2FLine%20printer|Hello world/Line printer]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 75 |
| 75 |
||
| [[Simple%20windowed%20application|Simple windowed application]] |
|||
| [[Map%20range|Map range]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,752: | Line 2,736: | ||
|- |
|- |
||
| 75 |
| 75 |
||
| [[Sorting%20algorithms%2FCocktail%20sort|Sorting algorithms/Cocktail sort]] |
|||
| [[Walk%20a%20directory%2FRecursively|Walk a directory/Recursively]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 74 |
| 74 |
||
| [[Harshad%20or%20Niven%20series|Harshad or Niven series]] |
|||
| [[Execute%20Brain%2A%2A%2A%2A|Execute Brain****]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 74 |
| 74 |
||
| [[Hello%20world%2FLine%20printer|Hello world/Line printer]] |
|||
| [[Harshad%20or%20Niven%20series|Harshad or Niven series]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,773: | Line 2,757: | ||
| 74 |
| 74 |
||
| [[Show%20the%20epoch|Show the epoch]] |
| [[Show%20the%20epoch|Show the epoch]] |
||
| Task |
|||
|- |
|||
| 74 |
|||
| [[Simple%20windowed%20application|Simple windowed application]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 74 |
| 74 |
||
| [[The%20Twelve%20Days%20of%20Christmas|The Twelve Days of Christmas]] |
| [[The%20Twelve%20Days%20of%20Christmas|The Twelve Days of Christmas]] |
||
| Task |
|||
|- |
|||
| 74 |
|||
| [[Web%20scraping|Web scraping]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,797: | Line 2,773: | ||
| 73 |
| 73 |
||
| [[Gray%20code|Gray code]] |
| [[Gray%20code|Gray code]] |
||
| Task |
|||
|- |
|||
| 73 |
|||
| [[Map%20range|Map range]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,805: | Line 2,785: | ||
| 73 |
| 73 |
||
| [[Set|Set]] |
| [[Set|Set]] |
||
| Task |
|||
|- |
|||
| 73 |
|||
| [[Spiral%20matrix|Spiral matrix]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 73 |
| 73 |
||
| [[Tree%20traversal|Tree traversal]] |
| [[Tree%20traversal|Tree traversal]] |
||
| Task |
|||
|- |
|||
| 73 |
|||
| [[Walk%20a%20directory%2FRecursively|Walk a directory/Recursively]] |
|||
| Task |
|||
|- |
|||
| 72 |
|||
| [[Execute%20Brain%2A%2A%2A%2A|Execute Brain****]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 72 |
| 72 |
||
| [[Introspection|Introspection]] |
| [[Introspection|Introspection]] |
||
| Task |
|||
|- |
|||
| 72 |
|||
| [[Last%20Friday%20of%20each%20month|Last Friday of each month]] |
|||
| Task |
|||
|- |
|||
| 72 |
|||
| [[Literals%2FFloating%20point|Literals/Floating point]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,831: | Line 2,831: | ||
| Task |
| Task |
||
|- |
|- |
||
| |
| 72 |
||
| [[Web%20scraping|Web scraping]] |
|||
| [[CSV%20to%20HTML%20translation|CSV to HTML translation]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 71 |
| 71 |
||
| [[CSV%20to%20HTML%20translation|CSV to HTML translation]] |
|||
| [[Last%20Friday%20of%20each%20month|Last Friday of each month]] |
|||
| Task |
|||
|- |
|||
| 71 |
|||
| [[Literals%2FFloating%20point|Literals/Floating point]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,856: | Line 2,852: | ||
|- |
|- |
||
| 71 |
| 71 |
||
| [[URL%20decoding|URL decoding]] |
|||
| [[Terminal%20control%2FRinging%20the%20terminal%20bell|Terminal control/Ringing the terminal bell]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,872: | Line 2,868: | ||
|- |
|- |
||
| 70 |
| 70 |
||
| [[Number%20names|Number names]] |
|||
| [[Keyboard%20input%2FObtain%20a%20Y%20or%20N%20response|Keyboard input/Obtain a Y or N response]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 70 |
| 70 |
||
| [[Sorting%20algorithms%2FHeapsort|Sorting algorithms/Heapsort]] |
| [[Sorting%20algorithms%2FHeapsort|Sorting algorithms/Heapsort]] |
||
| Task |
|||
|- |
|||
| 70 |
|||
| [[URL%20decoding|URL decoding]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,895: | Line 2,887: | ||
| Task |
| Task |
||
|- |
|- |
||
| |
| 68 |
||
| [[Address%20of%20a%20variable|Address of a variable]] |
|||
| [[Sockets|Sockets]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 68 |
| 68 |
||
| [[Concurrent%20computing|Concurrent computing]] |
|||
| [[Abundant%2C%20deficient%20and%20perfect%20number%20classifications|Abundant, deficient and perfect number classifications]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,924: | Line 2,916: | ||
|- |
|- |
||
| 68 |
| 68 |
||
| [[Take%20notes%20on%20the%20command%20line|Take notes on the command line]] |
|||
| [[String%20comparison|String comparison]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 68 |
| 68 |
||
| [[ |
| [[Terminal%20control%2FRinging%20the%20terminal%20bell|Terminal control/Ringing the terminal bell]] |
||
| Task |
| Task |
||
|- |
|- |
||
Line 2,940: | Line 2,932: | ||
|- |
|- |
||
| 67 |
| 67 |
||
| [[Abundant%2C%20deficient%20and%20perfect%20number%20classifications|Abundant, deficient and perfect number classifications]] |
|||
| [[Address%20of%20a%20variable|Address of a variable]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 67 |
| 67 |
||
| [[Catamorphism|Catamorphism]] |
| [[Catamorphism|Catamorphism]] |
||
| Task |
|||
|- |
|||
| 67 |
|||
| [[Concurrent%20computing|Concurrent computing]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,960: | Line 2,948: | ||
|- |
|- |
||
| 67 |
| 67 |
||
| [[ |
| [[Roots%20of%20unity|Roots of unity]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 67 |
| 67 |
||
| [[ |
| [[Sockets|Sockets]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 67 |
| 67 |
||
| [[Sorting%20algorithms%2FShell%20sort|Sorting algorithms/Shell sort]] |
|||
| [[Roots%20of%20unity|Roots of unity]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 67 |
| 67 |
||
| [[String%20comparison|String comparison]] |
|||
| [[Sorting%20algorithms%2FShell%20sort|Sorting algorithms/Shell sort]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 67 |
| 67 |
||
| [[Strip%20comments%20from%20a%20string|Strip comments from a string]] |
| [[Strip%20comments%20from%20a%20string|Strip comments from a string]] |
||
| Task |
|||
|- |
|||
| 67 |
|||
| [[Terminal%20control%2FClear%20the%20screen|Terminal control/Clear the screen]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,989: | Line 2,973: | ||
| 66 |
| 66 |
||
| [[Dynamic%20variable%20names|Dynamic variable names]] |
| [[Dynamic%20variable%20names|Dynamic variable names]] |
||
| Task |
|||
|- |
|||
| 66 |
|||
| [[Kaprekar%20numbers|Kaprekar numbers]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 2,997: | Line 2,985: | ||
| 66 |
| 66 |
||
| [[Playing%20cards|Playing cards]] |
| [[Playing%20cards|Playing cards]] |
||
| Task |
|||
|- |
|||
| 66 |
|||
| [[Polymorphism|Polymorphism]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,021: | Line 3,013: | ||
| 65 |
| 65 |
||
| [[Bitmap%2FBresenham%27s%20line%20algorithm|Bitmap/Bresenham's line algorithm]] |
| [[Bitmap%2FBresenham%27s%20line%20algorithm|Bitmap/Bresenham's line algorithm]] |
||
| Task |
|||
|- |
|||
| 65 |
|||
| [[Empty%20directory|Empty directory]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,037: | Line 3,033: | ||
| 65 |
| 65 |
||
| [[Order%20two%20numerical%20lists|Order two numerical lists]] |
| [[Order%20two%20numerical%20lists|Order two numerical lists]] |
||
| Task |
|||
|- |
|||
| 65 |
|||
| [[Polymorphism|Polymorphism]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 64 |
| 64 |
||
| [[Find%20the%20last%20Sunday%20of%20each%20month|Find the last Sunday of each month]] |
|||
| [[Empty%20directory|Empty directory]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 64 |
| 64 |
||
| [[Flow-control%20structures|Flow-control structures]] |
|||
| [[Find%20the%20last%20Sunday%20of%20each%20month|Find the last Sunday of each month]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 64 |
| 64 |
||
| [[N%27th|N'th]] |
|||
| [[Flow-control%20structures|Flow-control structures]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,072: | Line 3,064: | ||
|- |
|- |
||
| 63 |
| 63 |
||
| [[Exceptions%2FCatch%20an%20exception%20thrown%20in%20a%20nested%20call|Exceptions/Catch an exception thrown in a nested call]] |
|||
| [[Forest%20fire|Forest fire]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,080: | Line 3,072: | ||
|- |
|- |
||
| 63 |
| 63 |
||
| [[Keyboard%20input%2FObtain%20a%20Y%20or%20N%20response|Keyboard input/Obtain a Y or N response]] |
|||
| [[Here%20document|Here document]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,089: | Line 3,081: | ||
| 63 |
| 63 |
||
| [[Multiple%20distinct%20objects|Multiple distinct objects]] |
| [[Multiple%20distinct%20objects|Multiple distinct objects]] |
||
| Task |
|||
|- |
|||
| 63 |
|||
| [[N%27th|N'th]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,100: | Line 3,088: | ||
|- |
|- |
||
| 63 |
| 63 |
||
| [[Semordnilap|Semordnilap]] |
|||
| [[Read%20a%20configuration%20file|Read a configuration file]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 63 |
| 63 |
||
| [[Sorting%20algorithms%2FComb%20sort|Sorting algorithms/Comb sort]] |
|||
| [[Semordnilap|Semordnilap]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 63 |
| 63 |
||
| [[Terminal%20control%2FClear%20the%20screen|Terminal control/Clear the screen]] |
|||
| [[Sorting%20algorithms%2FComb%20sort|Sorting algorithms/Comb sort]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,116: | Line 3,104: | ||
|- |
|- |
||
| 62 |
| 62 |
||
| [[Call%20an%20object%20method|Call an object method]] |
|||
| [[Compare%20a%20list%20of%20strings|Compare a list of strings]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 62 |
| 62 |
||
| [[Compare%20a%20list%20of%20strings|Compare a list of strings]] |
|||
| [[Constrained%20random%20points%20on%20a%20circle|Constrained random points on a circle]] |
|||
| Task |
|||
|- |
|||
| 62 |
|||
| [[Convert%20seconds%20to%20compound%20duration|Convert seconds to compound duration]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,132: | Line 3,116: | ||
|- |
|- |
||
| 62 |
| 62 |
||
| [[Fibonacci%20n-step%20number%20sequences|Fibonacci n-step number sequences]] |
|||
| [[Enforced%20immutability|Enforced immutability]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 62 |
| 62 |
||
| [[Guess%20the%20number%2FWith%20feedback%20%28player%29|Guess the number/With feedback (player)]] |
|||
| [[Euler%20method|Euler method]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 62 |
| 62 |
||
| [[Here%20document|Here document]] |
|||
| [[Exceptions%2FCatch%20an%20exception%20thrown%20in%20a%20nested%20call|Exceptions/Catch an exception thrown in a nested call]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 62 |
| 62 |
||
| [[Hofstadter%20Q%20sequence|Hofstadter Q sequence]] |
|||
| [[Fibonacci%20n-step%20number%20sequences|Fibonacci n-step number sequences]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 62 |
| 62 |
||
| [[Jensen%27s%20Device|Jensen's Device]] |
|||
| [[Guess%20the%20number%2FWith%20feedback%20%28player%29|Guess the number/With feedback (player)]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 62 |
| 62 |
||
| [[Largest%20int%20from%20concatenated%20ints|Largest int from concatenated ints]] |
|||
| [[Hofstadter%20Q%20sequence|Hofstadter Q sequence]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 62 |
| 62 |
||
| [[Long%20multiplication|Long multiplication]] |
|||
| [[Jensen%27s%20Device|Jensen's Device]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 62 |
| 62 |
||
| [[Pythagorean%20triples|Pythagorean triples]] |
|||
| [[Largest%20int%20from%20concatenated%20ints|Largest int from concatenated ints]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 62 |
| 62 |
||
| [[Read%20a%20configuration%20file|Read a configuration file]] |
|||
| [[Pythagorean%20triples|Pythagorean triples]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,180: | Line 3,164: | ||
|- |
|- |
||
| 61 |
| 61 |
||
| [[Convert%20seconds%20to%20compound%20duration|Convert seconds to compound duration]] |
|||
| [[Call%20an%20object%20method|Call an object method]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 61 |
| 61 |
||
| [[Enforced%20immutability|Enforced immutability]] |
|||
| [[Draw%20a%20sphere|Draw a sphere]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,192: | Line 3,176: | ||
|- |
|- |
||
| 61 |
| 61 |
||
| [[Sort%20disjoint%20sublist|Sort disjoint sublist]] |
|||
| [[Long%20multiplication|Long multiplication]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 61 |
| 61 |
||
| [[Sudoku|Sudoku]] |
|||
| [[Sort%20disjoint%20sublist|Sort disjoint sublist]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 61 |
| 61 |
||
| [[Text%20processing%2FMax%20licenses%20in%20use|Text processing/Max licenses in use]] |
|||
| [[Sudoku|Sudoku]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 61 |
| 61 |
||
| [[Trabb%20Pardo%E2%80%93Knuth%20algorithm|Trabb Pardo–Knuth algorithm]] |
| [[Trabb%20Pardo%E2%80%93Knuth%20algorithm|Trabb Pardo–Knuth algorithm]] |
||
| Task |
|||
|- |
|||
| 60 |
|||
| [[Constrained%20random%20points%20on%20a%20circle|Constrained random points on a circle]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 60 |
| 60 |
||
|data-sort-value="execute hq0B9+"| [[Execute%20HQ9%2B|Execute HQ9+]] |
|data-sort-value="execute hq0B9+"| [[Execute%20HQ9%2B|Execute HQ9+]] |
||
| Task |
|||
|- |
|||
| 60 |
|||
| [[Gamma%20function|Gamma function]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,221: | Line 3,213: | ||
| 60 |
| 60 |
||
| [[Probabilistic%20choice|Probabilistic choice]] |
| [[Probabilistic%20choice|Probabilistic choice]] |
||
| Task |
|||
|- |
|||
| 60 |
|||
| [[Singly-linked%20list%2FElement%20insertion|Singly-linked list/Element insertion]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,236: | Line 3,224: | ||
|- |
|- |
||
| 59 |
| 59 |
||
| [[Call%20a%20foreign-language%20function|Call a foreign-language function]] |
|||
| [[Fork|Fork]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 59 |
| 59 |
||
| [[ |
| [[Euler%20method|Euler method]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 59 |
| 59 |
||
| [[Fork|Fork]] |
|||
| [[Gamma%20function|Gamma function]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 59 |
| 59 |
||
| [[Four%20bit%20adder|Four bit adder]] |
|||
| [[Named%20parameters|Named parameters]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 59 |
| 59 |
||
| [[Runtime%20evaluation|Runtime evaluation]] |
| [[Runtime%20evaluation|Runtime evaluation]] |
||
| Task |
|||
|- |
|||
| 59 |
|||
| [[Undefined%20values|Undefined values]] |
|||
| Task |
|||
|- |
|||
| 59 |
|||
|data-sort-value="write language name in 0B3d ascii"| [[Write%20language%20name%20in%203D%20ASCII|Write language name in 3D ASCII]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,268: | Line 3,248: | ||
|- |
|- |
||
| 58 |
| 58 |
||
| [[Named%20parameters|Named parameters]] |
|||
| [[Call%20a%20foreign-language%20function|Call a foreign-language function]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 58 |
| 58 |
||
| [[One%20of%20n%20lines%20in%20a%20file|One of n lines in a file]] |
| [[One%20of%20n%20lines%20in%20a%20file|One of n lines in a file]] |
||
| Task |
|||
|- |
|||
| 58 |
|||
| [[Quaternion%20type|Quaternion type]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,284: | Line 3,268: | ||
|- |
|- |
||
| 58 |
| 58 |
||
| [[Singly-linked%20list%2FElement%20insertion|Singly-linked list/Element insertion]] |
|||
| [[Text%20processing%2FMax%20licenses%20in%20use|Text processing/Max licenses in use]] |
|||
| Task |
|||
|- |
|||
| 58 |
|||
| [[Special%20variables|Special variables]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,305: | Line 3,293: | ||
| 57 |
| 57 |
||
| [[Fractal%20tree|Fractal tree]] |
| [[Fractal%20tree|Fractal tree]] |
||
| Task |
|||
|- |
|||
| 57 |
|||
| [[HTTPS|HTTPS]] |
|||
| Task |
|||
|- |
|||
| 57 |
|||
| [[Horizontal%20sundial%20calculations|Horizontal sundial calculations]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 57 |
| 57 |
||
| [[IBAN|IBAN]] |
| [[IBAN|IBAN]] |
||
| Task |
|||
|- |
|||
| 57 |
|||
| [[Magic%20squares%20of%20odd%20order|Magic squares of odd order]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,330: | Line 3,330: | ||
| [[Proper%20divisors|Proper divisors]] |
| [[Proper%20divisors|Proper divisors]] |
||
| Draft |
| Draft |
||
|- |
|||
| 57 |
|||
| [[Quaternion%20type|Quaternion type]] |
|||
| Task |
|||
|- |
|- |
||
| 57 |
| 57 |
||
Line 3,344: | Line 3,340: | ||
|- |
|- |
||
| 57 |
| 57 |
||
| [[Undefined%20values|Undefined values]] |
|||
| [[Runge-Kutta%20method|Runge-Kutta method]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,356: | Line 3,352: | ||
|- |
|- |
||
| 56 |
| 56 |
||
| [[ |
| [[Currying|Currying]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 56 |
| 56 |
||
|data-sort-value="hofstadter-conway $0C10,0D000 sequence"| [[Hofstadter-Conway%20%2410%2C000%20sequence|Hofstadter-Conway $10,000 sequence]] |
|data-sort-value="hofstadter-conway $0C10,0D000 sequence"| [[Hofstadter-Conway%20%2410%2C000%20sequence|Hofstadter-Conway $10,000 sequence]] |
||
| Task |
|||
|- |
|||
| 56 |
|||
| [[Horizontal%20sundial%20calculations|Horizontal sundial calculations]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,372: | Line 3,364: | ||
|- |
|- |
||
| 56 |
| 56 |
||
| [[Memory%20allocation|Memory allocation]] |
|||
| [[Magic%20squares%20of%20odd%20order|Magic squares of odd order]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 56 |
| 56 |
||
| [[Runge-Kutta%20method|Runge-Kutta method]] |
|||
| [[Memory%20allocation|Memory allocation]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,397: | Line 3,389: | ||
| 55 |
| 55 |
||
| [[AKS%20test%20for%20primes|AKS test for primes]] |
| [[AKS%20test%20for%20primes|AKS test for primes]] |
||
| Task |
|||
|- |
|||
| 55 |
|||
| [[Best%20shuffle|Best shuffle]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,408: | Line 3,404: | ||
|- |
|- |
||
| 55 |
| 55 |
||
| [[Draw%20a%20sphere|Draw a sphere]] |
|||
| [[Currying|Currying]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 55 |
| 55 |
||
| [[Fast%20Fourier%20transform|Fast Fourier transform]] |
|||
| [[Extend%20your%20language|Extend your language]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 55 |
| 55 |
||
| [[Jump%20anywhere|Jump anywhere]] |
|||
| [[Fast%20Fourier%20transform|Fast Fourier transform]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,437: | Line 3,433: | ||
| 55 |
| 55 |
||
| [[Sorting%20algorithms%2FSleep%20sort|Sorting algorithms/Sleep sort]] |
| [[Sorting%20algorithms%2FSleep%20sort|Sorting algorithms/Sleep sort]] |
||
| Task |
|||
|- |
|||
| 55 |
|||
| [[Special%20variables|Special variables]] |
|||
| Task |
|||
|- |
|||
| 55 |
|||
| [[XML%2FOutput|XML/Output]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 54 |
| 54 |
||
| [[Extend%20your%20language|Extend your language]] |
|||
|data-sort-value="0C24 game/solve"| [[24%20game%2FSolve|24 game/Solve]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 54 |
| 54 |
||
| [[Inheritance%2FMultiple|Inheritance/Multiple]] |
|||
| [[Documentation|Documentation]] |
|||
| Task |
|||
|- |
|||
| 54 |
|||
| [[Jump%20anywhere|Jump anywhere]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,475: | Line 3,459: | ||
| Task |
| Task |
||
|- |
|- |
||
| |
| 54 |
||
| [[XML%2FOutput|XML/Output]] |
|||
| [[Animate%20a%20pendulum|Animate a pendulum]] |
|||
| Task |
|||
|- |
|||
| 53 |
|||
| [[Binary%20strings|Binary strings]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,492: | Line 3,472: | ||
|- |
|- |
||
| 53 |
| 53 |
||
| [[Forest%20fire|Forest fire]] |
|||
| [[Globally%20replace%20text%20in%20several%20files|Globally replace text in several files]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 53 |
| 53 |
||
| [[Globally%20replace%20text%20in%20several%20files|Globally replace text in several files]] |
|||
| [[Huffman%20coding|Huffman coding]] |
|||
| Task |
|||
|- |
|||
| 53 |
|||
| [[Inheritance%2FMultiple|Inheritance/Multiple]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,528: | Line 3,504: | ||
|- |
|- |
||
| 52 |
| 52 |
||
|data-sort-value="0C24 game/solve"| [[24%20game%2FSolve|24 game/Solve]] |
|||
| [[Best%20shuffle|Best shuffle]] |
|||
| Task |
|||
|- |
|||
| 52 |
|||
| [[Documentation|Documentation]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,537: | Line 3,517: | ||
| 52 |
| 52 |
||
| [[Fibonacci%20word|Fibonacci word]] |
| [[Fibonacci%20word|Fibonacci word]] |
||
| Task |
|||
|- |
|||
| 52 |
|||
| [[Huffman%20coding|Huffman coding]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,544: | Line 3,528: | ||
|- |
|- |
||
| 52 |
| 52 |
||
| [[Singleton|Singleton]] |
|||
| [[Scope%20modifiers|Scope modifiers]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,557: | Line 3,541: | ||
| 52 |
| 52 |
||
| [[Write%20entire%20file|Write entire file]] |
| [[Write%20entire%20file|Write entire file]] |
||
| Task |
|||
|- |
|||
| 52 |
|||
|data-sort-value="write language name in 0B3d ascii"| [[Write%20language%20name%20in%203D%20ASCII|Write language name in 3D ASCII]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 52 |
| 52 |
||
| [[XML%2FXPath|XML/XPath]] |
| [[XML%2FXPath|XML/XPath]] |
||
| Task |
|||
|- |
|||
| 51 |
|||
| [[Animate%20a%20pendulum|Animate a pendulum]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,568: | Line 3,560: | ||
|- |
|- |
||
| 51 |
| 51 |
||
| [[Binary%20strings|Binary strings]] |
|||
| [[Dinesman%27s%20multiple-dwelling%20problem|Dinesman's multiple-dwelling problem]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,586: | Line 3,578: | ||
| [[Repeat|Repeat]] |
| [[Repeat|Repeat]] |
||
| Draft |
| Draft |
||
|- |
|||
| 51 |
|||
| [[Rosetta%20Code%2FCount%20examples|Rosetta Code/Count examples]] |
|||
| Task |
|||
|- |
|- |
||
| 51 |
| 51 |
||
Line 3,596: | Line 3,584: | ||
|- |
|- |
||
| 51 |
| 51 |
||
| [[ |
| [[Stack%20traces|Stack traces]] |
||
| Task |
| Task |
||
|- |
|- |
||
Line 3,616: | Line 3,604: | ||
|- |
|- |
||
| 50 |
| 50 |
||
| [[Miller%E2%80%93Rabin%20primality%20test|Miller–Rabin primality test]] |
|||
| [[Draw%20a%20clock|Draw a clock]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 50 |
| 50 |
||
| [[Rosetta%20Code%2FRank%20languages%20by%20popularity|Rosetta Code/Rank languages by popularity]] |
|||
| [[Miller%E2%80%93Rabin%20primality%20test|Miller–Rabin primality test]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,628: | Line 3,616: | ||
|- |
|- |
||
| 50 |
| 50 |
||
| [[Scope%20modifiers|Scope modifiers]] |
|||
| [[Semiprime|Semiprime]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 50 |
| 50 |
||
| [[Semiprime|Semiprime]] |
|||
| [[Sorting%20algorithms%2FPermutation%20sort|Sorting algorithms/Permutation sort]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 50 |
| 50 |
||
| [[Sorting%20algorithms%2FPermutation%20sort|Sorting algorithms/Permutation sort]] |
|||
| [[Stack%20traces|Stack traces]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 50 |
| 50 |
||
| [[Truncate%20a%20file|Truncate a file]] |
| [[Truncate%20a%20file|Truncate a file]] |
||
| Task |
|||
|- |
|||
| 50 |
|||
| [[Unbias%20a%20random%20generator|Unbias a random generator]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,657: | Line 3,641: | ||
| 49 |
| 49 |
||
| [[Deal%20cards%20for%20FreeCell|Deal cards for FreeCell]] |
| [[Deal%20cards%20for%20FreeCell|Deal cards for FreeCell]] |
||
| Task |
|||
|- |
|||
| 49 |
|||
| [[Dinesman%27s%20multiple-dwelling%20problem|Dinesman's multiple-dwelling problem]] |
|||
| Task |
|||
|- |
|||
| 49 |
|||
| [[Draw%20a%20clock|Draw a clock]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,684: | Line 3,676: | ||
|- |
|- |
||
| 49 |
| 49 |
||
| [[Truncatable%20primes|Truncatable primes]] |
|||
| [[Topological%20sort|Topological sort]] |
|||
| Task |
|||
|- |
|||
| 49 |
|||
| [[Unbias%20a%20random%20generator|Unbias a random generator]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,692: | Line 3,688: | ||
|- |
|- |
||
| 48 |
| 48 |
||
| [[Doubly-linked%20list%2FElement%20definition|Doubly-linked list/Element definition]] |
|||
| [[Generator%2FExponential|Generator/Exponential]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 48 |
| 48 |
||
| [[Generator%2FExponential|Generator/Exponential]] |
|||
| [[I%20before%20E%20except%20after%20C|I before E except after C]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,709: | Line 3,705: | ||
| 48 |
| 48 |
||
| [[Pointers%20and%20references|Pointers and references]] |
| [[Pointers%20and%20references|Pointers and references]] |
||
| Task |
|||
|- |
|||
| 48 |
|||
| [[Send%20email|Send email]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,724: | Line 3,724: | ||
|- |
|- |
||
| 47 |
| 47 |
||
| [[Dutch%20national%20flag%20problem|Dutch national flag problem]] |
|||
| [[Doubly-linked%20list%2FElement%20definition|Doubly-linked list/Element definition]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 47 |
| 47 |
||
| [[I%20before%20E%20except%20after%20C|I before E except after C]] |
|||
| [[Dutch%20national%20flag%20problem|Dutch national flag problem]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,752: | Line 3,752: | ||
|- |
|- |
||
| 47 |
| 47 |
||
| [[Random%20number%20generator%20%28device%29|Random number generator (device)]] |
|||
| [[Rosetta%20Code%2FRank%20languages%20by%20popularity|Rosetta Code/Rank languages by popularity]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 47 |
| 47 |
||
| [[Split%20a%20character%20string%20based%20on%20change%20of%20character|Split a character string based on change of character]] |
|||
| [[Send%20email|Send email]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 47 |
| 47 |
||
| [[Statistics%2FBasic|Statistics/Basic]] |
|||
| [[Split%20a%20character%20string%20based%20on%20change%20of%20character|Split a character string based on change of character]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 47 |
| 47 |
||
| [[Topological%20sort|Topological sort]] |
|||
| [[Statistics%2FBasic|Statistics/Basic]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 47 |
| 47 |
||
| [[Wireworld|Wireworld]] |
| [[Wireworld|Wireworld]] |
||
| Task |
|||
|- |
|||
| 46 |
|||
| [[DNS%20query|DNS query]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 46 |
| 46 |
||
| [[Grayscale%20image|Grayscale image]] |
| [[Grayscale%20image|Grayscale image]] |
||
| Task |
|||
|- |
|||
| 46 |
|||
| [[Handle%20a%20signal|Handle a signal]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,780: | Line 3,788: | ||
|- |
|- |
||
| 46 |
| 46 |
||
| [[Respond%20to%20an%20unknown%20method%20call|Respond to an unknown method call]] |
|||
|data-sort-value="text processing/0B1"| [[Text%20processing%2F1|Text processing/1]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 46 |
| 46 |
||
|data-sort-value="text processing/ |
|data-sort-value="text processing/0B1"| [[Text%20processing%2F1|Text processing/1]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 46 |
| 46 |
||
|data-sort-value="text processing/0B2"| [[Text%20processing%2F2|Text processing/2]] |
|||
| [[Truncatable%20primes|Truncatable primes]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,805: | Line 3,813: | ||
| 45 |
| 45 |
||
| [[First-class%20functions%2FUse%20numbers%20analogously|First-class functions/Use numbers analogously]] |
| [[First-class%20functions%2FUse%20numbers%20analogously|First-class functions/Use numbers analogously]] |
||
| Task |
|||
|- |
|||
| 45 |
|||
| [[Handle%20a%20signal|Handle a signal]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,820: | Line 3,824: | ||
|- |
|- |
||
| 45 |
| 45 |
||
| [[Mad%20Libs|Mad Libs]] |
|||
| [[Maximum%20triangle%20path%20sum|Maximum triangle path sum]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 45 |
| 45 |
||
| [[Maximum%20triangle%20path%20sum|Maximum triangle path sum]] |
|||
| [[Munchausen%20numbers|Munchausen numbers]] |
|||
| Task |
|||
|- |
|||
| 45 |
|||
| [[Random%20number%20generator%20%28device%29|Random number generator (device)]] |
|||
| Task |
|||
|- |
|||
| 45 |
|||
| [[Respond%20to%20an%20unknown%20method%20call|Respond to an unknown method call]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,844: | Line 3,840: | ||
|- |
|- |
||
| 45 |
| 45 |
||
| [[XML%2FDOM%20serialization|XML/DOM serialization]] |
|||
| [[Thue-Morse|Thue-Morse]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 44 |
||
|data-sort-value="0B9 billion names of god the integer"| [[9%20billion%20names%20of%20God%20the%20integer|9 billion names of God the integer]] |
|||
| [[XML%2FDOM%20serialization|XML/DOM serialization]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,869: | Line 3,865: | ||
| 44 |
| 44 |
||
| [[Matrix-exponentiation%20operator|Matrix-exponentiation operator]] |
| [[Matrix-exponentiation%20operator|Matrix-exponentiation operator]] |
||
| Task |
|||
|- |
|||
| 44 |
|||
| [[Munchausen%20numbers|Munchausen numbers]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,885: | Line 3,885: | ||
| 44 |
| 44 |
||
| [[Ternary%20logic|Ternary logic]] |
| [[Ternary%20logic|Ternary logic]] |
||
| Task |
|||
|- |
|||
| 44 |
|||
| [[Thue-Morse|Thue-Morse]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,897: | Line 3,901: | ||
| 43 |
| 43 |
||
| [[Discordian%20date|Discordian date]] |
| [[Discordian%20date|Discordian date]] |
||
| Task |
|||
|- |
|||
| 43 |
|||
| [[Keyboard%20input%2FKeypress%20check|Keyboard input/Keypress check]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,913: | Line 3,913: | ||
| 43 |
| 43 |
||
| [[Quickselect%20algorithm|Quickselect algorithm]] |
| [[Quickselect%20algorithm|Quickselect algorithm]] |
||
| Task |
|||
|- |
|||
| 43 |
|||
| [[Send%20an%20unknown%20method%20call|Send an unknown method call]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,924: | Line 3,928: | ||
|- |
|- |
||
| 42 |
| 42 |
||
| [[Dining%20philosophers|Dining philosophers]] |
|||
|data-sort-value="0B9 billion names of god the integer"| [[9%20billion%20names%20of%20God%20the%20integer|9 billion names of God the integer]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 42 |
| 42 |
||
| [[Doubly-linked%20list%2FElement%20insertion|Doubly-linked list/Element insertion]] |
|||
| [[Emirp%20primes|Emirp primes]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 42 |
| 42 |
||
| [[ |
| [[Emirp%20primes|Emirp primes]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 42 |
| 42 |
||
| [[Polymorphic%20copy|Polymorphic copy]] |
| [[Polymorphic%20copy|Polymorphic copy]] |
||
| Task |
|||
|- |
|||
| 42 |
|||
| [[Send%20an%20unknown%20method%20call|Send an unknown method call]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 41 |
| 41 |
||
| [[Color%20of%20a%20screen%20pixel|Color of a screen pixel]] |
| [[Color%20of%20a%20screen%20pixel|Color of a screen pixel]] |
||
| Task |
|||
|- |
|||
| 41 |
|||
| [[Colour%20bars%2FDisplay|Colour bars/Display]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 3,956: | Line 3,952: | ||
|- |
|- |
||
| 41 |
| 41 |
||
| [[Doubly-linked%20list%2FTraversal|Doubly-linked list/Traversal]] |
|||
| [[Dining%20philosophers|Dining philosophers]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 41 |
| 41 |
||
| [[Echo%20server|Echo server]] |
|||
| [[Doubly-linked%20list%2FElement%20insertion|Doubly-linked list/Element insertion]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 41 |
| 41 |
||
| [[Execute%20a%20Markov%20algorithm|Execute a Markov algorithm]] |
| [[Execute%20a%20Markov%20algorithm|Execute a Markov algorithm]] |
||
| Task |
|||
|- |
|||
| 41 |
|||
| [[Exponentiation%20order|Exponentiation order]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,007: | Line 3,999: | ||
| Draft |
| Draft |
||
|- |
|- |
||
| |
| 40 |
||
| [[Exponentiation%20order|Exponentiation order]] |
|||
| [[Universal%20Turing%20machine|Universal Turing machine]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 40 |
| 40 |
||
| [[GUI%20component%20interaction|GUI component interaction]] |
|||
| [[Doubly-linked%20list%2FTraversal|Doubly-linked list/Traversal]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 40 |
| 40 |
||
| [[Keyboard%20input%2FKeypress%20check|Keyboard input/Keypress check]] |
|||
| [[Echo%20server|Echo server]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,029: | Line 4,021: | ||
| 40 |
| 40 |
||
| [[Parsing%2FShunting-yard%20algorithm|Parsing/Shunting-yard algorithm]] |
| [[Parsing%2FShunting-yard%20algorithm|Parsing/Shunting-yard algorithm]] |
||
| Task |
|||
|- |
|||
| 40 |
|||
| [[Rosetta%20Code%2FCount%20examples|Rosetta Code/Count examples]] |
|||
| Task |
|||
|- |
|||
| 40 |
|||
| [[Universal%20Turing%20machine|Universal Turing machine]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,036: | Line 4,036: | ||
|- |
|- |
||
| 39 |
| 39 |
||
| [[Atomic%20updates|Atomic updates]] |
|||
| [[Archimedean%20spiral|Archimedean spiral]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,054: | Line 4,054: | ||
| [[Extract%20file%20extension|Extract file extension]] |
| [[Extract%20file%20extension|Extract file extension]] |
||
| Draft |
| Draft |
||
|- |
|||
| 39 |
|||
| [[GUI%20component%20interaction|GUI component interaction]] |
|||
| Task |
|||
|- |
|- |
||
| 39 |
| 39 |
||
Line 4,076: | Line 4,072: | ||
|- |
|- |
||
| 39 |
| 39 |
||
| [[Terminal%20control%2FColoured%20text|Terminal control/Coloured text]] |
|||
| [[Zebra%20puzzle|Zebra puzzle]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| |
| 39 |
||
| [[ |
| [[Zebra%20puzzle|Zebra puzzle]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 38 |
| 38 |
||
| [[Bitmap%2FMidpoint%20circle%20algorithm|Bitmap/Midpoint circle algorithm]] |
|||
| [[DNS%20query|DNS query]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,097: | Line 4,093: | ||
| 38 |
| 38 |
||
| [[FASTA%20format|FASTA format]] |
| [[FASTA%20format|FASTA format]] |
||
| Task |
|||
|- |
|||
| 38 |
|||
| [[History%20variables|History variables]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,129: | Line 4,121: | ||
| 38 |
| 38 |
||
| [[Sparkline%20in%20unicode|Sparkline in unicode]] |
| [[Sparkline%20in%20unicode|Sparkline in unicode]] |
||
| Task |
|||
|- |
|||
| 37 |
|||
| [[Doubly-linked%20list%2FDefinition|Doubly-linked list/Definition]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,153: | Line 4,149: | ||
| 37 |
| 37 |
||
| [[Subtractive%20generator|Subtractive generator]] |
| [[Subtractive%20generator|Subtractive generator]] |
||
| Task |
|||
|- |
|||
| 37 |
|||
| [[Terminal%20control%2FInverse%20video|Terminal control/Inverse video]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,165: | Line 4,157: | ||
| 36 |
| 36 |
||
| [[Active%20object|Active object]] |
| [[Active%20object|Active object]] |
||
| Task |
|||
|- |
|||
| 36 |
|||
| [[Department%20Numbers|Department Numbers]] |
|||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
Line 4,176: | Line 4,164: | ||
|- |
|- |
||
| 36 |
| 36 |
||
|data-sort-value="generate chess0D960 starting position"| [[Generate%20Chess960%20starting%20position|Generate Chess960 starting position]] |
|||
| [[Doubly-linked%20list%2FDefinition|Doubly-linked list/Definition]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 36 |
| 36 |
||
| [[History%20variables|History variables]] |
|||
|data-sort-value="generate chess0D960 starting position"| [[Generate%20Chess960%20starting%20position|Generate Chess960 starting position]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,209: | Line 4,197: | ||
| 36 |
| 36 |
||
| [[Stern-Brocot%20sequence|Stern-Brocot sequence]] |
| [[Stern-Brocot%20sequence|Stern-Brocot sequence]] |
||
| Task |
|||
|- |
|||
| 36 |
|||
| [[Terminal%20control%2FColoured%20text|Terminal control/Coloured text]] |
|||
| Task |
|||
|- |
|||
| 36 |
|||
| [[Terminal%20control%2FDimensions|Terminal control/Dimensions]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,232: | Line 4,212: | ||
|- |
|- |
||
| 35 |
| 35 |
||
| [[Bulls%20and%20cows%2FPlayer|Bulls and cows/Player]] |
|||
| [[Bitmap%2FMidpoint%20circle%20algorithm|Bitmap/Midpoint circle algorithm]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 35 |
| 35 |
||
| [[Colour%20bars%2FDisplay|Colour bars/Display]] |
|||
| [[Bulls%20and%20cows%2FPlayer|Bulls and cows/Player]] |
|||
| Task |
|||
|- |
|||
| 35 |
|||
| [[Department%20Numbers|Department Numbers]] |
|||
| Task |
|||
|- |
|||
| 35 |
|||
| [[Element-wise%20operations|Element-wise operations]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 35 |
| 35 |
||
| [[Farey%20sequence|Farey sequence]] |
| [[Farey%20sequence|Farey sequence]] |
||
| Task |
|||
|- |
|||
| 35 |
|||
| [[GUI%20enabling%2Fdisabling%20of%20controls|GUI enabling/disabling of controls]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,252: | Line 4,244: | ||
|- |
|- |
||
| 35 |
| 35 |
||
| [[Matrix%20arithmetic|Matrix arithmetic]] |
|||
| [[Leonardo%20numbers|Leonardo numbers]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 35 |
| 35 |
||
| [[Parallel%20calculations|Parallel calculations]] |
|||
| [[Matrix%20arithmetic|Matrix arithmetic]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,281: | Line 4,273: | ||
| 35 |
| 35 |
||
|data-sort-value="sum to 0D100"| [[Sum%20to%20100|Sum to 100]] |
|data-sort-value="sum to 0D100"| [[Sum%20to%20100|Sum to 100]] |
||
| Task |
|||
|- |
|||
| 35 |
|||
| [[Terminal%20control%2FDimensions|Terminal control/Dimensions]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,296: | Line 4,292: | ||
|- |
|- |
||
| 34 |
| 34 |
||
| [[Amb|Amb]] |
|||
| [[Average%20loop%20length|Average loop length]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 34 |
| 34 |
||
| [[Archimedean%20spiral|Archimedean spiral]] |
|||
| [[Balanced%20ternary|Balanced ternary]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 34 |
| 34 |
||
| [[Average%20loop%20length|Average loop length]] |
|||
| [[Calendar%20-%20for%20%22REAL%22%20programmers|Calendar - for "REAL" programmers]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 34 |
| 34 |
||
| [[ |
| [[Balanced%20ternary|Balanced ternary]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 34 |
| 34 |
||
| [[Calendar%20-%20for%20%22REAL%22%20programmers|Calendar - for "REAL" programmers]] |
|||
| [[Element-wise%20operations|Element-wise operations]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 34 |
| 34 |
||
| [[Constrained%20genericity|Constrained genericity]] |
|||
| [[GUI%20enabling%2Fdisabling%20of%20controls|GUI enabling/disabling of controls]] |
|||
| Task |
|||
|- |
|||
| 34 |
|||
| [[Hickerson%20series%20of%20almost%20integers|Hickerson series of almost integers]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,328: | Line 4,320: | ||
|- |
|- |
||
| 34 |
| 34 |
||
| [[Leonardo%20numbers|Leonardo numbers]] |
|||
| [[Keyboard%20input%2FFlush%20the%20keyboard%20buffer|Keyboard input/Flush the keyboard buffer]] |
|||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
Line 4,334: | Line 4,326: | ||
| [[Longest%20common%20prefix|Longest common prefix]] |
| [[Longest%20common%20prefix|Longest common prefix]] |
||
| Draft |
| Draft |
||
|- |
|||
| 34 |
|||
| [[Parallel%20calculations|Parallel calculations]] |
|||
| Task |
|||
|- |
|- |
||
| 34 |
| 34 |
||
Line 4,351: | Line 4,339: | ||
| Task |
| Task |
||
|- |
|- |
||
| |
| 34 |
||
| [[ |
| [[Topswops|Topswops]] |
||
| Task |
| Task |
||
|- |
|- |
||
Line 4,364: | Line 4,352: | ||
|- |
|- |
||
| 33 |
| 33 |
||
| [[Gaussian%20elimination|Gaussian elimination]] |
|||
| [[Constrained%20genericity|Constrained genericity]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 33 |
| 33 |
||
| [[Hickerson%20series%20of%20almost%20integers|Hickerson series of almost integers]] |
|||
| [[Gaussian%20elimination|Gaussian elimination]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,377: | Line 4,365: | ||
| 33 |
| 33 |
||
| [[Parsing%2FRPN%20to%20infix%20conversion|Parsing/RPN to infix conversion]] |
| [[Parsing%2FRPN%20to%20infix%20conversion|Parsing/RPN to infix conversion]] |
||
| Task |
|||
|- |
|||
| 33 |
|||
| [[Password%20generator|Password generator]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,389: | Line 4,373: | ||
| 33 |
| 33 |
||
| [[Start%20from%20a%20main%20routine|Start from a main routine]] |
| [[Start%20from%20a%20main%20routine|Start from a main routine]] |
||
| Task |
|||
|- |
|||
| 33 |
|||
| [[Topswops|Topswops]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,409: | Line 4,389: | ||
| 32 |
| 32 |
||
| [[Aliquot%20sequence%20classifications|Aliquot sequence classifications]] |
| [[Aliquot%20sequence%20classifications|Aliquot sequence classifications]] |
||
| Task |
|||
|- |
|||
| 32 |
|||
| [[Break%20OO%20privacy|Break OO privacy]] |
|||
| Task |
|||
|- |
|||
| 32 |
|||
| [[Events|Events]] |
|||
| Task |
|||
|- |
|||
| 32 |
|||
| [[Extensible%20prime%20generator|Extensible prime generator]] |
|||
| Task |
|||
|- |
|||
| 32 |
|||
| [[GUI%2FMaximum%20window%20dimensions|GUI/Maximum window dimensions]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 32 |
| 32 |
||
| [[Knuth%27s%20algorithm%20S|Knuth's algorithm S]] |
| [[Knuth%27s%20algorithm%20S|Knuth's algorithm S]] |
||
| Task |
|||
|- |
|||
| 32 |
|||
| [[Metered%20concurrency|Metered concurrency]] |
|||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
Line 4,428: | Line 4,428: | ||
|- |
|- |
||
| 32 |
| 32 |
||
| [[Password%20generator|Password generator]] |
|||
| [[S-Expressions|S-Expressions]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 32 |
| 32 |
||
| [[S-Expressions|S-Expressions]] |
|||
| [[Sort%20three%20variables|Sort three variables]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,443: | Line 4,443: | ||
| Task |
| Task |
||
|- |
|- |
||
| |
| 32 |
||
| [[Voronoi%20diagram|Voronoi diagram]] |
|||
| [[Break%20OO%20privacy|Break OO privacy]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,452: | Line 4,452: | ||
|- |
|- |
||
| 31 |
| 31 |
||
| [[ |
| [[Chaos%20game|Chaos game]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 31 |
| 31 |
||
| [[ |
| [[Deepcopy|Deepcopy]] |
||
| Task |
| Task |
||
|- |
|- |
||
| 31 |
| 31 |
||
| [[Keyboard%20input%2FFlush%20the%20keyboard%20buffer|Keyboard input/Flush the keyboard buffer]] |
|||
| [[Extensible%20prime%20generator|Extensible prime generator]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 31 |
| 31 |
||
|data-sort-value="md0B4"| [[MD4|MD4]] |
|data-sort-value="md0B4"| [[MD4|MD4]] |
||
| Task |
|||
|- |
|||
| 31 |
|||
| [[Metered%20concurrency|Metered concurrency]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,482: | Line 4,478: | ||
| [[Vector|Vector]] |
| [[Vector|Vector]] |
||
| Draft |
| Draft |
||
|- |
|||
| 31 |
|||
| [[Voronoi%20diagram|Voronoi diagram]] |
|||
| Task |
|||
|- |
|- |
||
| 30 |
| 30 |
||
Line 4,501: | Line 4,493: | ||
| 30 |
| 30 |
||
| [[Fibonacci%20word%2Ffractal|Fibonacci word/fractal]] |
| [[Fibonacci%20word%2Ffractal|Fibonacci word/fractal]] |
||
| Task |
|||
|- |
|||
| 30 |
|||
| [[Function%20prototype|Function prototype]] |
|||
| Task |
|||
|- |
|||
| 30 |
|||
| [[GUI%2FMaximum%20window%20dimensions|GUI/Maximum window dimensions]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,529: | Line 4,513: | ||
| 30 |
| 30 |
||
| [[Scope%2FFunction%20names%20and%20labels|Scope/Function names and labels]] |
| [[Scope%2FFunction%20names%20and%20labels|Scope/Function names and labels]] |
||
| Task |
|||
|- |
|||
| 30 |
|||
| [[Sort%20three%20variables|Sort three variables]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 30 |
| 30 |
||
| [[Speech%20synthesis|Speech synthesis]] |
| [[Speech%20synthesis|Speech synthesis]] |
||
| Task |
|||
|- |
|||
| 30 |
|||
| [[Terminal%20control%2FInverse%20video|Terminal control/Inverse video]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,541: | Line 4,533: | ||
| 29 |
| 29 |
||
| [[Conjugate%20transpose|Conjugate transpose]] |
| [[Conjugate%20transpose|Conjugate transpose]] |
||
| Task |
|||
|- |
|||
| 29 |
|||
| [[Function%20prototype|Function prototype]] |
|||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
Line 4,546: | Line 4,542: | ||
| [[Input%2FOutput%20for%20Pairs%20of%20Numbers|Input/Output for Pairs of Numbers]] |
| [[Input%2FOutput%20for%20Pairs%20of%20Numbers|Input/Output for Pairs of Numbers]] |
||
| Draft |
| Draft |
||
|- |
|||
| 29 |
|||
| [[Julia%20set|Julia set]] |
|||
| Task |
|||
|- |
|- |
||
| 29 |
| 29 |
||
| [[Maze%20solving|Maze solving]] |
| [[Maze%20solving|Maze solving]] |
||
| Task |
|||
|- |
|||
| 29 |
|||
| [[Terminal%20control%2FHiding%20the%20cursor|Terminal control/Hiding the cursor]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,573: | Line 4,561: | ||
| 28 |
| 28 |
||
| [[Executable%20library|Executable library]] |
| [[Executable%20library|Executable library]] |
||
| Task |
|||
|- |
|||
| 28 |
|||
| [[Find%20the%20intersection%20of%20two%20lines|Find the intersection of two lines]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,605: | Line 4,589: | ||
| 28 |
| 28 |
||
| [[Sutherland-Hodgman%20polygon%20clipping|Sutherland-Hodgman polygon clipping]] |
| [[Sutherland-Hodgman%20polygon%20clipping|Sutherland-Hodgman polygon clipping]] |
||
| Task |
|||
|- |
|||
| 28 |
|||
| [[Terminal%20control%2FHiding%20the%20cursor|Terminal control/Hiding the cursor]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,630: | Line 4,618: | ||
| [[File%20extension%20is%20in%20extensions%20list|File extension is in extensions list]] |
| [[File%20extension%20is%20in%20extensions%20list|File extension is in extensions list]] |
||
| Draft |
| Draft |
||
|- |
|||
| 27 |
|||
| [[Find%20the%20intersection%20of%20two%20lines|Find the intersection of two lines]] |
|||
| Task |
|||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
| 27 |
| 27 |
||
Line 4,636: | Line 4,628: | ||
|- |
|- |
||
| 27 |
| 27 |
||
| [[Julia%20set|Julia set]] |
|||
| [[Multiple%20regression|Multiple regression]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 27 |
| 27 |
||
| [[Multiple%20regression|Multiple regression]] |
|||
| [[Penney%27s%20game|Penney's game]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,661: | Line 4,653: | ||
| 26 |
| 26 |
||
| [[Pathological%20floating%20point%20problems|Pathological floating point problems]] |
| [[Pathological%20floating%20point%20problems|Pathological floating point problems]] |
||
| Task |
|||
|- |
|||
| 26 |
|||
| [[Penney%27s%20game|Penney's game]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,677: | Line 4,673: | ||
| 26 |
| 26 |
||
| [[Set%20puzzle|Set puzzle]] |
| [[Set%20puzzle|Set puzzle]] |
||
| Task |
|||
|- |
|||
| 26 |
|||
| [[Solve%20a%20Hidato%20puzzle|Solve a Hidato puzzle]] |
|||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
Line 4,682: | Line 4,682: | ||
| [[Sorting%20Algorithms%2FCircle%20Sort|Sorting Algorithms/Circle Sort]] |
| [[Sorting%20Algorithms%2FCircle%20Sort|Sorting Algorithms/Circle Sort]] |
||
| Draft |
| Draft |
||
|- |
|||
| 26 |
|||
| [[Use%20another%20language%20to%20call%20a%20function|Use another language to call a function]] |
|||
| Task |
|||
|- |
|||
| 26 |
|||
| [[Xiaolin%20Wu%27s%20line%20algorithm|Xiaolin Wu's line algorithm]] |
|||
| Task |
|||
|- |
|- |
||
| 26 |
| 26 |
||
Line 4,748: | Line 4,756: | ||
|- |
|- |
||
| 25 |
| 25 |
||
| [[Rosetta%20Code%2FFind%20unimplemented%20tasks|Rosetta Code/Find unimplemented tasks]] |
|||
| [[Same%20Fringe|Same Fringe]] |
|||
| Task |
| Task |
||
|- |
|- |
||
| 25 |
| 25 |
||
| [[Same%20Fringe|Same Fringe]] |
|||
| [[Solve%20a%20Hidato%20puzzle|Solve a Hidato puzzle]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,773: | Line 4,781: | ||
| 25 |
| 25 |
||
| [[Update%20a%20configuration%20file|Update a configuration file]] |
| [[Update%20a%20configuration%20file|Update a configuration file]] |
||
| Task |
|||
|- |
|||
| 25 |
|||
| [[Use%20another%20language%20to%20call%20a%20function|Use another language to call a function]] |
|||
| Task |
|||
|- |
|||
| 25 |
|||
| [[Xiaolin%20Wu%27s%20line%20algorithm|Xiaolin Wu's line algorithm]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,825: | Line 4,825: | ||
| 24 |
| 24 |
||
| [[Resistor%20mesh|Resistor mesh]] |
| [[Resistor%20mesh|Resistor mesh]] |
||
| Task |
|||
|- |
|||
| 24 |
|||
| [[Rosetta%20Code%2FFind%20bare%20lang%20tags|Rosetta Code/Find bare lang tags]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,873: | Line 4,869: | ||
| 23 |
| 23 |
||
| [[Pythagoras%20tree|Pythagoras tree]] |
| [[Pythagoras%20tree|Pythagoras tree]] |
||
| Task |
|||
|- |
|||
| 23 |
|||
| [[Rosetta%20Code%2FFind%20bare%20lang%20tags|Rosetta Code/Find bare lang tags]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,886: | Line 4,886: | ||
| [[Sorting%20algorithms%2FPatience%20sort|Sorting algorithms/Patience sort]] |
| [[Sorting%20algorithms%2FPatience%20sort|Sorting algorithms/Patience sort]] |
||
| Draft |
| Draft |
||
|- |
|||
| 23 |
|||
| [[Stream%20Merge|Stream Merge]] |
|||
| Task |
|||
|- |
|- |
||
| 23 |
| 23 |
||
Line 4,905: | Line 4,909: | ||
| 22 |
| 22 |
||
| [[Check%20Machin-like%20formulas|Check Machin-like formulas]] |
| [[Check%20Machin-like%20formulas|Check Machin-like formulas]] |
||
| Task |
|||
|- |
|||
| 22 |
|||
| [[Checkpoint%20synchronization|Checkpoint synchronization]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,926: | Line 4,934: | ||
| [[Prime%20conspiracy|Prime conspiracy]] |
| [[Prime%20conspiracy|Prime conspiracy]] |
||
| Draft |
| Draft |
||
|- |
|||
| 22 |
|||
| [[Rosetta%20Code%2FFind%20unimplemented%20tasks|Rosetta Code/Find unimplemented tasks]] |
|||
| Task |
|||
|- |
|||
| 22 |
|||
| [[Terminal%20control%2FCursor%20movement|Terminal control/Cursor movement]] |
|||
| Task |
|||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
| 22 |
| 22 |
||
Line 4,945: | Line 4,945: | ||
| 22 |
| 22 |
||
| [[Write%20to%20Windows%20event%20log|Write to Windows event log]] |
| [[Write%20to%20Windows%20event%20log|Write to Windows event log]] |
||
| Task |
|||
|- |
|||
| 21 |
|||
| [[Chat%20server|Chat server]] |
|||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
Line 4,950: | Line 4,954: | ||
| [[Check%20input%20device%20is%20a%20terminal|Check input device is a terminal]] |
| [[Check%20input%20device%20is%20a%20terminal|Check input device is a terminal]] |
||
| Draft |
| Draft |
||
|- |
|||
| 21 |
|||
| [[Checkpoint%20synchronization|Checkpoint synchronization]] |
|||
| Task |
|||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
| 21 |
| 21 |
||
Line 4,973: | Line 4,973: | ||
| 21 |
| 21 |
||
| [[Nautical%20bell|Nautical bell]] |
| [[Nautical%20bell|Nautical bell]] |
||
| Task |
|||
|- |
|||
| 21 |
|||
| [[Set%20of%20real%20numbers|Set of real numbers]] |
|||
| Task |
|||
|- |
|||
| 21 |
|||
| [[Solve%20a%20Holy%20Knight%27s%20tour|Solve a Holy Knight's tour]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 4,982: | Line 4,990: | ||
| [[Table%20creation|Table creation]] |
| [[Table%20creation|Table creation]] |
||
| Draft |
| Draft |
||
|- |
|||
| 21 |
|||
| [[Terminal%20control%2FCursor%20movement|Terminal control/Cursor movement]] |
|||
| Task |
|||
|- |
|- |
||
| 21 |
| 21 |
||
Line 5,002: | Line 5,014: | ||
| [[Verify%20distribution%20uniformity%2FChi-squared%20test|Verify distribution uniformity/Chi-squared test]] |
| [[Verify%20distribution%20uniformity%2FChi-squared%20test|Verify distribution uniformity/Chi-squared test]] |
||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|||
| 21 |
|||
| [[Welch%27s%20t-test|Welch's t-test]] |
|||
| Draft |
|||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
| 20 |
| 20 |
||
| [[Birthday%20problem|Birthday problem]] |
| [[Birthday%20problem|Birthday problem]] |
||
| Draft |
| Draft |
||
|- |
|||
| 20 |
|||
| [[Chat%20server|Chat server]] |
|||
| Task |
|||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
| 20 |
| 20 |
||
Line 5,069: | Line 5,073: | ||
| 20 |
| 20 |
||
| [[Safe%20addition|Safe addition]] |
| [[Safe%20addition|Safe addition]] |
||
| Task |
|||
|- |
|||
| 20 |
|||
| [[Set%20of%20real%20numbers|Set of real numbers]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 5,081: | Line 5,081: | ||
| 20 |
| 20 |
||
| [[Simulate%20input%2FKeyboard|Simulate input/Keyboard]] |
| [[Simulate%20input%2FKeyboard|Simulate input/Keyboard]] |
||
| Task |
|||
|- |
|||
| 20 |
|||
| [[Solve%20a%20Holy%20Knight%27s%20tour|Solve a Holy Knight's tour]] |
|||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
Line 5,090: | Line 5,086: | ||
| [[Substitution%20Cipher|Substitution Cipher]] |
| [[Substitution%20Cipher|Substitution Cipher]] |
||
| Draft |
| Draft |
||
|- style="background-color: #ffc" |
|||
| 20 |
|||
| [[Welch%27s%20t-test|Welch's t-test]] |
|||
| Draft |
|||
|- |
|||
| 20 |
|||
| [[Yahoo%21%20search%20interface|Yahoo! search interface]] |
|||
| Task |
|||
|- |
|- |
||
| 19 |
| 19 |
||
Line 5,138: | Line 5,142: | ||
| [[Total%20circles%20area|Total circles area]] |
| [[Total%20circles%20area|Total circles area]] |
||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|||
|- |
|||
| 19 |
| 19 |
||
| [[ |
| [[Type%20detection|Type detection]] |
||
| |
| Draft |
||
|- |
|||
| 19 |
|||
| [[Yahoo%21%20search%20interface|Yahoo! search interface]] |
|||
| Task |
|||
|- |
|- |
||
| 18 |
| 18 |
||
Line 5,188: | Line 5,188: | ||
|- |
|- |
||
| 18 |
| 18 |
||
| [[ |
| [[SOAP|SOAP]] |
||
| Task |
|||
|- |
|||
| 18 |
|||
| [[Window%20management|Window management]] |
|||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
Line 5,229: | Line 5,233: | ||
| 17 |
| 17 |
||
| [[Reflection%2FList%20properties|Reflection/List properties]] |
| [[Reflection%2FList%20properties|Reflection/List properties]] |
||
| Task |
|||
|- |
|||
| 17 |
|||
| [[SOAP|SOAP]] |
|||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
Line 5,277: | Line 5,277: | ||
| 16 |
| 16 |
||
| [[Simulate%20input%2FMouse|Simulate input/Mouse]] |
| [[Simulate%20input%2FMouse|Simulate input/Mouse]] |
||
| Task |
|||
|- |
|||
| 16 |
|||
| [[Solve%20a%20Numbrix%20puzzle|Solve a Numbrix puzzle]] |
|||
| Task |
| Task |
||
|- |
|- |
||
Line 5,294: | Line 5,298: | ||
| [[Compiler%2Flexical%20analyzer|Compiler/lexical analyzer]] |
| [[Compiler%2Flexical%20analyzer|Compiler/lexical analyzer]] |
||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|||
| 15 |
|||
| [[Faulhaber%27s%20formula|Faulhaber's formula]] |
|||
| Draft |
|||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
| 15 |
| 15 |
||
Line 5,304: | Line 5,312: | ||
|- |
|- |
||
| 15 |
| 15 |
||
| [[Solve%20a% |
| [[Solve%20a%20Hopido%20puzzle|Solve a Hopido puzzle]] |
||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
Line 5,325: | Line 5,333: | ||
| 14 |
| 14 |
||
| [[Elementary%20cellular%20automaton%2FInfinite%20length|Elementary cellular automaton/Infinite length]] |
| [[Elementary%20cellular%20automaton%2FInfinite%20length|Elementary cellular automaton/Infinite length]] |
||
| Draft |
|||
|- style="background-color: #ffc" |
|||
| 14 |
|||
| [[Faulhaber%27s%20formula|Faulhaber's formula]] |
|||
| Draft |
| Draft |
||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
Line 5,362: | Line 5,366: | ||
| [[Selective%20File%20Copy|Selective File Copy]] |
| [[Selective%20File%20Copy|Selective File Copy]] |
||
| Draft |
| Draft |
||
|- |
|||
| 14 |
|||
| [[Solve%20a%20Hopido%20puzzle|Solve a Hopido puzzle]] |
|||
| Task |
|||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
| 14 |
| 14 |
||
Line 5,398: | Line 5,398: | ||
| [[Color%20quantization|Color quantization]] |
| [[Color%20quantization|Color quantization]] |
||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|||
| 13 |
|||
| [[Convex%20hull|Convex hull]] |
|||
| Draft |
|||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
| 13 |
| 13 |
||
Line 5,429: | Line 5,433: | ||
| 13 |
| 13 |
||
| [[Superpermutation%20minimisation|Superpermutation minimisation]] |
| [[Superpermutation%20minimisation|Superpermutation minimisation]] |
||
| Draft |
|||
|- |
|||
| 13 |
|||
| [[Terminal%20control%2FPositional%20read|Terminal control/Positional read]] |
|||
| Task |
|||
|- style="background-color: #ffc" |
|||
| 13 |
|||
| [[Type%20detection|Type detection]] |
|||
| Draft |
| Draft |
||
|- |
|- |
||
Line 5,446: | Line 5,442: | ||
| [[Bitmap%2FRead%20an%20image%20through%20a%20pipe|Bitmap/Read an image through a pipe]] |
| [[Bitmap%2FRead%20an%20image%20through%20a%20pipe|Bitmap/Read an image through a pipe]] |
||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|||
| 12 |
|||
| [[Convex%20hull|Convex hull]] |
|||
| Draft |
|||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
| 12 |
| 12 |
||
Line 5,558: | Line 5,550: | ||
| [[Shortest%20common%20supersequence|Shortest common supersequence]] |
| [[Shortest%20common%20supersequence|Shortest common supersequence]] |
||
| Draft |
| Draft |
||
|- |
|||
| 11 |
|||
| [[Terminal%20control%2FPositional%20read|Terminal control/Positional read]] |
|||
| Task |
|||
|- |
|- |
||
| 11 |
| 11 |
||
Line 5,621: | Line 5,617: | ||
| 10 |
| 10 |
||
| [[Readline%20interface|Readline interface]] |
| [[Readline%20interface|Readline interface]] |
||
| Draft |
|||
|- style="background-color: #ffc" |
|||
| 10 |
|||
| [[Snake|Snake]] |
|||
| Draft |
| Draft |
||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
Line 5,673: | Line 5,665: | ||
| 9 |
| 9 |
||
| [[Free%20polyominoes%20enumeration|Free polyominoes enumeration]] |
| [[Free%20polyominoes%20enumeration|Free polyominoes enumeration]] |
||
| Draft |
|||
|- style="background-color: #ffc" |
|||
| 9 |
|||
| [[Snake|Snake]] |
|||
| Draft |
| Draft |
||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
Line 5,702: | Line 5,698: | ||
| [[Compiler%2Fsyntax%20analyzer|Compiler/syntax analyzer]] |
| [[Compiler%2Fsyntax%20analyzer|Compiler/syntax analyzer]] |
||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|||
| 8 |
|||
| [[Finite%20state%20machine|Finite state machine]] |
|||
| Draft |
|||
|- |
|- |
||
| 8 |
| 8 |
||
Line 5,746: | Line 5,738: | ||
|data-sort-value="deconvolution/0B2d+"| [[Deconvolution%2F2D%2B|Deconvolution/2D+]] |
|data-sort-value="deconvolution/0B2d+"| [[Deconvolution%2F2D%2B|Deconvolution/2D+]] |
||
| Task |
| Task |
||
|- style="background-color: #ffc" |
|||
| 7 |
|||
| [[Finite%20state%20machine|Finite state machine]] |
|||
| Draft |
|||
|- style="background-color: #ffc" |
|- style="background-color: #ffc" |
||
| 7 |
| 7 |
Revision as of 20:57, 30 March 2018
You are encouraged to solve this task according to the task description, using any language you may know.
Find the total number of programming examples for each task and the total for all tasks.
Essentially, count the number of occurrences of =={{header| on each task page.
Output:
100 doors: 20 examples. 99 Bottles of Beer: 29 examples. Abstract type: 10 examples. Total: X examples.
You'll need to use the Media Wiki API, which you can find out about locally, here, or in Media Wiki's API documentation at, API:Query
Ada
Parsing XML file with XMLAda from AdaCore <lang Ada>with Aws.Client, Aws.Messages, Aws.Response, Aws.Resources, Aws.Url; with Dom.Readers, Dom.Core, Dom.Core.Documents, Dom.Core.Nodes, Dom.Core.Attrs; with Input_Sources.Strings, Unicode, Unicode.Ces.Utf8; with Ada.Strings.Unbounded, Ada.Strings.Fixed, Ada.Text_IO, Ada.Command_Line; with Ada.Containers.Vectors;
use Aws.Client, Aws.Messages, Aws.Response, Aws.Resources, Aws.Url; use Dom.Readers, Dom.Core, Dom.Core.Documents, Dom.Core.Nodes, Dom.Core.Attrs; use Aws, Ada.Strings.Unbounded, Ada.Strings.Fixed, Input_Sources.Strings; use Ada.Text_IO, Ada.Command_Line;
procedure Count_Examples is
package Members_Vectors is new Ada.Containers.Vectors ( Index_Type => Positive, Element_Type => Unbounded_String); use Members_Vectors;
Exemples : Vector; Nbr_Lg, Total : Natural := 0;
procedure Get_Vector (Category : in String; Mbr_Vector : in out Vector) is Reader : Tree_Reader; Doc : Document; List : Node_List; N : Node; A : Attr; Page : Aws.Response.Data; Uri_Xml : constant String := "http://rosettacode.org/mw/api.php?action=query&list=categorymembers" & "&format=xml&cmlimit=500&cmtitle=Category:"; begin Page := Client.Get (Uri_Xml & Category); if Response.Status_Code (Page) not in Messages.Success then raise Client.Connection_Error; end if; declare Xml : constant String := Message_Body (Page); Source : String_Input; begin Open (Xml'Unrestricted_Access, Unicode.Ces.Utf8.Utf8_Encoding, Source); Parse (Reader, Source); Close (Source); end; Doc := Get_Tree (Reader); List := Get_Elements_By_Tag_Name (Doc, "cm"); for Index in 1 .. Length (List) loop N := Item (List, Index - 1); A := Get_Named_Item (Attributes (N), "title"); Append (Mbr_Vector, To_Unbounded_String (Value (A))); end loop; Free (List); Free (Reader); end Get_Vector;
function Scan_Page (Title : String) return Natural is Page : Aws.Response.Data; File : Aws.Resources.File_Type; Buffer : String (1 .. 1024); Languages, Position, Last : Natural := 0; begin Page := Client.Get ("http://rosettacode.org/mw/index.php?title=" & Aws.Url.Encode (Title) & "&action=raw"); Response.Message_Body (Page, File); while not End_Of_File (File) loop Resources.Get_Line (File, Buffer, Last); Position := Index (Source => Buffer (Buffer'First .. Last), Pattern => "=={{header|"); if Position > 0 then Languages := Languages + 1; end if; end loop; Close (File); return Languages; end Scan_Page;
begin
Get_Vector ("Programming_Tasks", Exemples);
for I in First_Index (Exemples) .. Last_Index (Exemples) loop declare Title : constant String := To_String (Members_Vectors.Element (Exemples, I)); begin Nbr_Lg := Scan_Page (Title); Total := Total + Nbr_Lg; Put_Line (Title & " :" & Integer'Image (Nbr_Lg) & " exemples."); end; end loop;
Put_Line ("Total :" & Integer'Image (Total) & " exemples.");
end Count_Examples; </lang> Output :
100 doors : 107 exemples. 24 game : 30 exemples. .... Yahoo! search interface : 10 exemples. Zig-zag matrix : 49 exemples. Total : 17238 exemples.
AutoHotkey
<lang AutoHotkey>UrlDownloadToFile
, http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml , tasks.xml
FileRead, tasks, tasks.xml pos = 0 quote = " ; " regtitle := "<cm.*?title=" . quote . "(.*?)" . quote While, pos := RegExMatch(tasks, regtitle, title, pos + 1) {
UrlDownloadToFile , % "http://www.rosettacode.org/w/index.php?title=" . title1 . "&action=raw" , task.xml FileRead, task, task.xml RegExReplace(task, "\{\{header\|", "", count) current := title1 . ": " . count . " examples.`n" output .= current TrayTip, current, % current
} MsgBox % output Return</lang>
BBC BASIC
<lang bbcbasic> VDU 23,22,640;512;8,16,16,128+8 : REM Enable UTF-8 support
SYS "LoadLibrary", "URLMON.DLL" TO urlmon% SYS "GetProcAddress", urlmon%, "URLDownloadToFileA" TO UDTF special$ = "+()'" url$ = "http://www.rosettacode.org/w/api.php?action=query" + \ \ "&list=categorymembers&cmtitle=Category:Programming_Tasks" + \ \ "&cmlimit=500&format=xml" file$ = @tmp$ + "tasks.xml" SYS UDTF, 0, url$, file$, 0, 0 TO fail% IF fail% ERROR 100, "File download failed (tasks)" Total% = 0 file% = OPENIN(file$) WHILE NOT EOF#file% a$ = GET$#file% i% = 0 REPEAT i% = INSTR(a$, "title=", i%+1) IF i% THEN j% = INSTR(a$, ">", i%) title$ = MID$(a$, i%+7, j%-i%-10) REM Replace HTML codes: REPEAT k% = INSTR(title$, "&") IF k% THEN l% = INSTR(title$, ";", k%) title$ = LEFT$(title$,k%-1) + \ \ FNhtml(MID$(title$,k%,l%-k%+1)) + MID$(title$,l%+1) ENDIF UNTIL k% = 0 t$ = title$ REM Substitute characters not allowed in a URL: FOR s% = 1 TO LEN(special$) REPEAT s$ = MID$(special$, s%, 1) k% = INSTR(t$, s$) IF k% t$ = LEFT$(t$,k%-1) + "%" + STR$~ASCs$ + MID$(t$,k%+1) UNTIL k% = 0 NEXT url$ = "http://www.rosettacode.org/w/index.php?title=" + t$ + \ \ "&action=raw" file$ = @tmp$ + "title.htm" SYS UDTF, 0, url$, file$, 0, 0 TO fail% IF fail% ERROR 100, "File download failed " + t$ examples% = 0 task% = OPENIN(file$) WHILE NOT EOF#task% IF INSTR(GET$#task%, "=={{header|") examples% += 1 ENDWHILE CLOSE #task% Total% += examples% PRINT title$ ": " ; examples% " examples." ENDIF UNTIL i% = 0 i% = INSTR(a$, "cmcontinue=") IF i% THEN CLOSE #file% j% = INSTR(a$, """", i%+1) k% = INSTR(a$, """", j%+1) url$ = "http://www.rosettacode.org/w/api.php?action=query" + \ \ "&list=categorymembers&cmtitle=Category:Programming_Tasks" + \ \ "&cmlimit=500&format=xml&cmcontinue=" + MID$(a$,j%+1,k%-j%) REPEAT i% = INSTR(url$, "|") IF i% url$ = LEFT$(url$,i%-1) + "%7C" + MID$(url$,i%+1) UNTIL i% = 0 file$ = @tmp$ + "tasks.xml" SYS UDTF, 0, url$, file$, 0, 0 TO fail% IF fail% ERROR 100, "File download failed (continue)" file% = OPENIN(file$) ENDIF ENDWHILE CLOSE #file% PRINT ' "Total: " ; Total% " examples." END DEF FNhtml(h$) IF LEFT$(h$,2) = "&#" THEN = CHR$(VALMID$(h$,3)) CASE h$ OF WHEN """: = """" ENDCASE = h$</lang>
Sample output:
100 doors: 154 examples. 24 game: 53 examples. 24 game/Solve: 30 examples. 99 Bottles of Beer: 181 examples. A+B: 124 examples. Abstract type: 49 examples. Accumulator factory: 65 examples. Ackermann function: 126 examples. Active Directory/Connect: 12 examples. Active Directory/Search for a user: 13 examples. ...... XML/DOM serialization: 33 examples. XML/Input: 50 examples. XML/Output: 41 examples. XML/XPath: 33 examples. Y combinator: 51 examples. Yahoo! search interface: 13 examples. Yin and yang: 36 examples. Zebra puzzle: 11 examples. Zeckendorf number representation: 14 examples. Zig-zag matrix: 64 examples. Total: 27004 examples.
Bracmat
<lang bracmat>( ( get-page
= . sys$(str$("wget -q -O wget.out \"" !arg \")) & get$("wget.out",HT ML) )
& get-page$"http://rosettacode.org/wiki/Category:Programming_Tasks"
: ? (table.?) ?tasklist (.table.) ?
& 0:?list & whl
' ( !tasklist : ? ( a . (href.@(?:"/wiki/" ?href)) (title.?title) & get-page$(str$("http://rosettacode.org/wiki/" !href)) : ?task & 0:?cnt & whl ' ( !task : ? ( (span.(class.mw-headline) (id.?)) ?span (.span.) ?task & !span : ? ( a . (href.@(?:"/wiki/Category:" ?)) (title.@(?:"Category:" ?)) ) @ (.a.) ? ) & 1+!cnt:?cnt ) & (!cnt.!title)+!list:?list ) ?tasklist )
& lst$(list,taskfreq,NEW)
)</lang>
Output (in file tasqfreq
):
list= (2."OLE Automation") + (3."Canny edge detector") + ( 3 . "Continued fraction/Arithmetic/G(matrix NG, Contined Fraction N1, Contined Fraction N2)" ) + (4."Colour pinstripe/Printer") + (4."Vogel's approximation method") + (5."Catmull–Clark subdivision surface") + (5."Percolation/Bond percolation") + (5.Pinstripe/Printer) + (5."Zeckendorf arithmetic") + (6."Continued fraction/Arithmetic/G(matrix NG, Contined Fraction N)") + (6."Percolation/Mean cluster density") + (7."Bitmap/PPM conversion through a pipe") + (7."Deconvolution/2D+") + (7."K-d tree") .... + (125."Greatest element of a list") + (127."Averages/Arithmetic mean") + (131.Arrays) + (131."Increment a numerical string") + (132."Greatest common divisor") + (133.Loops/While) + (134."Conditional structures") + (136.Arithmetic/Integer) + (137.Loops/For) + (145.Loops/Infinite) + (147."Ackermann function") + (148."Reverse a string") + (152."A+B") + (152."Function definition") + (160."Empty program") + (163."Fibonacci sequence") + (164.Factorial) + (182.FizzBuzz) + (187."100 doors") + (188.Comments) + (216."99 Bottles of Beer") + (269."Hello world/Text");
C#
Object-oriented solution.
<lang csharp>using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.Net;
class Task {
private string _task; private int _examples;
public Task(string task, int examples) { _task = task; _examples = examples; }
public string Name { get { return _task; } }
public int Examples { get { return _examples; } }
public override string ToString() { return String.Format("{0}: {1} examples.", this._task, this._examples); }
}
class Program {
static List<string> GetTitlesFromCategory(string category, WebClient wc) { string content = wc.DownloadString( String.Format("http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:{0}&cmlimit=500&format=json", category) );
return new Regex("\"title\":\"(.+?)\"").Matches(content).Cast<Match>().Select(x => x.Groups[1].Value.Replace("\\/", "/")).ToList(); }
static string GetSourceCodeFromPage(string page, WebClient wc) { return wc.DownloadString( String.Format("http://www.rosettacode.org/w/index.php?title={0}&action=raw", page) ); }
static void Main(string[] args) { WebClient wc = new WebClient(); List<Task> tasks = new List<Task>(); List<string> tasknames = GetTitlesFromCategory("Programming_Tasks", wc);
foreach (string task in tasknames) { string content = GetSourceCodeFromPage(task, wc); int count = new Regex("=={{header", RegexOptions.IgnoreCase).Matches(content).Count; Task t = new Task(task, count);
Console.WriteLine(t); tasks.Add(t); }
Console.WriteLine("\nTotal: {0} examples.", tasks.Select(x => x.Examples).Sum()); }
}</lang>
Clojure
<lang clojure>(ns count-examples
(:import [java.net URLEncoder]) (:use [clojure.contrib.http.agent :only (http-agent string)] [clojure.contrib.json :only (read-json)] [clojure.contrib.string :only (join)]))
(defn url-encode [v] (URLEncoder/encode (str v) "utf-8"))
(defn rosettacode-get [path params]
(let [param-string (join "&" (for [[n v] params] (str (name n) "=" (url-encode v))))] (string (http-agent (format "http://www.rosettacode.org/w/%s?%s" path param-string)))))
(defn rosettacode-query [params]
(read-json (rosettacode-get "api.php" (merge {:action "query" :format "json"} params))))
(defn list-cm
([params] (list-cm params nil)) ([params continue] (let [cm-params (merge {:list "categorymembers"} params (or continue {})) result (rosettacode-query cm-params)] (concat (-> result (:query) (:categorymembers)) (if-let [cmcontinue (-> result (:query-continue) (:categorymembers))] (list-cm params cmcontinue))))))
(defn programming-tasks []
(let [result (list-cm {:cmtitle "Category:Programming_Tasks" :cmlimit 50})] (map #(:title %) result)))
(defn task-count [task]
[task (count (re-seq #"==\{\{header" (rosettacode-get "index.php" {:action "raw" :title task})))])
(defn print-result []
(let [task-counts (map task-count (programming-tasks))] (doseq [[task count] task-counts] (println (str task ":") count) (flush)) (println "Total: " (reduce #(+ %1 (second %2)) 0 task-counts))))
</lang> <lang clojure>count-examples> (print-result) 100 doors: 73 24 game: 18 24 game/Solve: 14 99 Bottles of Beer: 89 Abstract type: 27 Accumulator factory: 23 Ackermann function: 73 Active Directory/Connect: 4 Active Directory/Search for a user: 3 Active object: 14 Add a variable to a class instance at runtime: 21 Address of a variable: 20 ... Total: 11216 nil </lang>
D
<lang D> import tango.io.Stdout; import tango.net.http.HttpClient; import tango.net.http.HttpHeaders; import tango.text.xml.Document; import tango.text.Util;
alias HttpHeader.ContentLength CL;
auto url = "http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml"; void main() {
auto client = new HttpClient (HttpClient.Get, url); client.open(); char[] mainData, tmp; int total, i;
void cat(void[] content) { tmp ~= cast(char[]) content; }
if (client.isResponseOK) { client.read(&cat, client.getResponseHeaders.getInt(CL)); mainData = tmp; tmp = null;
auto doc = new Document!(char); doc.parse(mainData); foreach (n; doc.query.descendant("cm").attribute("title")) { auto subClient = new HttpClient(HttpClient.Get, "http://www.rosettacode.org/w/index.php?title=" ~ replace(n.value.dup, ' ', '_') ~ "&action=raw"); subClient.open(); if (! subClient.isResponseOK) { Stderr (client.getResponse); break; } subClient.read(&cat, subClient.getResponseHeaders.getInt(CL)); foreach (segment; patterns(cast(char[])tmp, "=={{header|")) i++; --i; if (i) --i; Stdout.formatln ("{0,-40} - {}", n.value, i); total += i; tmp = null; i = 0; } Stdout("total examples: ", total).newline; } else { Stderr (client.getResponse); }
} </lang>
EGL
A graphical implementation with a grid showing the number of implementations for each Rosetta Code task as well as total task and implementation counts. Uses MediaWiki API service call to fetch tasks/categories in a JSON format and meets API data limit and continuation requirements to consume 100% of the items.
User Interface: RosettaCodeHandler.egl <lang EGL>package com.eglexamples.client;
import org.eclipse.edt.rui.widgets.*;
handler RosettaCodeHandler type RUIhandler{initialUI =[ui], title = "Rosetta Code Tasks and Counts"}
ui GridLayout{columns = 3, rows = 4, cellPadding = 4, children = [ b1, dg1, l1, l2, l3, l4 ]}; b1 Button{ layoutData = new GridLayoutData{ row = 1, column = 1 }, text = "Go!", onClick ::= b1_onClick }; l1 TextLabel{ layoutData = new GridLayoutData{ row = 1, column = 2 }, text = "Total Tasks:" }; l2 TextLabel{ layoutData = new GridLayoutData{ row = 1, column = 3 }, text = "0" };
l3 TextLabel{ layoutData = new GridLayoutData{ row = 2, column = 2 }, text = "Total Implementations:" }; l4 TextLabel{ layoutData = new GridLayoutData{ row = 2, column = 3 }, text = "0" }; dg1 DataGrid{ layoutData = new GridLayoutData{ row = 3, column = 1, horizontalSpan = 3 }, pageSize = 10, showScrollbar = true,
columns = [ new DataGridColumn{name = "title", displayName = "Task", width=220}, new DataGridColumn{name = "count", displayName = "Count", width=100} ] };
cmcontinue string?; title string?; allTasks Task[];
restBindingTasks IHttp? = new HttpRest{ restType = eglx.rest.ServiceType.TrueRest, request.uri = "http://rosettacode.org/mw/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=1&format=json"};
restBindingPageDetail IHttp? = new HttpRest{ restType = eglx.rest.ServiceType.TrueRest, request.uri = "http://rosettacode.org/mw/index.php"};
function b1_onClick(event Event in)
call ProxyFunctions.listTasks("") using restBindingTasks
returning to listTasksCallBack onException exceptionHandler; end function listTasksCallBack(retResult RosettaCodeJSON in)
title = retResult.query.categorymembers[1].title; cmcontinue = retResult.queryContinue.categorymembers.cmcontinue;
call ProxyFunctions.fetchPageDetail(title) using restBindingPageDetail
returning to pageDetailCallBack onException exceptionHandler; end
function pageDetailCallBack(pageResults string in) count int = countSubstring("=={{header", pageResults); allTasks.appendElement(new Task { title = title, count = count });
l2.text = l2.text as int + 1; l4.text = l4.text as int + count;
if(cmcontinue != null)
call ProxyFunctions.listTasks(cmcontinue) using restBindingTasks returning to listTasksCallBack onException exceptionHandler; else dg1.data = allTasks as any[]; end
end function countSubstring(substr string in, str string in) returns(int)
if(str.length() > 0 and substr.length() > 0) return (str.length() - str.replaceStr(subStr, "").length()) / subStr.length(); else return 0; end
end
function exceptionHandler(exp AnyException in) end
end
record Task title string; count int; end</lang>
Service Interface: ProxyFunctions.egl <lang EGL>package com.eglexamples.client;
library ProxyFunctions
function listTasks(continueLocation String in) returns (RosettaCodeJSON) {
@Rest{method = _GET, uriTemplate = "&cmcontinue={continueLocation}", requestFormat = None, responseFormat = JSON}
} end
function fetchPageDetail(title String in) returns (String) {
@Rest{method = _GET, uriTemplate = "?title={title}&action=raw", requestFormat = None, responseFormat = None}
} end
end
record RosettaCodeJSON
query Query; queryContinue QueryContinue{JSONName = "query-continue"};
end
record Query
categorymembers Categorymembers[];
end
record Categorymembers
cmcontinue string?; pageid int?; ns int?; title string?;
end
record QueryContinue
categorymembers Categorymembers;
end</lang>
Erlang
<lang erlang> -module(rosseta_examples). -include_lib("xmerl/include/xmerl.hrl").
-export([main/0]).
main() ->
application:start(inets), Titles = read_titles(empty), Result = lists:foldl(fun(Title,Acc) -> Acc + calculate_one(Title) end, 0, Titles), io:format("Total: ~p examples.\n",[Result]), application:stop(inets).
read_titles(CurrentContinue) ->
URL0 = "http://rosettacode.org/mw/api.php?" ++ "action=query&list=categorymembers&cmtitle=Category:Programming_Tasks" ++ "&cmlimit=500&format=xml", URL = case CurrentContinue of empty -> URL0; _ -> URL0 ++ "&cmcontinue=" ++ CurrentContinue end, {ok,Answer} = httpc:request(URL), {Document,_} = xmerl_scan:string(lists:last(tuple_to_list(Answer))), Continue = [Value || #xmlAttribute{value = Value} <- xmerl_xpath:string("//@cmcontinue", Document)], Titles = [Value || #xmlAttribute{value = Value} <- xmerl_xpath:string("//@title", Document)], case Continue of []-> Titles; [ContValue | _] -> Titles ++ read_titles(ContValue) end.
calculate_one(Title0) ->
Title = replace_chars(Title0), URL = "http://www.rosettacode.org/w/index.php?title=" ++ Title ++ "&action=raw", case httpc:request(URL) of {ok,Result} -> {match,Found} = re:run(lists:last(tuple_to_list(Result)), "\n=={{header(|)", [global]), io:format("~ts: ~p examples.\n",[Title0,length(Found)]), length(Found); {error,socket_closed_remotely} -> io:format("Socket closed remotely. Retry.\n"), calculate_one(Title0) end.
replace_chars(String) ->
replace_chars(String,[]).
replace_chars([$ | T],Acc) ->
replace_chars(T, [$_| Acc]);
replace_chars([$+| T],Acc) ->
replace_chars(T, lists:reverse("%2B") ++ Acc);
replace_chars([8211| T],Acc) ->
replace_chars(T, lists:reverse("%E2%80%93") ++ Acc);
replace_chars([Other| T],Acc) ->
replace_chars(T, [Other| Acc]);
replace_chars([],Acc) ->
lists:reverse(Acc).
</lang>
Outputs:
> rosseta_examples:main(). 100 doors: 165 examples. 24 game: 56 examples. 24 game/Solve: 33 examples. ... Zebra puzzle: 12 examples. Zeckendorf number representation: 18 examples. Zig-zag matrix: 65 examples. Total: 28629 examples.
F#
Using asynchronous workflows to perform downloads concurrently:
<lang fsharp>#r "System.Xml.Linq.dll"
let uri1 = "http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml" let uri2 task = sprintf "http://www.rosettacode.org/w/index.php?title=%s&action=raw" task
[|for xml in (System.Xml.Linq.XDocument.Load uri1).Root.Descendants() do
for attrib in xml.Attributes() do if attrib.Name.LocalName = "title" then yield async { let uri = uri2 (attrib.Value.Replace(" ", "_") |> System.Web.HttpUtility.UrlEncode) use client = new System.Net.WebClient() let! html = client.AsyncDownloadString(System.Uri uri) let sols' = html.Split([|"{{header|"|], System.StringSplitOptions.None).Length - 1 lock stdout (fun () -> printfn "%s: %d examples" attrib.Value sols') return sols' }|]
|> Async.Parallel |> Async.RunSynchronously |> fun xs -> printfn "Total: %d examples" (Seq.sum xs)</lang>
This is 21× faster than the python thanks to the concurrency.
Factor
Runs in about a minute. The number of threads is limited to 10 avoid cloudfare's protection mechanism.
<lang factor>USING: arrays assocs concurrency.combinators concurrency.semaphores formatting hashtables http.client io json.reader kernel math math.parser sequences splitting urls.encoding ; IN: rosetta-code.count-examples
CONSTANT: list-url "http://rosettacode.org/mw/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&cmprop=title&format=json"
- titles ( query -- titles )
"query" of "categorymembers" of [ "title" of ] map ;
- continued-url ( query -- url/f )
"query-continue" of "categorymembers" of [ assoc>query list-url swap "&" glue ] [ f ] if* ;
- (all-programming-titles) ( titles url -- titles' url' )
http-get nip json> [ titles append ] [ continued-url ] bi [ (all-programming-titles) ] [ f ] if* ;
- all-programming-titles ( -- titles ) { } list-url (all-programming-titles) drop ;
CONSTANT: content-base-url "http://rosettacode.org/mw/index.php?title=&action=raw"
- content-url ( title -- url )
" " "_" replace "title" associate assoc>query content-base-url swap "&" glue ;
- occurences ( seq subseq -- n ) split-subseq length 1 - ;
- count-examples ( title -- n )
content-url http-get nip "=={{header|" occurences ;
- print-task ( title n -- ) "%s: %d examples.\n" printf ;
- print-total ( assoc -- ) values sum "Total: %d examples.\n" printf ;
- fetch-counts ( titles -- assoc )
10 <semaphore> [ [ dup count-examples 2array ] with-semaphore ] curry parallel-map ;
- print-counts ( titles -- )
[ [ print-task ] assoc-each nl ] [ print-total ] bi ;
- rosetta-examples ( -- )
all-programming-titles fetch-counts print-counts ;
MAIN: rosetta-examples</lang> Outputs:
100 doors: 169 examples. 24 game: 58 examples. ... Zeckendorf number representation: 22 examples. Zig-zag matrix: 66 examples. Total: 30745 examples.
Go
<lang go>package main
import (
"bytes" "encoding/xml" "fmt" "io" "io/ioutil" "net/http" "net/url" "strings"
)
func req(u string, foundCm func(string)) string {
resp, err := http.Get(u) if err != nil { fmt.Println(err) // connection or request fail return "" } defer resp.Body.Close() for p := xml.NewDecoder(resp.Body); ; { t, err := p.RawToken() switch s, ok := t.(xml.StartElement); { case err == io.EOF: return "" case err != nil: fmt.Println(err) return "" case !ok: continue case s.Name.Local == "cm": for _, a := range s.Attr { if a.Name.Local == "title" { foundCm(a.Value) } } case s.Name.Local == "categorymembers" && len(s.Attr) > 0 && s.Attr[0].Name.Local == "cmcontinue": return url.QueryEscape(s.Attr[0].Value) } } return ""
}
func main() {
taskQuery := "http://rosettacode.org/mw/api.php?action=query" + "&format=xml&list=categorymembers&cmlimit=500" + "&cmtitle=Category:Programming_Tasks" continueAt := req(taskQuery, count) for continueAt > "" { continueAt = req(taskQuery+"&cmcontinue="+continueAt, count) } fmt.Printf("Total: %d examples.\n", total)
}
var marker = []byte("=={{header|") var total int
func count(cm string) {
taskFmt := "http://rosettacode.org/mw/index.php?title=%s&action=raw" taskEsc := url.QueryEscape(strings.Replace(cm, " ", "_", -1)) resp, err := http.Get(fmt.Sprintf(taskFmt, taskEsc)) var page []byte if err == nil { page, err = ioutil.ReadAll(resp.Body) resp.Body.Close() } if err != nil { fmt.Println(err) return } examples := bytes.Count(page, marker) fmt.Printf("%s: %d\n", cm, examples) total += examples
}</lang>
- Output
- (May 25, 2011):
... Y combinator: 40 Yahoo! search interface: 10 Yin and yang: 18 Zig-zag matrix: 50 Total: 18290 examples.
Haskell
from HackageDB
<lang haskell>import Network.Browser import Network.HTTP import Network.URI import Data.List import Data.Maybe import Text.XML.Light import Control.Arrow
justifyR w = foldl ((.return).(++).tail) (replicate w ' ') showFormatted t n = t ++ ": " ++ justifyR 4 (show n)
getRespons url = do
rsp <- Network.Browser.browse $ do setAllowRedirects True setOutHandler $ const (return ()) -- quiet request $ getRequest url return $ rspBody $ snd rsp
getNumbOfExampels p = do
let pg = intercalate "_" $ words p rsp <- getRespons $ "http://www.rosettacode.org/w/index.php?title=" ++ pg ++ "&action=raw" let taskPage = rsp countEx = length $ filter (=="=={{header|") $ takeWhile(not.null) $ unfoldr (Just. (take 11 &&& drop 1)) taskPage return countEx
progTaskExamples = do
rsp <- getRespons "http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml"
let xmls = onlyElems $ parseXML $ rsp tasks = concatMap (map (fromJust.findAttr (unqual "title")). filterElementsName (== unqual "cm")) xmls
taskxx <- mapM getNumbOfExampels tasks let ns = taskxx tot = sum ns
mapM_ putStrLn $ zipWith showFormatted tasks ns putStrLn $ ("Total: " ++) $ show tot</lang>
some output: <lang haskell>*Main> progTaskExamples 100 doors: 56 24 game: 11 24 game Player: 9 99 Bottles of Beer: 73 Abstract type: 23 Ackermann Function: 61 Active object: 9 ... Total: 9156</lang>
Icon and Unicon
The following code uses features exclusive to Unicon. This version handles all tasks, not just the first 500.
<lang Unicon>$define RCINDEX "http://rosettacode.org/mw/api.php?format=xml&action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500" $define RCTASK "http://rosettacode.org/mw/index.php?action=raw&title=" $define RCUA "User-Agent: Unicon Rosetta 0.1" $define RCXUA "X-Unicon: http://unicon.org/" $define TASKTOT "* Total Tasks *" $define TOTTOT "* Total Headers*"
link strings link hexcvt
procedure main(A) # simple single threaded read all at once implementation
Tasks := table(0) every task := taskNames() do { Tasks[TASKTOT] +:= 1 # count tasks every lang := languages(task) do { # count languages Tasks[task] +:= 1 Tasks[TOTTOT] +:= 1 } } every insert(O := set(),key(Tasks)) # extract & sort keys O := put(sort(O--set(TOTTOT,TASKTOT)),TASKTOT,TOTTOT) # move totals to end every write(k := !O, " : ", Tasks[k]," examples.") # report
end
- Generate task names
procedure taskNames()
continue := "" while \(txt := ReadURL(RCINDEX||continue)) do { txt ? { while tab(find("<cm ") & find(s :="title=\"")+*s) do suspend tab(find("\""))\1 if tab(find("cmcontinue=")) then { continue := "&"||tab(upto(' \t')) } else break } }
end
- Generate language headers in a task
procedure languages(task)
static WS initial WS := ' \t' page := ReadURL(RCTASK||CleanURI(task)) page ? while (tab(find("\n==")),tab(many(WS))|"",tab(find("{{"))) do { header := tab(find("==")) header ? { while tab(find("{{header|")) do { suspend 2(="",tab(find("")))\1 } } }
end
procedure CleanURI(u) #: clean up a URI
static tr,dxml # xml & http translation initial { tr := table() every c := !string(~(&digits++&letters++'-_.!~*()/\'`')) do tr[c] := "%"||hexstring(ord(c),2) every /tr[c := !string(&cset)] := c tr[" "] := "_" # wiki convention every push(dxml := [],"&#"||right(ord(c := !"&<>'\""),3,"0")||";",c) } dxml[1] := u # insert URI as 1st arg u := replacem!dxml # de-xml it every (c := "") ||:= tr[!u] # reencode everything c := replace(c,"%3E","'") # Hack to put single quotes back in c := replace(c,"%26quot%3B","\"") # Hack to put double quotes back in return c
end
procedure ReadURL(url) #: read URL into string
page := open(url,"m",RCUA,RCXUA) | stop("Unable to open ",url) text := "" if page["Status-Code"] < 300 then while text ||:= reads(page,-1) else write(&errout,image(url),": ", page["Status-Code"]," ",page["Reason-Phrase"]) close(page) return text
end</lang>
strings provides replacem hexcvt provides hexstring
Sample Output for July 6, 2013 (abridged):
100 doors : 171 examples. 24 game : 60 examples. 24 game/Solve : 37 examples. 9 billion names of God the integer : 12 examples. 99 Bottles of Beer : 199 examples. A+B : 137 examples. Abstract type : 54 examples. Accumulator factory : 67 examples. Ackermann function : 137 examples. ... Y combinator : 56 examples. Yahoo! search interface : 18 examples. Yin and yang : 39 examples. Zebra puzzle : 12 examples. Zeckendorf arithmetic : 3 examples. Zeckendorf number representation : 21 examples. Zig-zag matrix : 67 examples. * Total Tasks * : 676 examples. * Total Headers* : 31146 examples.
J
Solution:
Using getCategoryMembers
from Find unimplemented tasks.
<lang j>require 'web/gethttp'
getAllTaskSolnCounts=: monad define
tasks=. getCategoryMembers 'Programming_Tasks' counts=. getTaskSolnCounts &> tasks tasks;counts
)
getTaskSolnCounts=: monad define
makeuri=. 'http://www.rosettacode.org/w/index.php?title=' , ,&'&action=raw' wikidata=. gethttp makeuri urlencode y ([: +/ '{{header|'&E.) wikidata
)
formatSolnCounts=: monad define
'tasks counts'=. y tasks=. tasks , &.>':' res=. ;:^:_1 tasks ,. (8!:0 counts) ,. <'examples.' res , 'Total examples: ' , ": +/counts
)</lang>
Example Usage: <lang j> formatSolnCounts getAllTaskSolnCounts 100 doors: 61 examples. 24 game: 15 examples. 24 game Player: 11 examples. 99 Bottles of Beer: 76 examples. ...</lang>
Java
<lang java5> import java.util.ArrayList; import ScreenScrape;
public class CountProgramExamples {
private static final String baseURL = "http://rosettacode.org/wiki/"; private static final String rootURL = "http://www.rosettacode.org/w/" + "api.php?action=query&list=categorymembers" + "&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml"; private static final String taskBegin = "title=\""; private static final String taskEnd = "\""; private static final String exmplBegin = ""; private static final String exmplEnd = ""; private static final String editBegin = "";
/** * @param args */ public static void main(String[] args) { int exTotal = 0; try { // Get root query results ArrayList<String> tasks = new ArrayList<String>(); ScreenScrape ss = new ScreenScrape(); String rootPage = ss.read(rootURL); while (rootPage.contains(taskBegin)) { rootPage = rootPage.substring(rootPage.indexOf(taskBegin) + taskBegin.length()); String title = rootPage.substring(0, rootPage.indexOf(taskEnd)); if (!title.contains("Category:")) { tasks.add(title); } rootPage = rootPage.substring(rootPage.indexOf(taskEnd)); } // Loop through each task and print count for (String task : tasks) { String title = task.replaceAll("'", "'"); String taskPage = ss.read(baseURL + title.replaceAll(" ", "_")); int exSubTot; if (taskPage.contains(exmplBegin)) { int startPos = taskPage.lastIndexOf(exmplBegin) + exmplBegin.length(); String countStr = taskPage.substring(startPos, taskPage.indexOf(exmplEnd, startPos)); exSubTot = Integer .parseInt(countStr.contains(".") ? countStr .substring(0, countStr.indexOf(".")) : countStr); } else { exSubTot = 0; while (taskPage.contains(editBegin)) { taskPage = taskPage.substring(taskPage .indexOf(editBegin) + editBegin.length()); exSubTot++; } } exTotal += exSubTot; System.out.println(title + ": " + exSubTot + " examples."); } // Print total System.out.println("\nTotal: " + exTotal + " examples."); } catch (Exception e) { System.out.println(title); System.out.println(startPos + ":" + taskPage.indexOf(exmplEnd, startPos)); System.out.println(taskPage); e.printStackTrace(System.out); } }
} </lang> ScreenScrape class
jq
jq does not duplicate the functionality of `curl` but works seamlessly with it, as illustrated by the following bash script. Note in particular the use of jq's `@uri` filter in the bash function `titles`.
<lang bash>#!/bin/bash
- Produce lines of the form: URI TITLE
function titles {
local uri="http://www.rosettacode.org/mw/api.php?action=query&list=categorymembers" uri+="&cmtitle=Category:Programming_Tasks&cmlimit=5000&format=json" curl -Ss "$uri" | jq -r '.query.categorymembers[] | .title | "\(@uri) \(.)"'
}
- Syntax: count URI
function count {
local uri="$1" curl -Ss "http://rosettacode.org/mw/index.php?title=${uri}&action=raw" | jq -R -n 'reduce (inputs|select(test("=={{header\\|"))) as $x(0; .+1)'
}
local n=0 i while read uri title do
i=$(count "$uri") echo "$title: $i examples." n=$((n + i))
done < <(titles) echo Total: $n examples.</lang>
- Output:
100 doors: 252 examples. 15 Puzzle Game: 36 examples. 2048: 24 examples. ... Order two numerical lists: 65 examples. Ordered Partitions: 28 examples. Ordered words: 85 examples. Palindrome detection: 136 examples. Total: 32416 examples.
Lasso
<lang Lasso>local(root = json_deserialize(curl('http://rosettacode.org/mw/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=10&format=json')->result)) local(tasks = array, title = string, urltitle = string, thiscount = 0, totalex = 0) with i in #root->find('query')->find('categorymembers') do => {^ #thiscount = 0 #title = #i->find('title') #urltitle = #i->find('title') #urltitle->replace(' ','_')
#title+': ' local(src = curl('http://rosettacode.org/mw/index.php?title='+#urltitle->asBytes->encodeurl+'&action=raw')->result->asString) #thiscount = (#src->split('==[[:Category:{PercentEncode Xr}
else
{Append &%|{PercentEncode Xr}
else
{Append &%]] [[Category:{PercentEncode Xr}
else
{Append &%]] Property "Implemented in language" (as page type) with input value "{PercentEncode Xr}</br> else</br> {Append &%" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.
end
end
end
fun {ToHex2 X}
[{ToHex1 X div 16} {ToHex1 X mod 16}]
end
fun {ToHex1 X}
if X >= 0 andthen X =< 9 then &0 + X
elseif X >= 10 andthen X =< 15 then &A + X - 10
end
end
in
{Main}</lang>
Example output:
100 doors: 86 examples. 24 game: 22 examples. 24 game/Solve: 15 examples. 99 Bottles of Beer: 108 examples. A+B: 59 examples. ... Xiaolin Wu's line algorithm: 5 examples. Y combinator: 29 examples. Yahoo! Search: 10 examples. Zig-zag matrix: 43 examples. Total: 14099 examples.
Perl
<lang Perl>use LWP::Simple;
my $site = "http://rosettacode.org"; my $list_url = "/mw/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml";
for (get("$site$list_url") =~ /cm.*?title="(.*?)"/g) {
(my $slug = $_) =~ tr/ /_/; my $count = () = get("$site/wiki/$slug") =~ /toclevel-1/g; print "$_: $count examples\n";
}</lang>
<lang Perl>use v5.10; use Mojo::UserAgent;
my $site = "http://rosettacode.org"; my $list_url = "/mw/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml";
my $ua = Mojo::UserAgent->new; $ua->get("$site$list_url")->res->dom->find('cm')->each(sub {
(my $slug = $_->{title}) =~ tr/ /_/; my $count = $ua->get("$site/wiki/$slug")->res->dom->find("#toc .toclevel-1")->size; say "$_->{title}: $count examples";
});</lang>
Perl 6
Retrieves counts for both Tasks and Draft Tasks. Save / Display results as a sortable wikitable rather than a static list. Click on a column header to sort on that column. To do a secondary sort, hold down the shift key and click on a second column header. Tasks have a gray (default) background, Draft Tasks have a yellow background. <lang perl6>use HTTP::UserAgent; use URI::Escape; use JSON::Fast;
class Progress-Bar {
has $.width = 40; has $.count is rw = 0; has @!bar = < ▏ ▎ ▍ ▌ ▋ ▊ ▉ █ >;
method inc { ($.count += 1) mod= $.width * 8; self.clear ~ @!bar.tail x $.count div 8 ~ @!bar[ $.count % 8 ] ~ ' ' x $.width - 1 - ($.count / 8).floor }
method clear { "\r" ~ ' ' x $.width ~ "\r" }
}
- Friendlier descriptions for task categories
my %cat = (
'Programming_Tasks' => 'Task', 'Draft_Programming_Tasks' => 'Draft'
);
my $client = HTTP::UserAgent.new;
my $url = 'http://rosettacode.org/mw';
my $hashfile = './RC_Task_count.json'; my $tablefile = './RC_Task_count.txt';
my %tasks;
- =begin update
note 'Retrieving task information...';
my $progress = Progress-Bar.new(width => 79);
for %cat.keys -> $cat {
mediawiki-query( $url, 'pages', :generator<categorymembers>, :gcmtitle("Category:$cat"), :gcmlimit<350>, :rawcontinue(), :prop<title> ).map({ my $page = $client.get("{ $url }/index.php?title={ uri-escape .<title> }&action=raw").content; my $count = +$page.comb(/ ^^'==' <-[\n=]>* '{{header|' \w+ \N+ '==' \h* $$ /); %tasks{.<title>} = {'cat' => %cat{$cat}, :$count}; print $progress.inc; })
}
print $progress.clear;
note "\nTask information saved to local file: {$hashfile.IO.absolute}"; $hashfile.IO.spurt(%tasks.&to-json);
- =end update
- Load information from local file
%tasks = $hashfile.IO.e ?? $hashfile.IO.slurp.&from-json !! ( );
- Convert saved task / author info to a table
note "\nBuilding table..."; my $count = +%tasks; my $taskcnt = +%tasks.grep: *.value.<cat> eq %cat<Programming_Tasks>; my $draftcnt = $count - $taskcnt; my $total = sum %tasks{*}»<count>;
- Dump table to a file
my $out = open($tablefile, :w) or die "$!\n";
- Add table boilerplate and caption
$out.say:
'
'{|class="wikitable sortable"', "\n", "|+ As of { Date.today } :: Tasks: { $taskcnt } :: Draft Tasks: ", "{ $draftcnt } :: Total Tasks: { $count } :: Total Examples: { $total }\n", "! Count !! Task !! Category"
- Sort tasks by count then add row
for %tasks.sort: { [-.value<count>, .key] } -> $task {
$out.say: ( $task.value<cat> eq 'Draft' ?? "|- style=\"background-color: #ffc\"\n" !! "|-\n" ), "| { $task.value<count> }\n", ( $task.key ~~ /\d/ ?? "|data-sort-value=\"{ $task.key.&naturally }\"| [[{uri-escape $task.key}|{$task.key}]]\n" !! "| [[{uri-escape $task.key}|{$task.key}]]\n" ), "| { $task.value<cat> }"
}
$out.say( "|}\n", '' );
$out.close;
note "Table file saved as: {$tablefile.IO.absolute}";
sub mediawiki-query ($site, $type, *%query) {
my $url = "$site/api.php?" ~ uri-query-string( :action<query>, :format<json>, :formatversion<2>, |%query); my $continue = ;
gather loop { my $response = $client.get("$url&$continue"); my $data = from-json($response.content); take $_ for $data.<query>.{$type}.values; $continue = uri-query-string |($data.<query-continue>{*}».hash.hash or last); }
}
sub uri-query-string (*%fields) { %fields.map({ "{.key}={uri-escape .value}" }).join("&") }
sub naturally ($a) { $a.lc.subst(/(\d+)/, ->$/ {0~(65+$0.chars).chr~$0},:g) } </lang>
- Output:
PicoLisp
<lang PicoLisp>(load "@lib/http.l")
(client "rosettacode.org" 80
"mw/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml"
(while (from " title=\"")
(let Task (till "\"")
(client "rosettacode.org" 80 (pack "wiki/" (replace Task " " "_"))
(let Cnt 0
(while (from "")
(unless (sub? "." (till "<" T))
(inc 'Cnt) ) )
(out NIL (prinl (ht:Pack Task) ": " Cnt)) ) ) ) ) )</lang>
Output (05may10):
100 doors: 79 24 game: 21 24 game/Solve: 15 99 Bottles of Beer: 95 A+B: 37 Abstract type: 29 ...
PureBasic
<lang PureBasic>Procedure handleError(value, msg.s)
If value = 0 MessageRequester("Error", msg) End EndIf
EndProcedure
handleError(InitNetwork(), "Unable to initialize network functions.") If OpenConsole()
Define url$, x1$, y1$, title$, unescapedTitle$, encodedURL$ Define x2, i, j, totalExamples, totalTasks url$ = "http://www.rosettacode.org/mw/api.php?action=query" + "&list=categorymembers&cmtitle=Category:Programming_Tasks" + "&cmlimit=500&format=xml" Repeat handleError(ReceiveHTTPFile(url$, "tasks.xml"), "Unable to access tasks URL.") handleError(ReadFile(0, "tasks.xml"), "Unable to read 'task.xml' file.") x1$ = ReadString(0) CloseFile(0) Repeat x2 = FindString(x1$, "title=", x2 + 1) If x2 title$ = Mid(x1$, x2 + 7, 99) title$ = Left(title$, FindString(title$, ">", 1) - 4) unescapedTitle$ = UnescapeString(ReplaceString(title$, "'", "'"), #PB_String_EscapeXML) encodedURL$ = URLEncoder("http://www.rosettacode.org/mw/index.php?title=" + unescapedTitle$ + "&action=raw") If ReceiveHTTPFile(encodedURL$, "task.xml") ReadFile(0, "task.xml") While Not Eof(0) y1$ = ReadString(0) If FindString(y1$, "=={{header|", 1, #PB_String_NoCase) totalExamples + 1 EndIf Wend CloseFile(0) PrintN(unescapedTitle$ +": " + Str(totalExamples) + " examples") totalTasks + totalExamples totalExamples = 0 EndIf EndIf Until x2 = 0 ;check for additional pages of tasks x2 = FindString(x1$, "cmcontinue=") If x2 i = FindString(x1$, #DQUOTE$, x2 + 1) j = FindString(x1$, #DQUOTE$, i + 1) url$ = URLEncoder("http://www.rosettacode.org/mw/api.php?action=query" + "&list=categorymembers&cmtitle=Category:Programming_Tasks" + "&cmlimit=500&format=xml&cmcontinue=" + Mid(x1$, i + 1, j - i)) Else Break ;all done EndIf ForEver PrintN("Total: " + Str(totalTasks) + " examples") Input() CloseConsole()
EndIf</lang> Sample output:
100 doors: 224 examples 24 game: 78 examples 24 game/Solve: 46 examples 9 billion names of God the integer: 33 examples 99 Bottles of Beer: 253 examples A+B: 187 examples ...... Zeckendorf arithmetic: 6 examples Zeckendorf number representation: 37 examples Zero to the zero power: 71 examples Zhang-Suen thinning algorithm: 18 examples Zig-zag matrix: 83 examples Total: 44140 examples
Python
<lang python>import urllib, xml.dom.minidom
x = urllib.urlopen("http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml")
tasks = [] for i in xml.dom.minidom.parseString(x.read()).getElementsByTagName("cm"):
t = i.getAttribute('title').replace(" ", "_") y = urllib.urlopen("http://www.rosettacode.org/w/index.php?title=%s&action=raw" % t.encode('utf-8')) tasks.append( y.read().lower().count("{{header|") ) print t.replace("_", " ") + ": %d examples." % tasks[-1]
print "\nTotal: %d examples." % sum(tasks)</lang>
R
<lang R> library(XML) library(RCurl) doc <- xmlInternalTreeParse("http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml") nodes <- getNodeSet(doc,"//cm") titles = as.character( sapply(nodes, xmlGetAttr, "title") ) headers <- list() counts <- list() for (i in 1:length(titles)){ headersi <- getURL( paste("http://rosettacode.org/mw/index.php?title=", gsub(" ", "_", titles[i]), "&action=raw", sep="") ) countsi <- strsplit(headersi,split=" ")1 countsi <- grep("\\{\\{header", countsi) cat(titles[i], ":", length(countsi), "examples\n") } cat("Total: ", length(unlist(counts)), "examples\n") </lang>
Racket
<lang racket>
- lang racket
(require net/url net/uri-codec json (only-in racket/dict [dict-ref ref]))
(define (RC-get verb params)
((compose1 get-pure-port string->url format) "http://rosettacode.org/mw/~a.php?~a" verb (alist->form-urlencoded params)))
(define (get-category catname)
(let loop ([c #f]) (define t ((compose1 read-json RC-get) 'api `([action . "query"] [format . "json"] [list . "categorymembers"] [cmtitle . ,(format "Category:~a" catname)] [cmcontinue . ,(and c (ref c 'cmcontinue))] [cmlimit . "500"]))) (define (c-m key) (ref (ref t key '()) 'categorymembers #f)) (append (for/list ([page (c-m 'query)]) (ref page 'title)) (cond [(c-m 'query-continue) => loop] [else '()]))))
(printf "Total: ~a\n"
(for/sum ([task (get-category 'Programming_Tasks)]) (define s ((compose1 length regexp-match-positions*) #rx"=={{" (RC-get 'index `([action . "raw"] [title . ,task])))) (printf "~a: ~a\n" task s) s))
</lang>
Ruby
First, a RosettaCode module, saved as rosettacode.rb: <lang ruby>require 'open-uri' require 'rexml/document'
module RosettaCode
URL_ROOT = "http://rosettacode.org/mw"
def self.get_url(page, query) begin # Ruby 1.9.2 pstr = URI.encode_www_form_component(page) qstr = URI.encode_www_form(query) rescue NoMethodError require 'cgi' pstr = CGI.escape(page) qstr = query.map {|k,v| "%s=%s" % [CGI.escape(k.to_s), CGI.escape(v.to_s)]}.join("&") end url = "#{URL_ROOT}/#{pstr}?#{qstr}" p url if $DEBUG url end
def self.get_api_url(query) get_url "api.php", query end
def self.category_members(category) query = { "action" => "query", "list" => "categorymembers", "cmtitle" => "Category:#{category}", "format" => "xml", "cmlimit" => 500, } while true url = get_api_url query doc = REXML::Document.new open(url)
REXML::XPath.each(doc, "//cm") do |task| yield task.attribute("title").value end
continue = REXML::XPath.first(doc, "//query-continue") break if continue.nil? cm = REXML::XPath.first(continue, "categorymembers") query["cmcontinue"] = cm.attribute("cmcontinue").value end end
end</lang>
Then, we implement the task with: <lang ruby>require 'rosettacode'
total_examples = 0
RosettaCode.category_members("Programming_Tasks") do |task|
url = RosettaCode.get_url("index.php", {"action" => "raw", "title" => task}) examples = open(url).read.scan("=={{header").length puts "#{task}: #{examples}" total_examples += examples
end
puts puts "Total: #{total_examples}"</lang>
Rust
<lang rust>extern crate reqwest; extern crate url; extern crate rustc_serialize;
use std::io::Read; use self::url::Url; use rustc_serialize::json::{self, Json};
pub struct Task {
page_id: u64, pub title: String,
}
- [derive(Debug)]
enum ParseError {
/// Something went wrong with the HTTP request to the API. Http(reqwest::Error),
/// There was a problem parsing the API response into JSON. Json(json::ParserError),
/// Unexpected JSON format from response UnexpectedFormat,
} impl From<json::ParserError> for ParseError {
fn from(error: json::ParserError) -> Self { ParseError::Json(error) }
}
impl From<reqwest::Error> for ParseError {
fn from(error: reqwest::Error) -> Self { ParseError::Http(error) }
}
fn construct_query_category(category: &str) -> Url {
let mut base_url = Url::parse("http://rosettacode.org/mw/api.php").unwrap(); let cat = format!("Category:{}", category); let query_pairs = vec![("action", "query"), ("format", "json"), ("list", "categorymembers"), ("cmlimit", "500"), ("cmtitle", &cat), ("continue", "")]; base_url.query_pairs_mut().extend_pairs(query_pairs.into_iter()); base_url
}
fn construct_query_task_content(task_id: &str) -> Url {
let mut base_url = Url::parse("http://rosettacode.org/mw/api.php").unwrap(); let mut query_pairs = vec![("action", "query"), ("format", "json"), ("prop", "revisions"), ("rvprop", "content")]; query_pairs.push(("pageids", task_id)); base_url.query_pairs_mut().extend_pairs(query_pairs.into_iter()); base_url
}
fn query_api(url: Url) -> Result<Json, ParseError> {
let mut response = try!(reqwest::get(url.as_str())); // Build JSON let mut body = String::new(); response.read_to_string(&mut body).unwrap();
Ok(try!(Json::from_str(&body)))
}
fn parse_all_tasks(reply: &Json) -> Result<Vec<Task>, ParseError> {
let json_to_task = |json: &Json| -> Result<Task, ParseError> { let page_id: u64 = try!(json.find("pageid") .and_then(|id| id.as_u64()) .ok_or(ParseError::UnexpectedFormat)); let title: &str = try!(json.find("title") .and_then(|title| title.as_string()) .ok_or(ParseError::UnexpectedFormat));
Ok(Task { page_id: page_id, title: title.to_owned(), }) }; let tasks_json = try!(reply.find_path(&["query", "categorymembers"]) .and_then(|tasks| tasks.as_array()) .ok_or(ParseError::UnexpectedFormat));
// Convert into own type tasks_json.iter().map(json_to_task).collect()
} fn count_number_examples(task: &Json, task_id: u64) -> Result<u32, ParseError> {
let revisions = try!(task.find_path(&["query", "pages", task_id.to_string().as_str(), "revisions"]) .and_then(|content| content.as_array()) .ok_or(ParseError::UnexpectedFormat)); let content = try!(revisions[0] .find("*") .and_then(|content| content.as_string()) .ok_or(ParseError::UnexpectedFormat)); Ok(content.split("=={{header").count() as u32)
}
pub fn query_all_tasks() -> Vec<Task> {
let query = construct_query_category("Programming_Tasks"); let json: Json = query_api(query).unwrap(); parse_all_tasks(&json).unwrap()
}
pub fn query_a_task(task: &Task) -> u32 {
let query = construct_query_task_content(&task.page_id.to_string()); let json: Json = query_api(query).unwrap(); count_number_examples(&json, task.page_id).unwrap()
}</lang>
The function is then run using the following: <lang rust> extern crate count_examples; fn main() {
let all_tasks = count_examples::query_all_tasks(); for task in &all_tasks { let count = count_examples::query_a_task(task); println!("Task: {} has {} examples", task.title, count); }
}</lang>
Run BASIC
<lang runbasic>html "
"a$ = httpGet$("http://rosettacode.org/wiki/Category:Programming_Tasks")
a$ = word$(a$,1,"Num | Task | Examples |
")
i = instr(a$,"<a href=""/wiki/") i = instr(a$,"<a href=""/wiki/",i+1) while i > 0
count = count + 1 i = instr(a$,"<a href=""/wiki/",i+1) j = instr(a$,">",i+5) a1$ = mid$(a$,i+15,j-i) taskId$ = word$(a1$,1,"""") task$ = word$(a1$,3,"""") url$ = "http://rosettacode.org/wiki/";taskId$ a2$ = httpGet$(url$) ii = instr(a2$,"") jj = 0 while ii > 0 jj = ii ii = instr(a2$,"",ii+10) wend if jj = 0 then examp = 0 else kk = instr(a2$,"<",jj+24) examp = int(val(mid$(a2$,jj+24,kk-jj-24))) end if
html "";count;"";task$;"";examp;""
totExamp = totExamp + examp
wend
html "**** Total **";totExamp;""
end</lang>
Num | Task | Examples |
1 | 100 doors | 165 |
2 | 24 game | 56 |
3 | 24 game/Solve | 34 |
4 | 99 Bottles of Beer | 192 |
5 | A+B | 129 |
6 | Abstract type | 51 |
7 | Accumulator factory | 65 |
8 | Ackermann function | 132 |
9 | Active Directory/Connect | 13 |
10 | Active Directory/Search for a user | 13 |
11 | Active object | 22 |
12 | Add a variable to a class instance at runtime | 37 |
... | ... | ... |
655 | Y combinator | 53 |
656 | Yahoo! search interface | 16 |
657 | Yin and yang | 38 |
658 | Zebra puzzle | 12 |
659 | Zeckendorf number representation | 18 |
660 | Zig-zag matrix | 65 |
** | ** Total ** | 28611 |
Scala
<lang Scala>import scala.language.postfixOps
object TaskCount extends App {
import java.net.{ URL, URLEncoder } import scala.io.Source.fromURL
System.setProperty("http.agent", "*") val allTasksURL = "http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml" val allTasks = xml.parsing.XhtmlParser(fromURL(new URL(allTasksURL)))
val regexExpr = "(?i)==\\{\\{header\\|".r
def oneTaskURL(title: String) = { println(s"Check $title") "http://www.rosettacode.org/w/index.php?title=%s&action=raw" format URLEncoder.encode(title.replace(' ', '_'), "UTF-8") }
def count(title: String) = regexExpr findAllIn fromURL(new URL(oneTaskURL(title)))(io.Codec.UTF8).mkString length
val counts = for (task <- allTasks \\ "cm" \\ "@title" map (_.text)) yield scala.actors.Futures.future((task, count(task)))
counts map (_.apply) map Function.tupled("%s: %d examples." format (_, _)) foreach println println("\nTotal: %d examples." format (counts map (_.apply._2) sum))
}</lang>
Sidef
<lang ruby>var lwp = require('LWP::UserAgent').new(agent => 'Mozilla/5.0');
var site = 'http://rosettacode.org'; var list_url = '/mw/api.php?action=query&list=categorymembers&'+
'cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml';
var content = lwp.get(site + list_url).decoded_content;
while (var m = content.match(/cm.*?title="(.*?)"/g)) {
(var slug = m[0]).gsub!(' ', '_'); var count = lwp.get("#{site}/wiki/#{slug}").decoded_content.count(/toclevel-1/g); say "#{m[0]}: #{count} examples";
}</lang>
- Output:
100 doors: 2180 examples 24 game: 760 examples 24 game/Solve: 450 examples 9 billion names of God the integer: 320 examples 99 Bottles of Beer: 2330 examples A+B: 1800 examples ABC Problem: 720 examples Abstract type: 680 examples ...
Tcl
<lang tcl>package require Tcl 8.5 package require http package require json
fconfigure stdout -buffering none
proc get_tasks {category} {
set start [clock milliseconds] puts -nonewline "getting $category members..." set base_url http://www.rosettacode.org/w/api.php set query {action query list categorymembers cmtitle Category:%s format json cmlimit 500} set this_query [dict create {*}[split [format $query $category]]] set tasks [list]
while {1} { set url [join [list $base_url [http::formatQuery {*}$this_query]] ?] set response [http::geturl $url] if {[set s [http::status $response]] ne "ok" || [http::ncode $response] != 200} { error "Oops: url=$url\nstatus=$s\nhttp code=[http::code $response]" } set data [json::json2dict [http::data $response]] http::cleanup $response # add tasks to list foreach task [dict get $data query categorymembers] { lappend tasks [dict get [dict create {*}$task] title] } if {[catch {dict get $data query-continue categorymembers cmcontinue} continue_task] != 0} { # no more continuations, we're done break } dict set this_query cmcontinue $continue_task } puts " found [llength $tasks] tasks in [expr {[clock milliseconds] - $start}] milliseconds" return $tasks
}
- This proc can be replaced by a single regexp command:
- set count [regexp -all "***=$needle" $haystack]
- However this proc is more efficient -- we're dealing with plain strings only.
proc count_substrings {needle haystack} {
set count 0 set idx 0 while {[set idx [string first $needle $haystack $idx]] != -1} { incr count incr idx } return $count
}
set total 0 foreach task [get_tasks Programming_Tasks] {
set url [format "http://www.rosettacode.org/w/index.php?title=%s&action=raw" [string map {{ } _} $task]] set response [http::geturl $url] if {[set s [http::status $response]] ne "ok" || [http::ncode $response] != 200} { error "Oops: url=$url\nstatus=$s\nhttp code=[http::code $response]" } set count [count_substrings "\{\{header|" [http::data $response]] puts [format "%3d examples in %s" $count $task] http::cleanup $response incr total $count
}
puts "\nTotal: $total examples"</lang>
TUSCRIPT
<lang tuscript>$$ MODE TUSCRIPT url="http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml" data=REQUEST (url)
BUILD S_TABLE beg=* DATA :title=": BUILD S_TABLE end=* DATA :":
titles=EXTRACT (data,beg|,end,1,0,"~~") titles=SPLIT (titles,":~~:") sz_titles=SIZE (titles)
BUILD R_TABLE header=":==\{\{header|:" all=*
ERROR/STOP CREATE ("tasks",seq-e,-std-)
COMPILE LOOP title=titles ask=* ask =SET_VALUE(ask,"title",title) ask =SET_VALUE(ask,"action","raw") ask =ENCODE (ask,cgi) http ="http://www.rosettacode.org/mw/index.php" url =CONCAT (http,"?",ask) data =REQUEST (url) header =FILTER_INDEX (data,header,-) sz_header=SIZE(header) line =CONCAT (title,"=",sz_header," members") FILE "tasks" = line all =APPEND(all,sz_header) ENDLOOP
ENDCOMPILE all =JOIN(all),sum=SUM(all),time=time() line=CONCAT (time,": ", sz_titles, " Programing Tasks: ", sum, " solutions")
FILE "tasks" = line </lang> Output in file "tasks":
100 doors=104 members 24 game=27 members 24 game/Solve=21 members 99 Bottles of Beer=124 members A+B=76 members Abstract type=35 members Accumulator factory=44 members ... XML/Input=39 members XML/Output=32 members XML/XPath=24 members Xiaolin Wu's line algorithm=0 members Y combinator=33 members Yahoo! search interface=10 members Zig-zag matrix=46 members 2011-01-15 03:41:30: 455 Programing Tasks: 16009 solutions
zkl
Uses shared libraries YAJL and cURL and handles "continue" responses. <lang zkl>var [const] YAJL=Import("zklYAJL")[0], CURL=Import("zklCurl");
fcn getTasks(language){
continueValue,tasks:="",Data(0,String); // "nm\0nm\0...." do{ page:=CURL().get(("http://rosettacode.org/mw/api.php?" "action=query&cmlimit=500"
"&format=json" "&list=categorymembers" "&cmtitle=Category:%s" "&cmcontinue=%s").fmt(language,continueValue));
page=page[0].del(0,page[1]); // get rid of HTML header json:=YAJL().write(page).close(); json["query"]["categorymembers"].pump(tasks,T("get","title")); continueValue=json.find("continue") //continue:-||,cmcontinue:page|954|19) .toList().apply("concat","=").concat("&"); }while(continueValue); tasks
} re:=RegExp(0'!\s+==\s*{{\s*header\s*|!); // == {{ header | zkl foreach task in (getTasks("Programming_Tasks")){
page:=CURL().get( "http://www.rosettacode.org/mw/index.php?title=%s&action=raw" .fmt(CURL.urlEncode(task))); page=page[0].del(0,page[1]); // get rid of HTML header cnt,n:=0,0; while(re.search(page,True,n)){ cnt+=1; n=re.matched[0].sum(0); } "%4d: %s".fmt(cnt,task).println();
}</lang>
- Output:
229: 100 doors 15: 15 Puzzle Game ... 257: 99 Bottles of Beer 199: A+B ... 28: Calendar - for "REAL" programmers ... 9: Stream Merge ... 78: Zero to the zero power 19: Zhang-Suen thinning algorithm 83: Zig-zag matrix
- Programming Tasks
- Rosetta Code related
- Ada
- AWS
- AutoHotkey
- BBC BASIC
- Bracmat
- C sharp
- Clojure
- D
- EGL
- Erlang
- Xmerl
- F Sharp
- Factor
- Go
- Haskell
- HTTP XML
- Unicon
- ",tab(find("
- Icon Programming Library
- J
- Java
- Jq
- Lasso
- Perl
- Mojolicious
- Perl 6
- PicoLisp
- PureBasic
- Python
- R
- XML (R)
- RCurl
- Racket
- Ruby
- REXML
- Rust
- Run BASIC
- Scala
- Sidef
- Tcl
- Tcllib
- TUSCRIPT
- Zkl
- Batch File/Omit
- Brainf***/Omit
- Brlcad/Omit
- GUISS/Omit
- Lilypond/Omit
- Maxima/Omit
- Openscad/Omit
- PostScript/Omit
- TI-83 BASIC/Omit
- TI-89 BASIC/Omit
- Yorick/Omit
- ZX Spectrum Basic/Omit