1 | get("#349") -- table functions
|
2 | |
3 | -- without bridge stuff & invalidated |
4 | function printShortenedReferenceTree(id, indent, seen, result) |
5 | if seen[id] then |
6 | table.insert(result, indent..id.." (see above)") |
7 | else |
8 | title = getSnippetTitle(id) |
9 | if not (title:find("^Need bridge ") or title:find("^A bridge ") or title:find("^A master bridge ") or hasNTTitle("Invalidate "..id)) then
|
10 | table.insert(result, indent..id.. " - "..title) |
11 | seen[id] = true |
12 | |
13 | local refs = getTitleReferences(id) |
14 | --print("Refs: "..tableToString(refs))
|
15 | for r in all(refs) do |
16 | printShortenedReferenceTree(r, indent.." ", seen, result) |
17 | end |
18 | end |
19 | end |
20 | end |
Began life as a copy of #536
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 | |
|---|---|---|---|---|
| 856 | #1000610 | Edit suggestion: !636 !629 main { static Object androidContext; static String programID; public static void main(String[] args) throws Exception { get("#349") -- table functions -- without bridge stuff & invalidated function printShortenedReferenceTree(id, indent, seen, result) if seen[id] then table.insert(result, indent..id.." (see above)") else title = getSnippetTitle(id) if not (title:find("^Need bridge ") or title:find("^A bridge ") or title:find("^A master bridge ") or hasNTTitle("Invalidate "..id)) then table.insert(result, indent..id.. " - "..title) seen[id] = true local refs = getTitleReferences(id) --print("Refs: "..tableToString(refs)) for r in all(refs) do printShortenedReferenceTree(r, indent.." ", seen, result) end end end end }} | 2015-08-19 22:48:10 | delete |
| 798 | #1000604 (pitcher) | 2015-08-20 15:28:24 |
| Snippet ID: | #537 |
| Snippet name: | printShortenedReferenceTree |
| Eternal ID of this version: | #537/1 |
| Text MD5: | 39af984a29aa73b8c8c1af8a99143fcf |
| Author: | stefan |
| Category: | |
| Type: | Lua code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-03-15 04:25:04 |
| Source code size: | 699 bytes / 20 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 1983 / 327 |
| Referenced in: | [show references] |