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)

sbool solvableSmartQuestions_debug;

static MultiMap<S, S> solvableSmartQuestions() {
  Map<Long, O> concepts = safeLoadConcepts("#1005320");
  new MultiMap<S, S> map;
  for (O ua : valuesOfType(concepts, "main$UserAnswer")) {
    bool solvable = getBool(ua, "solvable");
    S a = getString(ua, "text");
    if (!solvable) {
      if (solvableSmartQuestions_debug) print("Not solvable: " + a);
      continue;
    }
    O ul = getOptDyn(getOptDyn(ua, "userLine"), "value");
    if (ul == null) ul = getOptDyn(getOptDyn(ua, "question"), "value");
    if (ul == null) {
      if (solvableSmartQuestions_debug) print("No question? " + a);
      continue;
    }
    S q = getString(ul, "text");
    map.put(q, a);
  }
  ret map;
}

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: 510 / 494
Referenced in: