// timeout on client side static long smartBot_autoComplete_defaultHardTimeout = 5000; static int smartBot_autoComplete_defaultMaxEntries = 10; static L<S> smartBot_autoComplete(S s) { L<Map> l = jsonDecodeList(loadPageWithTimeout("http://smartbot.botcompany.de/autocomplete/" + urlencode(s) + "?n=" + smartBot_autoComplete_defaultMaxEntries, smartBot_autoComplete_defaultHardTimeout)); new L<S> out; for (Map map : l) { S follow = getString(map, "follow"); if (nempty(follow)) continue with out.add(s + follow); S whole = getString(map, "whole"); if (nempty(whole)) out.add(whole); } ret out; }
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: | #1012993 |
| Snippet name: | smartBot_autoComplete - queries live from bot |
| Eternal ID of this version: | #1012993/3 |
| Text MD5: | b2a2d321d15df2080e971637e6b75249 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-12-19 18:04:11 |
| Source code size: | 636 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 622 / 681 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |