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

1  
!747
2  
3  
m {
4  
  static new L<TestResult> entries;
5  
  
6  
  static class TestResult {
7  
    long date;
8  
    S programID;
9  
    S computerID;
10  
    boolean success;
11  
  }
12  
  
13  
  p {
14  
    readLocally("entries");
15  
    print("Entries in my database: " + entries.size());
16  
    makeAndroid("Test Result Collector Bot.");
17  
  }
18  
  
19  
  static synchronized S answer(S s) {
20  
    new Matches m;
21  
    
22  
    if (match3("New entry. success: *. date: *, program: *, computer: *", s, m)) {
23  
      new TestResult x;
24  
      x.success = parseBool(unquote(m.m[0]));
25  
      x.date = parseLong(unquote(m.m[1]));
26  
      x.programID = unquote(m.m[2]);
27  
      x.computerID = unquote(m.m[3]);
28  
      entries.add(x);
29  
      saveLocally("entries");
30  
      return "TestResult, now " + entries.size() + " entries.";
31  
    }
32  
    
33  
    return standardQuery(s, "entries");
34  
  }
35  
}

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