Libraryless. Click here for Pure Java version (75L/1K/3K).
1 | !747 |
2 | |
3 | m { |
4 | static int score, max = 3; |
5 | static boolean online; |
6 | |
7 | p { |
8 | print("Online check!"); |
9 | score = 0; |
10 | check("tinybrain.de"); |
11 | check("google.com"); |
12 | check("bing.com"); |
13 | online = score > 0; |
14 | print("Score: " + score + "/3"); |
15 | } |
16 | |
17 | static void check(S server) { |
18 | boolean online = checkIfHttpServerIsOnline("tinybrain.de") == null; |
19 | if (online) |
20 | ++score; |
21 | print(server + ": " + (online ? "ONLINE!" : "OFFLINE?")); |
22 | } |
23 | } |
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: | #1001115 |
Snippet name: | Online check! (verifies 3 servers) |
Eternal ID of this version: | #1001115/1 |
Text MD5: | d4698e4cdb24d74c20a4f09d35039b6c |
Transpilation MD5: | a29434c9bcace38e00e86e7604a21f61 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-09-22 18:05:57 |
Source code size: | 483 bytes / 23 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 732 / 743 |
Referenced in: | [show references] |