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

34
LINES

< > BotCompany Repo | #1002963 // Unimind

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

Libraryless. Click here for Pure Java version (1789L/12K/39K).

!752

static class Entry {
  S text;
  long time;
  S who;
}

static PersistentLog<Entry> unimind;

p {
  unimind = new PersistentLog("unimind");
}

static S html(S uri, Map<S, S> params) {
  S line = params.get("line");
  if (nempty(line)) {
    new Entry e;
    e.time = now();
    e.text = line;
    unimind.add(e);
    ret hrefresh(pageLink());
  }
  
  new L<Map> lines;
  for (Entry e : unimind)
    lines.add(litmap("Line", e.text));
  S formContents = tag("input", "", "type", "text", "name", "line",
    "autofocus", "1");
  formContents += " " 
    + tag("input", "", "type", "submit", "value", "Say");
  ret htmlTable(lines)
    + tag("form", p(formContents), "method", "POST");
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1002963
Snippet name: Unimind
Eternal ID of this version: #1002963/1
Text MD5: 639b6878b0320ba93439e84f299d1b3f
Transpilation MD5: 5ae989c9bfd270a7b8b3e5fce24d8df2
Author: stefan
Category: nl bots
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-04-13 21:19:15
Source code size: 724 bytes / 34 lines
Pitched / IR pitched: No / No
Views / Downloads: 611 / 765
Referenced in: [show references]