Download Jar. Libraryless. Click here for Pure Java version (7067L/50K).
1 | !7 |
2 | |
3 | sS snippetX = #1008998, snippetY = #1011975; |
4 | |
5 | p {
|
6 | S textY = loadSnippet(snippetY); |
7 | |
8 | L<SnippetVersion> l = textChangesOfSnippet(snippetX); |
9 | l.add(0, nu(SnippetVersion, date := "Now", previousValue := loadSnippet(snippetX))); |
10 | new Lowest<SnippetVersion> best; |
11 | for (SnippetVersion v : l) |
12 | best.put(v, countLines(unidiff(v.previousValue, textY))); |
13 | print("Version of " + snippetX + " closest to " + snippetY + " was changed at: " + best->date + " (version " + best->versionID + ", " + n(indexOf(l, best!), "change") + " ago)");
|
14 | print(); |
15 | //print(best->previousValue); |
16 | } |
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: | 852 / 2013 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |