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).

!7

sS background = #1009946;
static JDesktopPane desktop;
static ShadowJLabel lblInput;
static JLabel lblSpoiler;
static Canvas canvas;
sbool auto = true;

p {
  autoRestart();
  nimbus();
  gac36k(); // preload
  desktop = jTiledBackgroundDesktopPane(background);
  autoFixDesktopPane(desktop);
  cleanExitOnFrameClose(showMaximizedFrame(desktop));
    
  lblInput = centerLabel(swingNu(ShadowJLabel));
  lblInput.setForeground(Color.yellow);
  lblInput.setRightShadow(2, 3, Color.gray);
  
  setInternalFrameY(40, showCenteredInternalFrame(desktop, "Question", desktop.getWidth()-100, 150, 
    jBackground(Color.black, withBottomMargin(4, centerAndSouth(
      jbold(setFont(#1011146, 35, lblInput)),
      westAndEast(
        withLeftMargin(10, setBoldFontSize(20, setForeground(Color.gray, lblSpoiler = jlabel()))),
        withRightMargin(10, jbutton("Next", f next))))))));
      
  setInternalFrameY(internalFrameY2(getInternalFrame(lblInput))+40, showCenteredInternalFrame(desktop, "Analysis", 600, 400, canvas = jcanvas()));
  
  next();
  
  awtEvery(lblInput, 5000, r {
    if (auto) next();
  });
  
  hideConsole();
}

svoid next {
  S s;
  setText(lblInput, s = random_gac36k());
  setText(lblSpoiler, floatToYesNo(gac36k().get(s)));
  analyze();
}

svoid analyze {
  S input = getTextTrim(lblInput);
  Triple<S> triple = ai_tripelize(input);
  Web web = webFromTriple(triple, 0.3, 0.2, 0.7, 0.7);
  canvas = webToCanvas(web, canvas);
}

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: 494 / 3347
Version history: 42 change(s)
Referenced in: [show references]