Download Jar. Libraryless. Click here for Pure Java version (7067L/50K).
!7 sS snippetX = #1008998, snippetY = #1011975; p { S textY = loadSnippet(snippetY); L<SnippetVersion> l = textChangesOfSnippet(snippetX); l.add(0, nu(SnippetVersion, date := "Now", previousValue := loadSnippet(snippetX))); new Lowest<SnippetVersion> best; for (SnippetVersion v : l) best.put(v, countLines(unidiff(v.previousValue, textY))); print("Version of " + snippetX + " closest to " + snippetY + " was changed at: " + best->date + " (version " + best->versionID + ", " + n(indexOf(l, best!), "change") + " ago)"); print(); //print(best->previousValue); }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1012253 |
| Snippet name: | Find version of snippet X closest to current snippet Y (OK) |
| Eternal ID of this version: | #1012253/5 |
| Text MD5: | bd7602bae150f2ab79457e5be68674ef |
| Transpilation MD5: | 6fe66459798a05c326345453e137d0c0 |
| Author: | stefan |
| Category: | javax / snippets |
| Type: | JavaX source code (desktop) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-11-26 14:41:25 |
| Source code size: | 601 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 739 / 1739 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |