Rosetta Code/Count examples: Difference between revisions
Content added Content deleted
m (Added Sidef) |
|||
Line 1,201: | Line 1,201: | ||
Total: 919 examples. |
Total: 919 examples. |
||
</pre> |
</pre> |
||
=={{header|LiveCode}}== |
|||
1. Add a button to a stack, put the following into the mouseUp |
|||
2. Add a text field called "tasks" |
|||
n.b. The list of tasks is limited to 10<lang LiveCode>on mouseUp |
|||
put empty into fld "taskurls" |
|||
put URL "http://rosettacode.org/mw/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=10&format=xml" into fld "apixml" |
|||
put revXMLCreateTree(field "apixml",true,true,false) into pDocID |
|||
put "/api/query/categorymembers/cm" into pXPathExpression |
|||
repeat for each line xmlnode in revXMLEvaluateXPath(pDocID, pXPathExpression) |
|||
put revXMLAttribute(pDocID,xmlnode,"title") into pgTitle |
|||
put revXMLAttribute(pDocID,xmlnode,"pageid") into pageId |
|||
put "http://www.rosettacode.org/w/index.php?title=" & urlEncode(pgTitle) & "&action=raw" into taskURL |
|||
put URL taskURL into taskPage |
|||
filter lines of taskPage with "=={{header|*" |
|||
put the number of lines of taskPage into taskTotal |
|||
put pgTitle & comma & taskTotal & cr after fld "tasks" |
|||
add taskTotal to allTaskTotal |
|||
end repeat |
|||
put "Total" & comma & allTaskTotal after fld "tasks" |
|||
end mouseUp</lang> |
|||
=={{header|Mathematica}}== |
=={{header|Mathematica}}== |