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

24
LINES

< > BotCompany Repo | #1005515 // A.I. Text Storage

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

Libraryless. Click here for Pure Java version (5146L/34K/112K).

1  
!752
2  
3  
concepts.
4  
5  
concept Text {
6  
  S text, md5;
7  
  
8  
  void save() {
9  
    if (md5 == null) { md5 = md5(text); change(); }
10  
  }
11  
}
12  
13  
p {
14  
  conceptPersistence();
15  
  makeBot("Text Storage Bot.");
16  
}
17  
18  
synchronized answer {
19  
  if "store text *" {
20  
    Text text = uniq(Text, text := $1);
21  
    text.save();
22  
    ret "OK, ID: " + text.id;
23  
  }
24  
}

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: #1005515
Snippet name: A.I. Text Storage
Eternal ID of this version: #1005515/1
Text MD5: d910df1ae160d9f7fd3e473b8fbd12be
Transpilation MD5: 3f057656a0915bbb9c0e4030805550fa
Author: stefan
Category: javax / a.i.
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-11-24 13:12:39
Source code size: 347 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 437 / 515
Referenced in: [show references]