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

52
LINES

< > BotCompany Repo | #1011118 // Auto GAC 1

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

Download Jar. Libraryless. Click here for Pure Java version (15553L/111K).

1  
!7
2  
3  
sS background = #1009946;
4  
static JDesktopPane desktop;
5  
static ShadowJLabel lblInput;
6  
static JLabel lblSpoiler;
7  
static Canvas canvas;
8  
sbool auto = true;
9  
10  
p {
11  
  autoRestart();
12  
  nimbus();
13  
  gac36k(); // preload
14  
  desktop = jTiledBackgroundDesktopPane(background);
15  
  autoFixDesktopPane(desktop);
16  
  cleanExitOnFrameClose(showMaximizedFrame(desktop));
17  
    
18  
  lblInput = centerLabel(swingNu(ShadowJLabel));
19  
  lblInput.setForeground(Color.yellow);
20  
  lblInput.setRightShadow(2, 3, Color.gray);
21  
  
22  
  setInternalFrameY(40, showCenteredInternalFrame(desktop, "Question", desktop.getWidth()-100, 150, 
23  
    jBackground(Color.black, withBottomMargin(4, centerAndSouth(
24  
      jbold(setFont(#1011146, 35, lblInput)),
25  
      westAndEast(
26  
        withLeftMargin(10, setBoldFontSize(20, setForeground(Color.gray, lblSpoiler = jlabel()))),
27  
        withRightMargin(10, jbutton("Next", f next))))))));
28  
      
29  
  setInternalFrameY(internalFrameY2(getInternalFrame(lblInput))+40, showCenteredInternalFrame(desktop, "Analysis", 600, 400, canvas = jcanvas()));
30  
  
31  
  next();
32  
  
33  
  awtEvery(lblInput, 5000, r {
34  
    if (auto) next();
35  
  });
36  
  
37  
  hideConsole();
38  
}
39  
40  
svoid next {
41  
  S s;
42  
  setText(lblInput, s = random_gac36k());
43  
  setText(lblSpoiler, floatToYesNo(gac36k().get(s)));
44  
  analyze();
45  
}
46  
47  
svoid analyze {
48  
  S input = getTextTrim(lblInput);
49  
  Triple<S> triple = ai_tripelize(input);
50  
  Web web = webFromTriple(triple, 0.3, 0.2, 0.7, 0.7);
51  
  canvas = webToCanvas(web, canvas);
52  
}

Author comment

Began life as a copy of #1011110

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1011118
Snippet name: Auto GAC 1
Eternal ID of this version: #1011118/43
Text MD5: f0efe895d0e216d189d4ddee124f4b82
Transpilation MD5: fc14a64752a87c9164b365810d639c13
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-16 23:27:29
Source code size: 1504 bytes / 52 lines
Pitched / IR pitched: No / No
Views / Downloads: 630 / 3647
Version history: 42 change(s)
Referenced in: [show references]