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).

1  
!752
2  
3  
!include #1004863 // Dynamic Concepts
4  
5  
sclass Question extends Concept {}
6  
7  
sclass IsItAnAIJob extends Question {
8  
  new Ref<XRef> originalSignedText;
9  
  S signedText;
10  
  bool ready;
11  
  Boolean answer;
12  
}
13  
14  
sclass UserSignedStatement extends Concept {
15  
  S text;
16  
}
17  
18  
p {
19  
  Concepts inConcepts = new Concepts("#1004859"); // Signed Statements
20  
  inConcepts.loadConcepts();
21  
  
22  
  mainConcepts.loadConcepts();
23  
  mainConcepts.autoSaveConcepts();
24  
  
25  
  for (UserSignedStatement uss : inConcepts.listConcepts(UserSignedStatement.class)) {
26  
    XRef ussRef = lookupOrCreateXRef(uss.export());
27  
    IsItAnAIJob q = mainConcepts.findBackRef(ussRef, IsItAnAIJob.class);
28  
    if (q != null) print("Has it"); else {
29  
      print("Making question");
30  
      q = new IsItAnAIJob;
31  
      q.originalSignedText.set(ussRef);
32  
      q.signedText = uss.text;
33  
      q.ready = true;
34  
      q.change();
35  
    }
36  
  }
37  
}

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: 457 / 516
Referenced in: [show references]