import java.util.*;
import java.util.zip.*;
import java.util.List;
import java.util.regex.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
import java.util.concurrent.locks.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
import javax.swing.table.*;
import java.io.*;
import java.net.*;
import java.lang.reflect.*;
import java.lang.ref.*;
import java.lang.management.*;
import java.security.*;
import java.security.spec.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import javax.imageio.*;
import java.math.*;
import processing.core.*;
import javax.net.ssl.*;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import java.text.SimpleDateFormat;
public class main {
public static int timeout = 10000;
public static void main(final String[] args) throws Exception {
final PGauge gauge1 = pMain(PGauge.class);
final PGauge gauge2 = pMain(PGauge.class);
{
swing(new Runnable() {
public void run() {
try {
moveWindowToTheRight(pFrame(gauge2), pFrame(gauge1).getWidth() + 20);
} catch (Exception __e) {
throw rethrow(__e);
}
}
public String toString() {
return "moveWindowToTheRight(pFrame(gauge2), pFrame(gauge1).getWidth()+20);";
}
});
}
while (licensed()) {
try {
pgauge_showSystemLoad(gauge1, "Old server load", parseDouble(print(loadPageWithTimeout(timeout, "http://botcompany.de/1001951/raw/system+load"))));
pgauge_showSystemLoad(gauge2, "New server load", parseDouble(print(loadPageWithTimeout(timeout, "http://butter.botcompany.de:8080/1001951/raw/system+load"))));
} catch (Throwable __e) {
printStackTrace2(__e);
}
sleepSeconds(2);
}
}
public static RuntimeException rethrow(Throwable t) {
if (t instanceof Error)
_handleError((Error) t);
throw t instanceof RuntimeException ? (RuntimeException) t : new RuntimeException(t);
}
public static volatile boolean licensed_yes = true;
public static boolean licensed() {
ping();
return licensed_yes;
}
public static void licensed_off() {
licensed_yes = false;
}
public static void sleepSeconds(double s) {
if (s > 0)
sleep(round(s * 1000));
}
public static A pMain(final Class c) {
return first(pMainWithFrame(c));
}
public static Pair pMainWithFrame(final Class c) {
return swing(new F0>() {
public Pair get() {
try {
fixContextClassLoader();
A a = nuInstance(c);
PApplet.runSketch(new String[] { c.getName() }, a);
Frame frame = (Frame) (getOpt(a.getSurface(), "frame"));
return pair(a, frame);
} catch (Exception __e) {
throw rethrow(__e);
}
}
public String toString() {
return "fixContextClassLoader();\r\n A a = nuInstance(c);\r\n //Set frames =...";
}
});
}
public static PApplet2 pMain() {
return pMain(mc());
}
public static Map _registerThread_threads = newWeakHashMap();
public static Thread _registerThread(Thread t) {
_registerThread_threads.put(t, true);
return t;
}
public static void _registerThread() {
_registerThread(Thread.currentThread());
}
public static void moveWindowToTheRight(Window w, int amount) {
moveFrameRight(w, amount);
}
public static void pgauge_showSystemLoad(PGauge gauge, String title, double value) {
gauge.setValue(100 * value, formatDouble(value, 2) + " - " + title);
}
public static double parseDouble(String s) {
return Double.parseDouble(s);
}
public static Object swing(Object f) {
return swingAndWait(f);
}
public static A swing(F0 f) {
return (A) swingAndWait(f);
}
public static volatile StringBuffer local_log = new StringBuffer();
public static volatile StringBuffer print_log = local_log;
public static volatile int print_log_max = 1024 * 1024;
public static volatile int local_log_max = 100 * 1024;
public static boolean print_silent;
public static Object print_byThread_lock = new Object();
public static volatile ThreadLocal