Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

38
LINES

< > BotCompany Repo | #1008705 // Hyperlink+explain standard functions etc. in JavaX source [LIVE web bot]

JavaX source code (desktop) [tags: butter use-pretranspiled] - run with: x30.jar - homepage

Download Jar. Libraryless. Click here for Pure Java version (20266L/129K).

1  
!7
2  
3  
static Set<S> tooComplicatedSnippets = lithashset(#1006654);
4  
5  
static JavaXHyperlinker hyperlinker;
6  
7  
p {
8  
  hyperlinker = new JavaXHyperlinker;
9  
  tb_mainServer_override = if0_const("https://code.botcompany.de:9898");
10  
  pcall { // historic port used by show-snippet.php
11  
    serveHttp(7777);
12  
  }
13  
}
14  
15  
html {
16  
  try {
17  
    ret html2(uri, params);
18  
  } catch print e {
19  
    ret stackTraceToString(e);
20  
  }
21  
}
22  
23  
sS html2(S uri, SS params) {
24  
  print(+uri);
25  
  uri = dropPrefix("/", uri);
26  
  bool real = uri.startsWith("real/");
27  
  if (real) uri = dropPrefix("real/", uri);
28  
  S snippetID = #1007528;
29  
  if (isSnippetID(uri)) snippetID = fsI(uri);
30  
  
31  
  if (contains(tooComplicatedSnippets, snippetID)) ret ""; //fail("too complicated");
32  
  
33  
  S code = loadSnippet(snippetID);
34  
  
35  
  S html = hyperlinker.codeToHTML(code, real);
36  
  if (real) ret html;
37  
  ret h3_title("Snippet " + snippetID) + hpre(html);
38  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, iveijnkanddl, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1008705
Snippet name: Hyperlink+explain standard functions etc. in JavaX source [LIVE web bot]
Eternal ID of this version: #1008705/181
Text MD5: c0930cfa5b83894459c8198e3ec572d1
Transpilation MD5: 29d85c52ccc0514fb7d358971b7f0429
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-01-22 22:17:49
Source code size: 919 bytes / 38 lines
Pitched / IR pitched: No / No
Views / Downloads: 1300 / 38420
Version history: 180 change(s)
Referenced in: [show references]