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

26
LINES

< > BotCompany Repo | #1001655 // Central Server Up?

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

Libraryless. Click here for Pure Java version (1885L/13K/41K).

1  
!747
2  
!1000805 // awt
3  
!image classes
4  
5  
m {
6  
  !include #1001425 // ShowBigText
7  
  
8  
  static int delay = 2000;
9  
  static volatile boolean up;
10  
  
11  
  // make translator happy...
12  
  !include #2000515 // unquote
13  
  !include #1000709 // formatSnippetID
14  
  
15  
  p {
16  
    new ShowBigText sbt;
17  
    
18  
    while (true) {
19  
      up = centralServerUp(5000);
20  
      sbt.title = (up ? "Up" : "Down") + ": Server";
21  
      sbt.background = up ? Color.green : Color.red;
22  
      sbt.showText(up ? "UP" : "DOWN");
23  
      sleep(delay);
24  
    }
25  
  }
26  
}

Author comment

Began life as a copy of #1001652

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1001655
Snippet name: Central Server Up?
Eternal ID of this version: #1001655/1
Text MD5: e3c260ff1d60dfee996e2225945db92b
Transpilation MD5: e70c4eeaa35a4774acf29ebca27649da
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-11-01 13:41:39
Source code size: 533 bytes / 26 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 548 / 657
Referenced in: [show references]