Talk:Rosetta Code/Count examples

From Rosetta Code

The method of counting header template uses may still give an incorrect count of programming examples, but I think it's as close as we can get without getting unreasonably complex. For instance, we could count the number of start lang tags, but some examples use pre and some more still have one example split into sections with explanations. The method used for this task does not account for iterative and recursive solutions for one task, or splits like on the String Length page. What we end up with for the total across all tasks is the same as counting the members in each language category and subtracting the language implementations (which seems more complicated). --Mwn3d 19:30, 9 February 2009 (UTC)

Count ===(.*)===[edit]

We can count anything under "triple equals" but it will duplicate results. Like:

1. Python
 1.1. A
 1.2. B

Will count 3, not 2.

Other solution is count only "triple equals" in articles with them. But some tasks like HTTP Request have only one multiple solution tasks, That will count only Erlang.

A complex solution, will be read all sections, but will take a long time, and will be buggy.

Traceback for problem with Python version[edit]

Traceback (most recent call last):
  File "", line 8, in <module>
    y = urllib.urlopen("" % t)
  File "d:\Python26\lib\", line 87, in urlopen
  File "d:\Python26\lib\", line 178, in open
    fullurl = unwrap(toBytes(fullurl))
  File "d:\Python26\lib\", line 1028, in toBytes
    " contains non-ASCII characters")
UnicodeError: URL u'\u2013Clark_subdivision_s
urface&action=raw' contains non-ASCII characters

cmlimit may not be over 500 for users[edit]

Attempts to read more than 500 tasks using the XML query fail with this error. Everybody seems to have used this method (rather than downloading the HTML page for example) so presumably it's not considered to be incorrect. RichardRussell 12:29, 17 November 2012 (UTC)

Nevertheless I have modified the BBC BASIC solution to read the full set of tasks. RichardRussell 12:14, 21 November 2012 (UTC)