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
| ID | Author/Program | Comment | Date |
|---|---|---|---|
| 212 | #1000604 (pitcher) | 2015-08-18 00:51:17 | |
| 197 | #1000610 (pitcher) | Edit suggestion: !636 !629 main { static Object androidContext; static String programID; public static void main(String[] args) throws Exception { 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) }} | 2015-08-18 00:50:43 |
| 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: | 3131 / 650 |
| Referenced in: | [show references] |