function loadDKJSON(sID) local env = setmetatable({}, {__index=function(o, k) return _G[k] end }) return assert(loadSnippet(sID, env))() end json = loadDKJSON('#44') allSnippets = json.decode(getSnippet('#76')) env = setmetatable({}, {__index=function(o, k) return _G[k] end }) env.snippets = allSnippets -- input is passed on automatically engine = loadSnippet('#45', env) -- the search engine result = engine() print(tostring(#result)..' result(s)') for _, s in ipairs(result) do print('#'..tostring(s.id)..' '..s.name) end return json.encode(result)
test run test run with input download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
2 comment(s) hidden. show
Recognizer | Recognition Result | Visualize | Recalc |
---|---|---|---|
#308 | 585 | [visualize] |
Snippet ID: | #78 |
Snippet name: | Search engine test |
Eternal ID of this version: | #78/1 |
Text MD5: | a44c4ad369d4cd539435979eeeba8556 |
Author: | stefan |
Category: | searching |
Type: | Lua code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2014-01-03 19:33:20 |
Source code size: | 585 bytes / 22 lines |
Pitched / IR pitched: | Yes / Yes |
Views / Downloads: | 2548 / 527 |
Referenced in: | [show references] |