Transpiled version (6456L) is out of date.
1 | // default mode = "quick" |
2 | static Pair<Bool, S> transpileOnServer(S snippetID) { |
3 | ret transpileOnServer(snippetID, "quick"); |
4 | } |
5 | |
6 | static Pair<Bool, S> transpileOnServer(long snippetID) { |
7 | ret transpileOnServer(fsI(snippetID)); |
8 | } |
9 | |
10 | static Pair<Bool, S> transpileOnServer(long snippetID, S mode) { |
11 | ret transpileOnServer(fsI(snippetID), mode); |
12 | } |
13 | |
14 | // mode = "quick", "medium", "fresh" |
15 | // result = pair(ok, answer) |
16 | static Pair<Bool, S> transpileOnServer(S snippetID, S mode) ctex { |
17 | print("Transpiling " + formatSnippetID(snippetID)); |
18 | |
19 | S url = tb_mainServer() + "/tb/transpile.php"; |
20 | S modeStr = "&quick=1"; |
21 | if (eq(mode, "medium")) modeStr += "&medium=1"; |
22 | if (eq(mode, "fresh")) modeStr += "&fresh=1"; |
23 | S query = "id=" + parseSnippetID(snippetID) + modeStr + standardCredentials(); |
24 | S result = loadPage(url + "?" + query); |
25 | print(result); |
26 | |
27 | Matcher m = regexp("URL=/(dexcompile\\.php.*?)'", result); |
28 | if (!m.find()) |
29 | ret pair(false, result); |
30 | |
31 | url = tb_mainServer() + "/" + m.group(1) + standardCredentials(); |
32 | result = loadPage(url); |
33 | bool ok = result.contains("SUCCESS"); |
34 | ret pair(ok, result); |
35 | } |
Began life as a copy of #1000904
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1004306 |
Snippet name: | transpileOnServer - DON'T use anymore. Use transpileOnNewServer |
Eternal ID of this version: | #1004306/7 |
Text MD5: | 55307bf71b1f0e2fea6499c3ff2581d0 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-06-11 01:39:21 |
Source code size: | 1153 bytes / 35 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 652 / 728 |
Version history: | 6 change(s) |
Referenced in: | [show references] |