Railsbin – The vulnerable pastebin service!

User:

Title: Konstanz

Content:

package fxts.luca;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

import fxts.luca.algo.base.Algo;

/**
 * > https://remix.kwed.org/download.php/2268/DHS%20of%20TSW%20feat%20Makke%20-%20Giana%20Sisters%20%28Keep%20Da%20Scene%20Alive%29.mp3
 * 
 * It's time to press play on tape 'cus
 * Here comes the SID attackers
 * Yeah!
 * Going out to the remix trackers
 * Yeah!
 * Respect to the man with a SID in his hand
 * You've got to dance with your feat to the Commodore beat
 * C'mon!
 * Respect to you with 64 as IQ
 * 
 * @author Christian
 * @version 6.11.4
 * @since 6.10.5
 */
public class LucaConstants {
	
	// --- gizmore --- was --- here --- // 
	
	public static final String VERSION = "6.11.4-r6389_lucky_luca";
	
	// --- Strings --- //
	
	public static final String Y = "Y";
	public static final String N = "N";
	public static final String TRUE = "true";
	public static final String FALSE = "false";
	public static final String EMPTY_STRING = "";
	public static final String STATUS_OPEN = "open";
	public static final String STATUS_CLOSED = "closed";
	public static final String SIDE_BUY = "BUY";
	public static final String SIDE_SELL = "SELL";
	
	// --- Units --- //

	public static final long ONE_KILOBYTE = 1024L;
	public static final long ONE_MEGABYTE = 1024L * ONE_KILOBYTE;

	// --- Scaling --- //
	
	public static final int NUM_SUB_CURRENCIES = 3;
	public static final int NUM_VARS_PER_ALGO = 64;
	public static final int DAYS_PER_YEAR = 366;
	public static final int MAX_YEARS_POSSIBLE = 12;
	public static final int MAX_OPEN_POSITIONS_PER_ALGO = 10000;
	public static final long THREAD_SLEEP = 0L; // Painter threads, is ok
	
	// --- Positions --- //

	public static final double ONE_PIP = 0.00010;
	public static final double MICRO_PIP = 0.00001;
	public static final double PIP_MAGNITUDE = 10000.0;
	
	public static final double ROLL_BUY = 0.08;
	public static final double ROLL_SELL = -0.04;

	public static final double MARKER_MAX = 1000000.0;
	public static final String MARKER_MAX_S = "1000000.0";

	// --- Layout --- //

	public static final int COMPONENT_HEIGHT = 16;
	public static final Dimension FULLSCREEN = new Dimension(1280, 900);
	public static final BorderLayout BORDER_LAYOUT = new BorderLayout();

	// --- Colors --/
	
	public static final int OPACITY_00 = 0;
	public static final int OPACITY_02 = 52;
	public static final int OPACITY_03 = 76;
	public static final int OPACITY_05 = 128;
	public static final int OPACITY_08 = 208;
	public static final int OPACITY_10 = 255;

	public static final Color COLOR_EQUITY_BASELINE = new Color(128, 128, 128);
	public static final Color COLOR_EQUITY = Color.BLACK;
	public static final Color COLOR_BALANCE = new Color(210, 210, 210, 64);
	public static final Color COLOR_MARGIN = new Color(255, 210, 210, 128);
	public static final Color COLOR_MARGIN_MIN = new Color(255, 210, 210, 128);
	public static final Color COLOR_MARGIN_CALL = new Color(255, 128, 128, 96);

	public static final Color COLOR_ASK = new Color(0x76, 0xEE, 0x00);
	public static final Color COLOR_BID = new Color(0x45, 0x8B, 0x00);
	
	public static final Color COLOR_AMT_ASK = Color.BLUE;
	public static final Color COLOR_AMT_BID = Color.RED;
	public static final Color COLOR_AMT_DIFF = Color.PINK;
	
	public static final Color COLOR_DRAWDOWN = new Color(0xF9, 0xC7, 0x0C, OPACITY_03);
	public static final Color COLOR_MAXDRAWDOWN = new Color(0xFF, 0xA3, 0x48, OPACITY_02);

	public static final Color COLOR_RAZOR = new Color(0, 0, 0, OPACITY_10);
	public static final Color COLOR_RECT_EQUITY = new Color(32, 32, 32, OPACITY_08);
	public static final Color COLOR_RECT_INNER = new Color(0xff, 0xd7, 0x00, OPACITY_10);
	public static final Color COLOR_RECT_OUTER = new Color(0xC0, 0xC0, 0xC0, OPACITY_05);

	public static final Color COLOR_NUM_SWITCHES = new Color(0xff, 0xff, 0x7f, OPACITY_10);
	
	// --- Timing --- //
	
	public static final long ONE_SECOND = 1000L;
	public static final long ONE_MINUTE = 60000L;
	public static final long ONE_HOUR = 60L * ONE_MINUTE;
	public static final long ONE_DAY = 24L * ONE_HOUR;
	public static final long ONE_WEEK = 7L * ONE_DAY;

	public static final TimeZone TZ;
	public static final TimeZone NY;
	public static final TimeZone UTC;
	
	public static final Date now = new Date();
	public static long tnow = now.getTime();
	
	public static final SimpleDateFormat DF_USER = new SimpleDateFormat("dd.MM.YYYY HH:mm:ss");

	static {
		TZ = TimeZone.getTimeZone("Europe/Berlin");
		NY = TimeZone.getTimeZone("America/New_York");
		UTC = TimeZone.getTimeZone("UTC");
		DF_USER.setTimeZone(TZ);
	}

	public static void setTime(Date now) {
		setTime(now.getTime());
	}
	
	public static void setTime(long now) {
		LucaConstants.tnow = now;
		LucaConstants.now.setTime(now);
	}

	/**
	 * Little helper to clone the current replay Date.
	 */
	public static Date now() {
		return (Date) now.clone();
	}
	
	// --- Debug --- //
	
	@SuppressWarnings("deprecation")
	public static void breakAt(int day, int month, int year, int hour, int min, int sec) {
		Date date = new Date(year, month, day, hour, min, sec);
		breakAt(date);
	}
	
	public static void breakAt(Date date) {
		if (date.after(now)) {
			Algo.dbg("%d LucaConstants.breakAt() reached", tnow);
		}
	}
	
}

Edit | Back