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

24
LINES

< > BotCompany Repo | #1020558 // Line To Category

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Libraryless. Click here for Pure Java version (17787L/133K).

!7

concept Entry {
  S line, category, answer;
}

module LineToCategory > DynCRUD<Entry> {
  *() { super(Entry); }
  
  start {
    onConceptsChangeAndNow(r { setModuleName("Line To Category (" + conceptCount() + ")") });
  }

  
  // API
  
  void setAnswer(S line, S category, S answer) {
    Entry e = uniq_sync(Entry, +line, +category);
    if (e.answer != null && neq(e.answer, answer)) programLogStructure(litorderedmap(
      action := "Overwritten",
      +line, +category, oldAnswer := e.answer, +answer));
    cset(e, +answer);
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020558
Snippet name: Line To Category
Eternal ID of this version: #1020558/8
Text MD5: 5941a6304a5f0e115ef5a5acbcf03acb
Transpilation MD5: 77341a8f6befa7acc9511fb1a908e98c
Author: stefan
Category: javax
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-27 02:00:06
Source code size: 567 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 277 / 747
Version history: 7 change(s)
Referenced in: [show references]