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

14
LINES

< > BotCompany Repo | #1010908 // Last 2 chat lines as web [OK]

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

Download Jar. Uses 4597K of libraries. Click here for Pure Java version (20840L/152K).

1  
!7
2  
3  
p-noconsole {
4  
  L<ChatMsg> msgs = stefansChat_readHistory_fullMsgs(2);
5  
  Web web = simpleWeb();
6  
  new L<WebNode> nodes;
7  
  for i over msgs: {
8  
    ChatMsg msg = msgs.get(i);
9  
    nodes.add(web.node("Text " + quote(msg.text)));
10  
    web_addRelation(nextToLast(nodes), last(nodes), 'then);
11  
    web_setPosition(last(nodes), 0.5, 0.2+i*0.6/max(1, l(msgs)-1));
12  
  }
13  
  showWeb(web, 1000, 500);
14  
}

Author comment

Began life as a copy of #1010902

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: #1010908
Snippet name: Last 2 chat lines as web [OK]
Eternal ID of this version: #1010908/8
Text MD5: 6265e0d39be075310fb35a9ba8ff147f
Transpilation MD5: 03fc988dbec71036f4619312ecb8b926
Author: stefan
Category: javax / chat
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-08 19:03:16
Source code size: 401 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 592 / 1360
Version history: 7 change(s)
Referenced in: [show references]