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

20
LINES

< > BotCompany Repo | #1018528 // Allocate Resources To AI [formerly: "Background AI"]

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

Uses 911K of libraries. Click here for Pure Java version (9213L/49K).

!7

cmodule BackgroundAI {
  int cores;
  int megabytes;

  visualize {
    final JSpinner spinner = jSpinner(cores, 0, numberOfCores());
    main.onChange(spinner, r { setField(cores := intFromSpinner(spinner)) });
    final JSpinner spinner2 = jSpinner(megabytes, 0, 65536);
    main.onChange(spinner2, r { setField(megabytes := intFromSpinner(spinner2)) });
    ret /*jscroll_trackWidth*/(makeForm3(
      jDummyBoldMultiLineLabel("Cores to use for\nbackground AI (0-" + numberOfCores() + "):"),
        jline(jMinWidth(70, spinner)),
      jLabel("Memory to use:"),
        centerAndEastWithMargin(spinner2, jLabel("MB")),
      jLabel("Current activity:"),
        "-"));
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

-
Snippet ID: #1018528
Snippet name: Allocate Resources To AI [formerly: "Background AI"]
Eternal ID of this version: #1018528/26
Text MD5: a49f5eed644c0d35adc4db24a598ce5e
Transpilation MD5: 863256ccde1f8d539abc6c852006eb3e
Author: stefan
Category: javax / stefan's os / a.i.
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-26 22:40:01
Source code size: 701 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 445 / 5994
Version history: 25 change(s)
Referenced in: