Jump to content

Rosetta Code/Tasks without examples: Difference between revisions

julia example
m (added whitespace and bullets for the task requirements.)
(julia example)
Line 337:
}
}</lang>
 
=={{header|Julia}}==
<trans|Go}}
<lang julia>using HTTP
 
function gettaskdescriptions(numtoprint = 3)
tasks = String[]
page = "http://rosettacode.org/wiki/Category:Programming_Tasks"
body = String(HTTP.get(page).body)
for m in eachmatch(r"<li><a href=\"/wiki/([^\"]+)\"", body)
push!(tasks, m.captures[1])
end
base = "http://rosettacode.org/wiki/"
for (i, task) in enumerate(tasks)
page = base * task
body = String(HTTP.get(page).body)
m = match(r"using any language you may know.</div>(.+)<div id=\"toc\""s, body)
m != nothing && println(m.captures[1], "\n", "="^80, "\n")
i >= numtoprint && break
sleep(rand(3:7)) # wait 5 +/- 2 seconds before processing next task
end
end
 
gettaskdescriptions()
<lang>
 
=={{header|Kotlin}}==
4,105

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.