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

35
LINES

< > BotCompany Repo | #1001321 // Test Result Collector Bot

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

Libraryless. Click here for Pure Java version (1393L/10K/32K).

!747

m {
  static new L<TestResult> entries;
  
  static class TestResult {
    long date;
    S programID;
    S computerID;
    boolean success;
  }
  
  p {
    readLocally("entries");
    print("Entries in my database: " + entries.size());
    makeAndroid("Test Result Collector Bot.");
  }
  
  static synchronized S answer(S s) {
    new Matches m;
    
    if (match3("New entry. success: *. date: *, program: *, computer: *", s, m)) {
      new TestResult x;
      x.success = parseBool(unquote(m.m[0]));
      x.date = parseLong(unquote(m.m[1]));
      x.programID = unquote(m.m[2]);
      x.computerID = unquote(m.m[3]);
      entries.add(x);
      saveLocally("entries");
      return "TestResult, now " + entries.size() + " entries.";
    }
    
    return standardQuery(s, "entries");
  }
}

Author comment

Began life as a copy of #1001245

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1001321
Snippet name: Test Result Collector Bot
Eternal ID of this version: #1001321/1
Text MD5: f7b6b9b1aa4de8de3cc9b285d7909f45
Transpilation MD5: 7461e15c884569fbc217c1d2727886fe
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-10-09 20:36:22
Source code size: 838 bytes / 35 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 524 / 816
Referenced in: [show references]