sqliteconnect #mem, ":memory:" ' make memory DB #mem execute("CREATE TABLE stats(lang,cnt)") a$ = httpGet$("http://rosettacode.org/wiki/Category:Programming_Languages") aa$ = httpGet$("http://www.rosettacode.org/mw/index.php?title=Special:Categories&limit=5000") i = instr(a$,"/wiki/Category:") while i > 0 and lang$ <> "Languages" j = instr(a$,"""",i) lang$ = mid$(a$,i+15,j - i-15) ii = instr(aa$,"Category:";lang$;"""") jj = instr(aa$,"(",ii) kk = instr(aa$," ",jj+1) if ii = 0 then cnt = 0 else cnt = val(mid$(aa$,jj+1,kk-jj)) k = instr(lang$,"%") ' convert hex values to characters while k > 0 lang$ = left$(lang$,k-1) + chr$(hexdec(mid$(lang$,k+1,2))) + mid$(lang$,k+3) k = instr(lang$,"%") wend #mem execute("insert into stats values ('";lang$;"',";cnt;")") i = instr(a$,"/wiki/Category:",i+10) wend html "" #mem execute("SELECT * FROM stats ORDER BY cnt desc") ' order list by count descending WHILE #mem hasanswer() #row = #mem #nextrow() rank = rank + 1 html "" WEND html "
";rank;"";#row lang$();"";#row cnt();"
"