text
stringlengths
3
1.18M
package gui; import javax.microedition.lcdui.game.Sprite; import logic.FilesManager; import logic.LogicHelper; import logic.MainMidlet; /** * class representing main menu screen * @author Rekin * */ public class MainMenuCanvas extends MenuCanvas{ private static String[] menuItemsNames = { ...
package gui; import java.util.Calendar; import javax.microedition.lcdui.Alert; import javax.microedition.lcdui.AlertType; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Graphics; import logic.FilesManager; import logic.LogicHelper; import logic.MainMidlet; import logic.Point; ...
package gui; import java.util.Random; import java.util.Timer; import java.util.TimerTask; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Font; import javax.microedition.lcdui.Graphics; import javax.microedition.lcdui.game.Sprite; import logic.LogicHelper; import logic.MainMidlet;...
package gui; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Graphics; import javax.microedition.lcdui.Image; import logic.MainMidlet; import logic.Point; /** * template for screen with image and one button at the bottom * @author Rekin * */ public class ImageAndOkScreenTemp...
package gui; import logic.LogicHelper; /** * screen for player's victory * @author Rekin * */ public class VictoryScreen extends ImageAndOkScreenTemplate{ /** * default constructor */ public VictoryScreen() { String imgFile="/victory.png"; im=LogicHelper.createImageFromResources(imgFil...
package gui; import javax.microedition.lcdui.Alert; import javax.microedition.lcdui.AlertType; import javax.microedition.lcdui.game.Sprite; import logic.Engine; import logic.EngineBluetoothGame; import logic.LogicHelper; import logic.MainMidlet; import logic.DataSaverLoader; /** * screen for ingame men...
package gui; import java.io.IOException; import java.util.Timer; import java.util.TimerTask; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener; import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.Graphics...
package gui; import javax.microedition.lcdui.Font; import javax.microedition.lcdui.Graphics; import logic.Point; /** * template class for buttons * @author Rekin * */ public class CanvasButtonTemplate{ protected Point topLeft; protected int myWidth; protected int myHeight; protected int myBas...
package gui; import javax.microedition.lcdui.game.Sprite; import logic.LogicHelper; import logic.MainMidlet; /** * screen for selecting player role in multiplayer game (server or client) * @author Rekin * */ public class ClientServerSelectScreen extends MenuCanvas{ private static String[] menuItem...
package gui; import logic.LogicHelper; /** * screen for player defeat * @author Rekin * */ public class DefeatScreen extends ImageAndOkScreenTemplate{ /** * default constructor */ public DefeatScreen() { String imgFile="/defeat.png"; im=LogicHelper.createImageFromResources(imgFile, thi...
package gui; import javax.microedition.lcdui.Graphics; import logic.Point; /** * special kind of button used on all canvases * @author Rekin * */ public class CanvasButton extends CanvasButtonTemplate{ private String myLabel; private boolean selected; private boolean enabled; /** * const...
package gui; import logic.LogicHelper; import logic.Point; /** * class for showing about screen * @author Rekin * */ public class AboutScreen extends ImageAndOkScreenTemplate{ public AboutScreen(){ String imgFile="/about.png"; im=LogicHelper.createImageFromResources(imgFile, this); ok.setTopLef...
package gui; import javax.microedition.lcdui.Graphics; import logic.MainMidlet; import logic.Point; /** * screen for showing statistics of the game * @author Rekin * */ public class HighscoresScreen extends ImageAndOkScreenTemplate { private String line1; private String line2; /** * default...
package gui; import java.util.Random; import java.util.Timer; import java.util.TimerTask; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Graphics; import javax.microedition.lcdui.game.Sprite; import logic.LogicHelper; import logic.Point; /** * abstract template class for all menu...
package gui; import java.util.Timer; import java.util.TimerTask; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Graphics; import javax.microedition.lcdui.game.Sprite; import logic.LogicHelper; /** * waiting screen when server waits for clients * @author Rekin * */ public...
package gui; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Graphics; import javax.microedition.lcdui.Image; import javax.microedition.lcdui.game.Sprite; import logic.Card; import logic.Engine; import logic.EngineBluetoothGame; import logic.EngineSinglePlayer; import logic.LogicHelpe...
package logic; import gui.SearchResultScreen; import java.util.Vector; import javax.bluetooth.BluetoothStateException; import javax.bluetooth.DeviceClass; import javax.bluetooth.DiscoveryAgent; import javax.bluetooth.DiscoveryListener; import javax.bluetooth.LocalDevice; import javax.bluetooth.RemoteDevic...
package logic; /** * class that holds user settings, used to lower memory usage * because we don't create whole engine at start of application * @author Rekin * */ public class TempUserSettings { /** * default constructor */ public TempUserSettings(){ setDefaultSettings(); } /** ...
package logic; import gui.DefeatScreen; import gui.VictoryScreen; /** * class representing multi player engine * @author Rekin * */ public class EngineBluetoothGame extends Engine{ private BluetoothCommunicationHandler btcom; private boolean hasToken; /** * @param com handler for bluetooth c...
package logic; import gui.AboutScreen; import gui.Board; import gui.ClientServerSelectScreen; import gui.HighscoresScreen; import gui.LoadGameScreen; import gui.MainMenuCanvas; import gui.MenuOptions; import gui.ServerConnectingToClientWaitingScreen; import gui.StartingScreen; import javax.microedition.lcdu...
package logic; import gui.DefeatScreen; import gui.VictoryScreen; import java.io.IOException; import javax.microedition.lcdui.Alert; import javax.microedition.lcdui.AlertType; /** * class for sending data through bluetooth stream * @author Rekin * */ /** * @author Rekin * */ public class Blu...
package logic; /** * class representing a card for poker game * @author Rekin * */ public class Card{ private int figure; private int color; private boolean selected; /** * card constructor * @param figure card figure * @param color card color */ public Card(int figure, int color)...
package logic; /** * class for saving and loading data to/from file * @author Rekin * */ public class DataSaverLoader { private String loadedData; /** * method for saving game state to file * @param eng Engine from which data will be used to save * @return true if save was successful otherwi...
package logic; /** * class representing single player engine * @author Rekin * */ public class EngineSinglePlayer extends Engine{ /** * @param temp user settings used for engine creation */ public EngineSinglePlayer(TempUserSettings temp){ super(temp); canSave=false; initPlayers(); }...
package logic; import javax.bluetooth.BluetoothStateException; import javax.bluetooth.DiscoveryAgent; import javax.bluetooth.LocalDevice; import javax.microedition.io.Connector; import javax.microedition.io.StreamConnection; import javax.microedition.io.StreamConnectionNotifier; import javax.microedition.lcdui...
package logic; import java.io.IOException; import javax.microedition.lcdui.Alert; import javax.microedition.lcdui.AlertType; import javax.microedition.lcdui.Graphics; import javax.microedition.lcdui.Image; import javax.microedition.lcdui.StringItem; import javax.microedition.lcdui.game.Sprite; /** * class...
package logic; /** * class representing game engine - it includes game model (data) and controller (handling game logic) * @author Rekin * */ public class Engine { public static final int defaultStake = 5; public static final int defaultEntryFee = 2; protected TempUserSettings predefinedSettings; ...
package logic; import java.util.Random; /** * class representing player (computer or human) * @author Rekin * */ public class Player { private Card cards[]; private String name; private int money; private boolean inGame; private boolean bankrupt; private boolean moved; private int givenS...
package logic; import java.io.IOException; import java.util.Vector; import javax.bluetooth.DataElement; import javax.bluetooth.ServiceRecord; import javax.microedition.lcdui.AlertType; /** * class for establishind the connection with given device from the list of previously found devices * @author Rekin ...
package logic; /** * class for holding network constants * @author Rekin * */ public class NetMessage { public static final char SEPARATOR = '^'; public static final int STARTING_MONEY = 501; public static final int CARDS = 502; public static final int ACTION_BUTTON = 503; public static fin...
package logic; /** * class for gathering statistics in game * @author Rekin * */ public class StatisticsManager { private static String statsFile = System.getProperty("fileconn.dir.private")+"pkstats.txt"; private int humanVictories; private int gamesPlayed; // private int humanLoses; // private ...
package logic; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import javax.microedition.io.Connector; import javax.microedition.io.StreamConnection; /** * class for low level interaction with bluetooth stream * @author Rekin * */ public class BluetoothConnectio...
package logic; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.Enumeration; import java.util.Vector; import javax.microedition.io.Connector; import javax.microedition.io.file.FileConnection; import javax.microedition.io.file.FileSystemRegistry; ...
package logic; /** * class representing point 2D with x and y coordinate * @author Rekin * */ public class Point { /** * default constructor - point at (0,0) */ public Point(){ x=0; y=0; } /** * constructs Point with given coordinates * @param x * @param y */ public P...
package com.emergency.button; import android.app.PendingIntent; import android.app.Service; import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.content.Context; import android.content.Intent; import android.os.SystemClock; import android.widget.RemoteViews; ...
package com.emergency.button; import java.util.ArrayList; import java.util.List; import android.content.Context; import android.content.SharedPreferences; public class EmergencyData { Context mContext; SharedPreferences mSettings; public static final String PREFS_NAME = "EmergencyPrefsFile"; p...
package com.emergency.button; import java.io.PrintWriter; import java.io.StringWriter; import java.io.Writer; import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; public class Utils ...
package com.emergency.button; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import com.emergency.button.SMSSender.SMSListener; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; ...
package com.emergency.button; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; public class IntroActivity ex...
package com.emergency.button; import java.util.ArrayList; import java.util.concurrent.atomic.AtomicInteger; import android.app.Activity; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFil...
package com.emergency.button; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; import org.apache.http.NameValuePair; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.Re...
/** * Locator is a class which allows getting a location with minimum requirements * of age and accuracy. There is also a timer which fires after 20 seconds and * uses the best location that was found until now. After a location is sent * the locator class auto unregisters. * */ package com.emergency.bu...
package com.emergency.button; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import com.nullwire.trace.ExceptionHandler; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.content.ContentResolver; import android.content.Context; impo...
/* Copyright (c) 2009 nullwire aps Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distrib...
/* Copyright (c) 2009 nullwire aps Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, su...
/* Copyright (c) 2009 nullwire aps Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distrib...
import zentralabi.net.*; /** * Beschreiben Sie hier die Klasse User. * * @author Britta, Rebekka, Iris * @version 06.04.2011 */ public class User { private String ClientIP; private int ClientPort; private String name; /** * Konstruktor fuer Objekte der Klasse User */ public User(S...
package zentralabi; import zentralabi.net.*; /** * Beschreiben Sie hier die Klasse User. * * @author (Ihr Name) * @version (eine Versionsnummer oder ein Datum) */ public class User { // Instanzvariablen - ersetzen Sie das folgende Beispiel mit Ihren Variablen private String ClientIP; private int C...
package zentralabi; import zentralabi.net.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * Write a description of class GUI here. * * @author Andreas Fischer * @version (a version number or a date) */ public class GUI extends JFrame { public Anzeige anzeige; publi...
package zentralabi; import javax.swing.*; import java.awt.*; import java.awt.event.*; /** * Write a description of class Anzeige here. * * @author Andreas Fischer * @version ... */ public class Anzeige extends JPanel { private VierGewinntClient vgc; private int size; private int bewegtX...
package zentralabi; import zentralabi.net.*; /** * Beschreiben Sie hier die Klasse VierGewinntServer. * * @author (Rebekka, Iris, Britta) * @version (28.03.2011) */ public class VierGewinntServer extends Server { private int spielfeld[][]; private User spieler1; private User spieler2; private...
package zentralabi; import zentralabi.net.*; /** * Beschreiben Sie hier die Klasse VierGewinntClient. * * @author Malte Schmidt,Marko Kleine-Buening,Andreas Fischer * @version (eine Versionsnummer oder ein Datum) */ public class VierGewinntClient extends Client { private int[][] spielfeld; private int s...
import zentralabi.net.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * Die GUI erstellt ein Fenster aus Spielfeld und Konsole. * Beim start wird man sofort mit dem Server verbunden. Falls kein Server existiert wird ein Fehler ausgegeben. * Desweiteren kann man chatten. * * @au...
import javax.swing.*; import java.awt.*; import java.awt.event.*; /** * Dies ist ein GUI-Element, welches das Spielfeld darstellt * und Maus-Befehle des Users bearbeitet. * * @author Andreas Fischer * @version 1.00 */ public class Anzeige extends JPanel { //Kennt-Beziehung private VierGewin...
import zentralabi.net.*; import javax.swing.*; /** * Beschreiben Sie hier die Klasse VierGewinntServer. * * @author Rebekka, Iris, Britta * @version 06.04.2011 */ public class VierGewinntServer extends Server { private int spielfeld[][]; private User spieler1; private User spieler2; private Use...
import javax.swing.*; import java.util.*; import java.io.*; /** * Ist noch unfertig und nicht Kommentiert, deswegen muss die Klasse nicht Kontrolliert werden. * @author Martin Teschendorf && Marko * @version */ public class optimaleKI extends VierGewinntClient { // Bezugsobjekte // Attribute public i...
import javax.swing.*; import java.util.*; /** * Ist noch unfertig und nicht Kommentiert, deswegen muss die Klasse nicht Kontrolliert werden. * @author Fischaa Maltaa * @version */ public class BessereKI extends VierGewinntClient { public BessereKI(){ this("localhost",4000); } public Besser...
import java.util.ArrayList; import java.util.List; import java.util.Random; /** * Questions are represented by events that are given a lower priority * than meetings. Besides that, Questions are handeled by the scheduler * as if they are a meeting. Questions are randomly going to * either be answered on ...
import java.util.ArrayList; import java.util.List; import java.util.Random; public class Main { private static final int NUM_TEAMS = 3; private static final int NUM_EMPLOYEES_PER_DAY = 3; private static final int NUM_QUESTIONS_PER_DAY = 20; public static final int MINUTE_TIME_IN_MILLIS = 10; publ...
import java.util.ArrayList; import java.util.List; /** * */ /** * If a person gets a question while they are in a meeting, this pre-event * is added to their schedule * */ public class QuestionThought extends Event { Manager manager; TeamLead tl; Developer owner; List<Employee> eventMembe...
import java.util.ArrayList; import java.util.List; public abstract class Event implements Runnable, Comparable<Event> { protected final Time eventTime; protected final List<Employee> members; protected int priority; public Event(Time eventTime, Employee member) { List<Employee> members = new Arra...
public class LeaveOffice extends Event { public LeaveOffice(Time eventTime, Employee member) { super(eventTime, member); priority = 5; } @Override public void run() { Employee employee = (Employee) Thread.currentThread(); employee.leaveOffice(); } @Override public String toString() ...
import java.util.concurrent.PriorityBlockingQueue; public abstract class Employee extends Thread { // Whether or not the employee is in the office. // SchedulableResource cannot do anything until they are in the office private volatile boolean isInOffice = false; private volatile boolean leftOffice = false;...
public class ConferenceRoom extends Employee { public ConferenceRoom(Schedule schedule) { super(schedule); } @Override public void scheduleDay() { arriveToOffice(); //In Soviet Russia you don't leave the conference room, //the conference room leaves YOU! schedule.scheduleEvent(new LeaveOf...
import java.util.List; import java.util.Observable; import java.util.Observer; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; public class Meeting extends Event implements Observe...
import java.util.ArrayList; import java.util.List; import java.util.Random; /** * Questions are represented by events that are given a lower priority * than meetings. Besides that, Questions are handeled by the scheduler * as if they are a meeting. Questions are randomly going to * either be answered on ...
import java.util.List; import java.util.Observable; import java.util.Observer; class UnansweredQuestion extends Meeting { /** * */ public UnansweredQuestion(Time eventTime, List<Employee> members) { // New duration is 10 minutes according to specs super(eventTime, members, new TimeDuration...
public class TimeDuration { private int minutes = 0; public TimeDuration(int hours, int minutes) { this.minutes = hours * 60 + minutes; } public int getMinutes() { return minutes; } }
import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Time implements Comparable<Time> { private int minutes; public Time(int hours, int minutes) { setTime(hours, minutes); } public Time(Time time) { setTime(0, ...
import java.util.ArrayList; import java.util.List; public class Manager extends Employee { List<Employee> self; public Manager(Schedule schedule) { super(schedule); this.setName("Manager"); self = new ArrayList<Employee>(); self.add(this); } @Override public void scheduleDay() { ...
import java.util.ArrayList; import java.util.List; public class TeamLead extends Developer { private final List<Developer> team; private final int teamNumber; public TeamLead(Schedule schedule, int teamNumber, List<Developer> team) { super(schedule, teamNumber); this.team = team; this.teamNumber...
import java.util.Observable; import java.util.Observer; public class Lunch extends Event implements Observer { private final TimeDuration duration; private Time endOfLunch = null; private final Schedule schedule; public Lunch(Time eventTime, Employee member, TimeDuration duration) { super(eventTime,...
public class ArriveToOffice extends Event { //MUST HAVE THE HIGHEST PRIORITY public ArriveToOffice(Time eventTime, Employee member) { super(eventTime, member); priority = 10; } @Override public void run() { Employee employee = (Employee) Thread.currentThread(); employee.arriveToOffice()...
import java.util.ArrayList; import java.util.List; import java.util.Random; public class Main { private static final int NUM_TEAMS = 3; private static final int NUM_EMPLOYEES_PER_DAY = 3; private static final int NUM_QUESTIONS_PER_DAY = 15; public static final int MINUTE_TIME_IN_MILLIS = 10; publ...
import java.util.concurrent.PriorityBlockingQueue; import java.util.concurrent.atomic.AtomicBoolean; public class PrintBuffer extends Thread { private static PriorityBlockingQueue<Message> messageQueue = new PriorityBlockingQueue<Message>(); //Flush Flag private static AtomicBoolean flush = new AtomicBoole...
public class Developer extends Employee { private int teamNumber; public Developer(Schedule schedule, int team) { super(schedule); setTeam(team); } @Override public void scheduleDay() { int timeGetIntoOffice = (int) (Math.random() * 30); schedule.scheduleEvent(new ArriveToOffice( n...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Observer; import java.util.Timer; import java.util.TimerTask; public class Schedule extends TimerTask { private List<Event> events = new ArrayList<Event>(); priv...
import java.util.ArrayList; import java.util.List; /** * Team Lead Standup Meeting handles the initial meeting that needs * to happen with all the team leads in the morning. * * After the meeting is done it schedules the team meetings with * each Team Lead. * */ public class TeamLeadStandup extend...
package com.google.code.robot; public class Monster { private String loc; private int id; public String getLocation() { return loc; } public int getId() { return id; } public Monster(int id, String loc) { this.id = id; this.loc = loc; } }
package com.google.code.robot; import com.google.code.constant.STATUS; import com.google.code.constant.T; public class Player { private final String username; private final String password; private String nickname; private int lvl; private int ep; private int duelTimes; private int acptTaskNum; ...
package com.google.code.robot; import java.io.File; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.Element; import org.dom4j.io.SAXReader; public class HeroConf { private String file; priv...
package com.google.code.robot; import java.awt.Point; import java.io.BufferedWriter; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.ObjectOutputStream; import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.URL; ...
package com.google.code.datastructure; import java.util.Iterator; import org.jsoup.nodes.Element; public abstract class TreeSearch { public Element DFS(Element el) { Element _el = this.process(el); if (_el != null) return _el; Iterator<Element> els = el.children().iterator(); while (els.has...
package com.google.code.datastructure; import java.util.ArrayList; public class DataTable { private ArrayList<DataColumn> columns; private ArrayList<DataRow> rows; // getter & setter public ArrayList<DataColumn> getColumns() { return this.columns; } public ArrayList<DataRow> getRows() { retu...
package com.google.code.datastructure; public class DataRow { private DataTable dataTable; public DataTable getDataTable() { return this.dataTable; } public void setDataTable(DataTable dataTable) { this.dataTable = dataTable; } // constructor { this.dataTable = null; } public DataR...
package com.google.code.datastructure; public class DataColumn { private String dataType; private DataTable dataTable; private String columnName; // getter & setter public String getDataType() { return this.dataType; } public void setDataType(String dataType) { this.dataType = dataType; } ...
package com.google.code.datastructure; public class Interval { private int start; private int end; public int getStart() { return start; } public int getEnd() { return end; } public Interval(int start, int end) { this.start = start; this.end = end; } public Interval(String inter...
package com.google.code.web; /** * Represents a HTTP header. */ public interface Header { /** * Gets the header name. */ public String getName(); /** * Gets the header value. */ public String getValue(); }
package com.google.code.web; public class HttpHeader implements Header { private final String name; private final String value; public HttpHeader(String name, String value) { this.name = name; this.value = value; } public String getName() { return this.name; } public String getValue() {...
package com.google.code.web; import java.io.Serializable; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; @SuppressWarnings("serial") public class HttpCookie implements Serializ...
package com.google.code.web; public class KVPair { private String key; private String val; public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public String getVal() { return this.val; } public void setVal(String val) { this.val = val; } public KVPair(...
package com.google.code.web; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.util.List; import java.util.Map; publi...
package com.google.code.web; import java.io.Serializable; //import java.net.HttpCookie; import java.net.URLConnection; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; public class CookieManager implements Serializable { public static final long serialVersi...
package com.google.code.web; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import java.net.URLEncoder; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import jav...
package com.google.code.web; public interface Parameter { public String getName(); public String getValue(); }
package com.google.code.util; public class RAND { public static double Normal(double miu, double sigma2) { double N = 12; double x = 0, temp = N; do { x = 0; for (int i = 0; i < N; i++) x = x + (Math.random()); x = (x - temp / 2) / (Math.sqrt(temp / 12)); x = miu + x * Math.sqrt(sigma2); } whi...
package com.google.code.util; import com.google.code.constant.ALIGN; public class STRING { public static String Align(String str, int width, ALIGN align) { return Align(str, width, align, ' '); } public static String Align(String str, int width, ALIGN align, char fill) { if (str == null) str = ""; int l...
package com.google.code.util; // RUN TIME EXCEPTION public class RTE { public static String STRING() { return 1 / 0 + ""; } public static int INT() { return 1 / 0; } public static long LONG() { return 1 / 0; } }
package com.google.code.temp; public class TempStrings { /** * @param args */ public static void main(String[] args) { // String str = r.exec(bUrl + "/modules/role_slavery.php"); // String str = r.exec(bUrl + "/modules/view_role.php?role_id=" // +188889); // String str = r.exec(bUrl + "/modules/role_inf...
package com.google.code.main; import java.util.ArrayList; public class RandomNumberArray { /** * @param args */ public static void main(String[] args) { ArrayList<Integer> tmp = new ArrayList<Integer>(); for (int i = 2; i < 255; i++) tmp.add(i); String str = ""; int sz = tmp.size(); while (sz > 0...