Libraryless. Click here for Pure Java version (17129L/123K).
1 | !7 |
2 | |
3 | set flag DynModule. |
4 | |
5 | sclass QSFunction extends DynBigNumber { |
6 | InputChooser inputChooser = new(this); |
7 | |
8 | visualize { ret northAndCenter(wrap(inputChooser), super.visualize()); } |
9 | void update { if (inputChooser.update()) update(inputChooser.input()); } |
10 | |
11 | start { |
12 | loadFunctions_preferDiskCache(); |
13 | hotwire_copyOver_after.add(f shareMyCreatorWith); |
14 | doEvery(10000, r { update(inputChooser.input()) }); |
15 | } |
16 | |
17 | void update(S input) { |
18 | temp enter(); |
19 | |
20 | S sf = null; |
21 | for (S word : words(input)) |
22 | if ((sf = or(mechMapCI("Word => Function").get(word), sf)) != null) break; |
23 | if (sf != null) input = sf; |
24 | |
25 | S f = firstContainedInSet(words(input), mechSet("Safe & fast JavaX functions")); |
26 | |
27 | if (f != null) pcall { |
28 | if (neq(getDescription(), f)) dm_showModule_noFocus(); |
29 | S value = or2(strOrNull(callAndMake(f)), "-"); |
30 | setDescription(f); |
31 | setValue(value); |
32 | } |
33 | } |
34 | } |
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017220 |
Snippet name: | Quick & Safe Standard Function As Big Text [Dyn Module] |
Eternal ID of this version: | #1017220/11 |
Text MD5: | 46ea958b77e1420840eb606b5e2f84c3 |
Transpilation MD5: | 4b64479d16789cff706278c9796ad8e3 |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-07-14 22:13:44 |
Source code size: | 968 bytes / 34 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 437 / 757 |
Version history: | 10 change(s) |
Referenced in: | [show references] |