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

23
LINES

< > BotCompany Repo | #1005429 // Backup of solvableSmartQuestions

JavaX fragment (include)

1  
sbool solvableSmartQuestions_debug;
2  
3  
static MultiMap<S, S> solvableSmartQuestions() {
4  
  Map<Long, O> concepts = safeLoadConcepts("#1005320");
5  
  new MultiMap<S, S> map;
6  
  for (O ua : valuesOfType(concepts, "main$UserAnswer")) {
7  
    bool solvable = getBool(ua, "solvable");
8  
    S a = getString(ua, "text");
9  
    if (!solvable) {
10  
      if (solvableSmartQuestions_debug) print("Not solvable: " + a);
11  
      continue;
12  
    }
13  
    O ul = getOptDyn(getOptDyn(ua, "userLine"), "value");
14  
    if (ul == null) ul = getOptDyn(getOptDyn(ua, "question"), "value");
15  
    if (ul == null) {
16  
      if (solvableSmartQuestions_debug) print("No question? " + a);
17  
      continue;
18  
    }
19  
    S q = getString(ul, "text");
20  
    map.put(q, a);
21  
  }
22  
  ret map;
23  
}

Author comment

Began life as a copy of #1005406

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: #1005429
Snippet name: Backup of solvableSmartQuestions
Eternal ID of this version: #1005429/1
Text MD5: c7a079fe6a23dfc71d8237cc41f5b999
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-11-16 17:31:19
Source code size: 749 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 446 / 430
Referenced in: [show references]