static S parseSnippetType_defs1 = [[ define('SN_DECLS', 1); define('SN_TESTCASE', 2); define('SN_COMMENT', 3); define('SN_RUNREPORT', 4); # report after running a test case define('SN_SOURCE', 5); # uploaded source file (Java or other) define('SN_SOLUTION', 6); # solution tree define('SN_LUA', 7); # Lua code (solutions have this type too) define('SN_LUA_CHATBOT', 8); # A Lua chat-bot define('SN_LUA_TESTCASE', 9); # A test case in Lua #define('SN_LUA_SOLUTION', 10); # A text-to-text solution in Lua (now integrated as plain SN_LUA) define('SN_OBJECT', 11); # An object define('SN_LUA_IMAGE', 12); define('SN_LUA_ANIMATION', 13); # Image plus (optional) animation define('SN_LUA_GUI', 14); # Animation plus keyboard+mouse events define('SN_COMMENT', 15); # A comment on another snippet define('SN_INOUTEXAMPLE', 16); # A conversion example with input+output define('SN_LUA_SYSTEMTEST', 17); # A free-standing test case (not requiring a solution snippet) define('SN_LUA_SERVICEBOT', 18); # A bot in the group chat define('SN_LUA_SUGGESTER', 19); # A suggester for editing snippets define('SN_RUNLOG', 20); define('SN_JAVA', 21); # Java source code define('SN_PSEUDOCODE', 22); define('SN_IMAGE', 23); # An image stored as a blob define('SN_T2G_GUICODE', 24); # Janino code for Text2GUI define('SN_JAVA_IR', 25); # Java image recognition script define('SN_LUA_IR', 26); # Lua image recognition script define('SN_LUA_COMMENTER', 27); # Lua snippet commenter script define('SN_LUA_VISUALIZER', 28); # Lua visualizer script define('SN_LUA_PRODUCER', 29); define('SN_LUA_IMAGETRANSFORMER', 30); # Lua image transformer define('SN_LUA_ID_LEARNER', 31); # Image distinction (learner) define('SN_LUA_ID_EXECUTOR', 32); # Image distinction (executor) define('SN_LUA_LIVE', 33); # Lua Live define('SN_LUA_SNIPPET_TO_SNIPPET', 33); define('SN_JAVAX', 34); # JavaX source code define('SN_HTML', 35); # HTML source code #define('SN_DATA_ZIP', 36); # Data (.zip) define('SN_DATA', 37); # Data (any type) define('SN_JAVAX_TRANSLATOR', 38); # JavaX translator define('SN_JAVAX_INPUT_TXT_OUTPUT_TXT', 39); # Certain type of JavaX program define('SN_JAVAX_ANDROID', 40); define('SN_IOIOI', 41); define('SN_JAVAX_INC', 42); define('SN_JAVAX_INCOMPLETE', 43); define('SN_JAVAX_SNIPPETCOMMENTER', 44); define('SN_QUESTION', 45); define('SN_INFORMATION', 46); define('SN_JAVAX_TEST', 47); define('SN_NL', 48); define('SN_BLOGPOST', 49); define('SN_MICROTHEORY', 50); define('SN_SNL', 51); define('SN_USER_SUPPLIED_DIALOG', 52); define('SN_AI_CONCEPTS', 53); define('SN_JAVAX_MODULE', 54); define('SN_JAVAX_DESKTOP', 55); define('SN_AI_DRAWING', 56); # insert next here define('SN_NT_SNIPPET', 80); # New Tinybrain snippet define('SN_SPACE', 81); # a space for snippets define('SN_DOCUMENT', 100); # just a human-readable text define('SN_DOCUMENT_TASK', 101); # human-readable text - task description define('SN_DIRECTORY', 102); # A directory of snippets define('SN_SNIPPET_TYPE', 103); define('SN_IR_TASK', 104); ]]; static S parseSnippetType_defs2 = [[ SN_NT_SNIPPET => 'New Tinybrain snippet', SN_MICROTHEORY => 'Microtheory', SN_DOCUMENT => 'Document', SN_USER_SUPPLIED_DIALOG => 'User-supplied dialog', SN_JAVAX => 'JavaX source code', SN_JAVAX_INC => 'JavaX fragment (include)', SN_JAVAX_DESKTOP => 'JavaX source code (desktop)', SN_JAVAX_INCOMPLETE => 'JavaX (incomplete)', SN_JAVAX_TRANSLATOR => 'JavaX translator', SN_JAVAX_ANDROID => 'JavaX source code (Android)', SN_JAVAX_MODULE => 'JavaX module', SN_JAVAX_TEST => 'JavaX General Test Case', SN_JAVAX_INPUT_TXT_OUTPUT_TXT => 'JavaX (input.txt to output.txt)', SN_JAVAX_SNIPPETCOMMENTER => 'JavaX (snippet commenter)', SN_IOIOI => 'IOIOI', SN_QUESTION => 'Question', SN_NL => 'Natural language', SN_SPACE => 'Space for snippets', SN_DOCUMENT_TASK => 'Task description', SN_SNL => 'Simplified Natural Language', SN_LUA => 'Lua code', SN_LUA_IR => 'Lua code - Image recognition', SN_LUA_IMAGE => 'Lua code - Image', SN_LUA_VISUALIZER => 'Lua code - Visualizer', SN_LUA_IMAGETRANSFORMER => 'Lua code - Image transformer', SN_LUA_CHATBOT => 'Lua code - Chat-bot', SN_LUA_TESTCASE => 'Lua code - Test case', SN_LUA_ANIMATION => 'Lua code - Animation', SN_LUA_GUI => 'Lua code - GUI', SN_LUA_SYSTEMTEST => 'Lua code - System test', SN_LUA_SERVICEBOT => 'Lua code - Service bot', SN_LUA_SUGGESTER => 'Lua code - Suggester', SN_LUA_COMMENTER => 'Lua code - Snippet commenter', SN_LUA_PRODUCER => 'Lua code - Snippet producer', SN_LUA_ID_LEARNER => 'Lua code - Image distinction (learner)', SN_LUA_ID_EXECUTOR => 'Lua code - Image distinction (executor)', SN_LUA_LIVE => 'Lua Live - Lua code with side effects', SN_LUA_SNIPPET_TO_SNIPPET => 'Lua code - Snippet-to-snippet', SN_T2G_GUICODE => 'Java GUI source (Text2GUI/Janino)', SN_JAVA => 'Java source code', SN_JAVA_IR => 'Java image recognition code', SN_PSEUDOCODE => 'Pseudo code', SN_HTML => 'HTML', SN_IMAGE => 'Image', SN_RUNLOG => 'Run Log', SN_INFORMATION => 'Information', # SN_DATA_ZIP => 'Data (.zip)', SN_DATA => 'Data', SN_DECLS => 'TB declarations', SN_TESTCASE => 'TB test case', SN_COMMENT => 'Comment', SN_RUNREPORT => 'Run report', SN_SOURCE => 'Source file', SN_SOLUTION => 'TB solution tree', SN_COMMENT => 'Comment', SN_INOUTEXAMPLE => 'Input/output example', SN_OBJECT => 'Object', SN_DIRECTORY => 'Directory', SN_SNIPPET_TYPE => 'Snippet type', SN_IR_TASK => 'Image recognition task', SN_BLOGPOST => 'Blog post', SN_AI_CONCEPTS => 'AI Concepts', SN_AI_DRAWING => 'AI Drawing' ]]; static int parseSnippetType(S type) { if (eqic(type, "JavaX source code (Desktop)")) ret 55; todo(); }
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: | #1012941 |
Snippet name: | parseSnippetType (TODO) |
Eternal ID of this version: | #1012941/1 |
Text MD5: | 3a0293475c1a3d8fb65e26b7ca81bc17 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-18 16:33:36 |
Source code size: | 5879 bytes / 140 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 391 / 399 |
Referenced in: | [show references] |