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

19
LINES

< > BotCompany Repo | #1016201 // snippetTypeName

JavaX fragment (include)

scope snippetTypeName.

static S #data = [[
    <option value='0' selected>[0] ?</option><option value='80'>[80] New Tinybrain snippet</option><option value='50'>[50] Microtheory</option><option value='100'>[100] Document</option><option value='52'>[52] User-supplied dialog</option><option value='34'>[34] JavaX source code</option><option value='42'>[42] JavaX fragment (include)</option><option value='55' selected>[55] JavaX source code (desktop)</option><option value='57'>[57] JavaX source code (Dynamic Module)</option><option value='43'>[43] JavaX (incomplete)</option><option value='38'>[38] JavaX translator</option><option value='40'>[40] JavaX source code (Android)</option><option value='54'>[54] JavaX module</option><option value='47'>[47] JavaX General Test Case</option><option value='39'>[39] JavaX (input.txt to output.txt)</option><option value='44'>[44] JavaX (snippet commenter)</option><option value='41'>[41] IOIOI</option><option value='45'>[45] Question</option><option value='48'>[48] Natural language</option><option value='81'>[81] Space for snippets</option><option value='101'>[101] Task description</option><option value='51'>[51] Simplified Natural Language</option><option value='7'>[7] Lua code</option><option value='26'>[26] Lua code - Image recognition</option><option value='12'>[12] Lua code - Image</option><option value='28'>[28] Lua code - Visualizer</option><option value='30'>[30] Lua code - Image transformer</option><option value='8'>[8] Lua code - Chat-bot</option><option value='9'>[9] Lua code - Test case</option><option value='13'>[13] Lua code - Animation</option><option value='14'>[14] Lua code - GUI</option><option value='17'>[17] Lua code - System test</option><option value='18'>[18] Lua code - Service bot</option><option value='19'>[19] Lua code - Suggester</option><option value='27'>[27] Lua code - Snippet commenter</option><option value='29'>[29] Lua code - Snippet producer</option><option value='31'>[31] Lua code - Image distinction (learner)</option><option value='32'>[32] Lua code - Image distinction (executor)</option><option value='33'>[33] Lua code - Snippet-to-snippet</option><option value='24'>[24] Java GUI source (Text2GUI/Janino)</option><option value='21'>[21] Java source code</option><option value='25'>[25] Java image recognition code</option><option value='22'>[22] Pseudo code</option><option value='35'>[35] HTML</option><option value='23'>[23] Image</option><option value='20'>[20] Run Log</option><option value='46'>[46] Information</option><option value='37'>[37] Data</option><option value='1'>[1] TB declarations</option><option value='2'>[2] TB test case</option><option value='3'>[3] Comment</option><option value='4'>[4] Run report</option><option value='5'>[5] Source file</option><option value='6'>[6] TB solution tree</option><option value='16'>[16] Input/output example</option><option value='11'>[11] Object</option><option value='102'>[102] Directory</option><option value='103'>[103] Snippet type</option><option value='104'>[104] Image recognition task</option><option value='49'>[49] Blog post</option><option value='53'>[53] AI Concepts</option><option value='56'>[56] AI Drawing</option>    </select></div></td>
]];

static Map<Int, S> #map;

static S snippetTypeName(int type) {
  if (map == null)
    map = mapKeys(f parseInt, pairsToMap(map listToPair(regexpAllGroups(">\\[(\\d+)\\] ([^>]+)<", data))));
  ret map.get(type);
}

/*static S snippetTypeName(S type) {
  ret snippetTypeName(parseIntOpt(type));
}*/

end scope

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: #1016201
Snippet name: snippetTypeName
Eternal ID of this version: #1016201/6
Text MD5: 6b08c350d50f707a3366ee21281ec6ac
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-10 15:09:14
Source code size: 3549 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 365 / 386
Version history: 5 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)