Skip to content

Instantly share code, notes, and snippets.

@oktalz
Last active October 23, 2018 21:22
Show Gist options
  • Save oktalz/158eda7405e49a448374845b86a56bef to your computer and use it in GitHub Desktop.
Save oktalz/158eda7405e49a448374845b86a56bef to your computer and use it in GitHub Desktop.
My graduate college shutdown method when Genetic algorithm program for finding student schedules was shutting down
...
public static class RunWhenShuttingDown extends Thread {
public void run() {
if (perfect.test()) {
co.println("Shutting down...\n\n\n");
co.println("solution is here,\n");
co.println("The end is near,");
co.println("there is no fear,");
try {
Thread.sleep(500);
} catch (InterruptedException exception) {
}
co.println("misssion is done,");
co.println("we have found the perfect one,");
co.println("so, bye bye all,");
try {
Thread.sleep(200);
} catch (InterruptedException exception) {
}
co.println("I have acchieved my goal.");
co.newLine();
co.println("Shutting down...");
co.newLine();
} else {
co.println("\nWhy ?!?!?!? ");
co.println("i will find it i promise :(");
co.println("noooooooooooooooo ");
try {
Thread.sleep(500);
} catch (InterruptedException exception) {
}
co.println("^_^_^_^_^_^_^_^_^_^_^_^_^___^_^_^__^_^__");
co.println("aargh, argh, you are killing me, please stop");
co.println("^_^_^_^___^_____^_______^_______________");
try {
Thread.sleep(200);
} catch (InterruptedException exception) {
}
co.println("________________________________________");
}
}
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment