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

37
LINES

< > BotCompany Repo | #1004866 // Collect "Signed User Statements" which are possible AI Jobs (dev.)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (3158L/20K/68K).

!752

!include #1004863 // Dynamic Concepts

sclass Question extends Concept {}

sclass IsItAnAIJob extends Question {
  new Ref<XRef> originalSignedText;
  S signedText;
  bool ready;
  Boolean answer;
}

sclass UserSignedStatement extends Concept {
  S text;
}

p {
  Concepts inConcepts = new Concepts("#1004859"); // Signed Statements
  inConcepts.loadConcepts();
  
  mainConcepts.loadConcepts();
  mainConcepts.autoSaveConcepts();
  
  for (UserSignedStatement uss : inConcepts.listConcepts(UserSignedStatement.class)) {
    XRef ussRef = lookupOrCreateXRef(uss.export());
    IsItAnAIJob q = mainConcepts.findBackRef(ussRef, IsItAnAIJob.class);
    if (q != null) print("Has it"); else {
      print("Making question");
      q = new IsItAnAIJob;
      q.originalSignedText.set(ussRef);
      q.signedText = uss.text;
      q.ready = true;
      q.change();
    }
  }
}

Author comment

Began life as a copy of #1004864

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004866
Snippet name: Collect "Signed User Statements" which are possible AI Jobs (dev.)
Eternal ID of this version: #1004866/1
Text MD5: 5e188ca15dd091450a40ee18fa3b29b1
Transpilation MD5: 4030144b0312adcd9890f3492ff3a1f3
Author: stefan
Category: javax / talking robots
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-11-20 12:32:01
Source code size: 912 bytes / 37 lines
Pitched / IR pitched: No / No
Views / Downloads: 541 / 610
Referenced in: #1004867 - Chat On User Statements