text stringlengths 14 410k | label int32 0 9 |
|---|---|
protected void processInput() {
/*==================================================================
* PROCESS INPUT HERE
*===================================================================*/
if(board.keyDownOnce(KeyEvent.VK_ESCAPE)) {
System.exit(0);
}
//==========================================... | 1 |
void mergeSuccessors(FlowBlock succ) {
/*
* Merge the successors from the successing flow block
*/
Iterator iter = succ.successors.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = (Map.Entry) iter.next();
FlowBlock dest = (FlowBlock) entry.getKey();
SuccessorInfo hisInfo = (Success... | 5 |
void getPersonList(ArrayList<Person> sendingList)
{
Date today = new Date();
String name, zodiac;
int age;
// DefaultTableModel dtModel = new DefaultTableModel();
// Object[] convertedObjects = new Object[4];
// Object[] columnNames = new Object[4];
Object[] con... | 5 |
public String generate() {
String error = "No errors.";
if (details)
System.out.println("Biomes flags: PRODUCE="+ioflags.PRODUCE+", SAVE="+ioflags.SAVE+", LOAD="+ioflags.LOAD);
if (Utils.flagsCheck(ioflags) != 0) {
System.out.println("ERROR: IOFlags object is corrupted, error: "+Utils.flagsCheck(iofla... | 4 |
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
boolean[] self = new boolean[1000001];
for (int i = 1; i <= 1000000; i++) {
int tot = 0, x = i;
while (x / 10 > 0) {
tot += x % 10;
x /= 10;
... | 8 |
public void Unload()
{
currentlyReading = true;
if(hashTable)
hashtable.clear();
else if(hashList)
hashlist.clear();
else if(binaryTree)
binarytree.clear();
else if(naryTree)
narytree.clear();
System.gc();
currentlyReading = false;
} | 4 |
public MenuThing(){
super();
if (System.getProperty("os.name").contains("Mac")) {
System.out.println("The game knows that it is running on Mac OS.");
System.setProperty("apple.laf.useScreenMenuBar", "true"); //make JMenuBars appear at the top in Mac OS X
}
else if (System.getProperty("... | 2 |
public static Integer[] graySuccessor(Integer[] e) {
Integer[] copy = Arrays.copyOf(e, e.length);
if (hammingDist(copy) % 2 == 0) {
copy[0] = 1 - copy[0];
return copy;
} else {
for (int i = 0; i <= e.length - 2; i++) {
if (copy[i] != 0) {
... | 3 |
private List<T> getResults(ResultSet rs) throws SQLException {
List<T> results = new ArrayList<T>();
while (rs.next()) {
T t = fillFrom(rs);
//a.setId(rs.getInt("id"));
//a.setDescr(rs.getString("descr"));
//a.setCh(rs.getInt("ch"));
results.add(t);
}
... | 1 |
private Rule renameVariables(Rule rule) {
int uniqueVariableId = variableIdGenerator.incrementAndGet();
Set<Variable> variables = new HashSet<Variable>();
// At first I'll get a list of all variables that appear in the head of the rule.
for (Term term : rule.getHead().getArgs()) {
... | 6 |
public String extend(String s, int l, int r){
if(l == r){
for(;l-1 >= 0 && r+1 < s.length(); --l, ++r){
if(s.charAt(l-1) != s.charAt(r+1)) break;
}
return s.substring(l, r+1);
}else{
for(; l >= 0 && r < s.length(); --l, ++r){
... | 8 |
private void decodeHeader(BufferedReader in, Map<String, String> pre, Map<String, String> parms, Map<String, String> headers)
throws ResponseException {
try {
// Read the request line
String inLine = in.readLine();
if (inLine == null) {
... | 9 |
public void menuPanelUpdate() {
playerHealth.setText("Health: " + theGame.getPlayer(0).getHealth());
money.setText("Moneys: $" + theGame.getPlayer(0).getMoney());
time.setText("Time: " + theGame.getTime() + "\n Round: " + theGame.getCurrentMap().getCurrentLevel());
if (theGame.getCurrentTowerInfo() != null) {
... | 6 |
@Override
public String getName() {
return NAME;
} | 0 |
private Object readBigInteger() {
byte[] longintBytes = new byte[8];
longintBytes[0] = bytes[streamPosition++];
longintBytes[1] = bytes[streamPosition++];
longintBytes[2] = bytes[streamPosition++];
longintBytes[3] = bytes[streamPosition++];
longintBytes[4] = bytes[streamPosition++];
longintBytes[5] = byte... | 0 |
public void wakeUpPlayer(boolean par1, boolean par2, boolean par3)
{
this.setSize(0.6F, 1.8F);
this.resetHeight();
ChunkCoordinates var4 = this.playerLocation;
ChunkCoordinates var5 = this.playerLocation;
Block block = (var4 == null ? null : Block.blocksList[worldObj.getBlock... | 9 |
public Set<Map.Entry<Byte,Long>> entrySet() {
return new AbstractSet<Map.Entry<Byte,Long>>() {
public int size() {
return _map.size();
}
public boolean isEmpty() {
return TByteLongMapDecorator.this.isEmpty();
}
public ... | 8 |
public Equivalence deserialize(JsonElement json,
Type type,
JsonDeserializationContext context) throws JsonParseException {
return this.getEquivalence(json.getAsJsonArray().get(0));
} | 0 |
@Override
public Container getCurrentContainer() {
if (containerStack.size() > 0) {
return (Container) containerStack.get(containerStack.size() - 1);
} else {
return this;
}
} | 1 |
public CheckResultMessage check10(int day) {
return checkReport.check10(day);
} | 0 |
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
FileRights other = (FileRights) obj;
if (!Arrays... | 6 |
private Enemy createRandomEnemy()
{
int random = new Random().nextInt(4);
switch (random) {
case 0:
return new Dwarf(this);
case 1:
return new Elf(this);
case 2:
return new Hobbit(this);
case 3:
return new Human(this);
}
return null;
} | 4 |
@RequestMapping(value = {"/SucursalBancaria/{idSucursalBancaria}"}, method = RequestMethod.DELETE)
public void delete(HttpServletRequest httpRequest, HttpServletResponse httpServletResponse, @PathVariable("idSucursalBancaria") int idSucursalBancaria) {
try {
sucursalBancariaDAO.delete(idSucursal... | 2 |
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!super.equals(obj)) {
return false;
}
if (!(obj instanceof OFPortMod)) {
return false;
}
OFPortMod other = (OFPortMod) obj;
if (adve... | 8 |
public EmptyStringCharacterAction() {
//super("Test Turing Machines", null);
super("Set the Empty String Character", null);
putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_P,
MAIN_MENU_MASK));
this.fileChooser = Universe.CHOOSER;
} | 0 |
public boolean isPalindrome(String s) {
if (s.length() == 0) {
return true;
}
s = s.toLowerCase();
int start = 0;
int end = s.length() - 1;
while (start <= end) {
while (start < s.length() && !isCharNum(s.charAt(start))) {
start++;
... | 8 |
public static void main(String[] args) {
// test divide by zero - should print an error and exit
new Fraction(1, 0);
// test multiply
Fraction f = new Fraction(3,10);
Fraction g = new Fraction(1,2);
Fraction h = new Fraction(3,5);
if (!f.equals(g.multiply(h))) System.out.println("Multiply f... | 6 |
protected void doTestCycAccess10(CycAccess cycAccess) {
long startMilliseconds = System.currentTimeMillis();
try {
// demonstrate quoted strings
//cycAccess.traceOn();
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("a");
stringBuffer.append('"');
stringB... | 2 |
public Rating addRatings(HashMap<String, Object> rat) {
@SuppressWarnings("unchecked")
HashMap<String, String> holder = (HashMap<String, String>)rat.get("rating");
if(holder.containsKey("authorsId")) this.authorsId = holder.get("authorsId");
if(holder.containsKey("comment")) this.comment = holder.get("comment")... | 4 |
public static User findOneAdmin() {
try
{
return User.findOne("isAdmin", "1");
} catch (SQLException e)
{
e.printStackTrace();
return null;
}
} | 1 |
public HospitalFacade() {
super(Hospital.class);
} | 0 |
public IndexedModel toIndexedModel()
{
IndexedModel result = new IndexedModel();
IndexedModel normalModel = new IndexedModel();
HashMap<OBJIndex, Integer> resultIndexMap = new HashMap<OBJIndex, Integer>();
HashMap<Integer, Integer> normalIndexMap = new HashMap<Integer, Integer>();
HashMap<Integer, Integer> i... | 8 |
private void logout() {
try {
sendToServer(Packet.getLogoutPacket());
PacketManager.readPacketFromStream(in);
} catch(Exception e) {}
try {
out.close();
} catch(Exception e) {}
try {
in.close();
} catch(Exception e) {}
... | 4 |
public static Description coerceToDescription(Stella_Object self, Stella_Object original) {
if (original == null) {
original = self;
}
if (self == null) {
System.out.println("Can't find a description for the object `" + original + "'.");
return (null);
}
{ Surrogate testValue000 = ... | 8 |
private static boolean isNoneHexChar(char c) {
// make sure the char is the following
return !(((c >= 48) && (c <= 57)) || // 0-9
((c >= 65) && (c <= 70)) || // A-F
((c >= 97) && (c <= 102))); // a-f
} | 5 |
public SelectTaskXmlDriver(String xmlStr) throws DocumentException,
XmlTypeErrorException {
super();
if (!isSelectTaskXml(xmlStr)) {
throw new XmlTypeErrorException("not a valid selectTask Xml");
}
document = DocumentHelper.parseText(xmlStr);
timestamp = d... | 6 |
private void compareFrames()
{
int r, g, b,
refDataInt, inDataInt,
ip = 0, op = 0,
x = 0, y = 0;
byte result;
while (ip < refData.length)
{
refDataInt = (int) refData[ip] & 255;
inDataInt = (int) this.inData[ip++] & 255;
... | 5 |
private ClusterList beginBottomUp() {
Cluster newCluster;
ClusterList firstClusterList = new ClusterList();
for (int i = 0; i < this.instances.numInstances(); i++) {
newCluster = new Cluster(this.instances.instance(i));
firstClusterList.add(newCluster);
}
return firstClusterList;
} | 1 |
public void pad(int width) throws IOException {
int gap = (int) this.nrBits % width;
if (gap < 0) {
gap += width;
}
if (gap != 0) {
int padding = width - gap;
while (padding > 0) {
this.zero();
padding -= 1;
... | 3 |
public List<String> getLinks() {
Pattern pattern = Pattern.compile("(?i)(?s)<\\s*?iframe.*?href=\"(.*?)\".*?>");
Matcher matcher = pattern.matcher(content);
List<String> list = new ArrayList<String>();
while (matcher.find()) {
list.add(matcher.group(1));
}
return list;
} | 1 |
public String isInteresting(String x){
int n = x.length();
boolean[] visited = new boolean[n];
for(int i=0; i<n-1; i++){
if(!visited[i]){
visited[i]=true;
boolean found=false;
for(int j=i+1; j<n; j++){
if(!visited[j]... | 8 |
public boolean[] getMarkers(boolean colour) {
if (colour) {
return markersBlack;
} else {
return markersRed;
}
} | 1 |
@Override
public String niceCommaList(List<?> V, boolean andTOrF)
{
String id="";
for(int v=0;v<V.size();v++)
{
String s=null;
if(V.get(v) instanceof Environmental)
s=((Environmental)V.get(v)).name();
else
if(V.get(v) instanceof String)
s=(String)V.get(v);
else
continue;
if(V.size(... | 7 |
@Override
public ExecutionContext run(ExecutionContext context) throws InterpretationException {
int x = DrawingZone.turtle.getPosX();
int y = DrawingZone.turtle.getPosY();
Value value = ((AbsValueNode) this.getChildAt(0)).evaluate(context);
if (value.getType() == VariableType.NUMBE... | 3 |
@Test
public void testLoadFile()
{
// String ergebnisstring1 = "";
// String ergebnisstring2 = "Hallo, ich bin ein\nZeilenumbruch ";
// String ergebnisstring3 = "Gesperrtes File";
// // // String ergebnisstring4 =
// // // "D�ner mit So�e & einer b�rigen t�rkischen Bananen & Co KG";
// //
// assertEquals(... | 0 |
public void setFrontLeftThrottle(int frontLeftThrottle) {
this.frontLeftThrottle = frontLeftThrottle;
if ( ccDialog != null ) {
ccDialog.getThrottle1().setText(Integer.toString(frontLeftThrottle) );
}
} | 1 |
@Override
public void run() {
ClientHandler c;
stop = false;
if (!isConnected())
throw new IllegalStateException("Service not connected!");
pool = Executors.newCachedThreadPool(new ClientThreadFactory(
getUncaughtExceptionHandler()));
try {
try {
while (!stop) {
c = new ClientHandler(ns... | 7 |
private void move() {
xa = 0;
ya = 0;
List<Player> players = level.getPlayers(this, 50);
if (players.size() > -0) {
Player player = players.get(0);
if (x < player.getX()) xa += speed;
if (x > player.getX()) xa -= speed;
if (y < player.getY()) ya += speed;
if (y > player.getY()) ya -= speed;
}
... | 7 |
public boolean subst(ASTree newObj, ASTree oldObj) {
for (ASTList list = this; list != null; list = list.right)
if (list.left == oldObj) {
list.left = newObj;
return true;
}
return false;
} | 2 |
@EventHandler
public void MagmaCubeRegeneration(EntityDamageByEntityEvent event) {
Entity e = event.getEntity();
Entity damager = event.getDamager();
String world = e.getWorld().getName();
boolean dodged = false;
Random random = new Random();
double randomChance = plugin.getMagmaCubeConfig().getDouble("Mag... | 6 |
public HandlerQueue buildHandlerQueue (Class<? extends IEvent> event) {
// create handler queue
HandlerQueue queue = new HandlerQueue ();
// append queues
if (this.handlerMap.containsKey (event)) queue.addAll (this.handlerMap.get (event));
// search for child
if (event.getSuperclass () != null) {
Class... | 5 |
public static void ShowEnumSet(EnumSet<FontConstant> enumset)
{
for(Iterator<FontConstant> iter = enumset.iterator();iter.hasNext();)
{
System.out.println(iter.next());
}
} | 1 |
public void train(StringWrapperIterator i0)
{
SourcedStringWrapperIterator i = (SourcedStringWrapperIterator)i0;
Set seenTokens = new HashSet();
while (i.hasNext()) {
BagOfSourcedTokens bag = asBagOfSourcedTokens(i.nextSourcedStringWrapper());
seenTo... | 6 |
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof User)) return false;
User user = (User) o;
if (!creationdate.equals(user.creationdate)) return false;
if (!email.equals(user.email)) return false;
if (!id.equals(user.id)) ret... | 8 |
public void terminate() {
// If we have any branches which should not be taken,
// we need to create a failure handler for if they were taken.
if (generateGlobalNotTaken) {
// XXX: In the future, if we want to set specific flags here,
// can add more instructions after th... | 7 |
public Address getIndirizzo() {
return indirizzo;
} | 0 |
public void getBusiness() throws IOException{
while (true) {
String line = reader1.readLine();
if (line==null) break;
try{
JSONObject business = new JSONObject(line);
String b_id = business.getString("business_id");
List<String> categories = new ArrayList<String>();
JSONArray rawcategories = ... | 4 |
public static void copyFile(File inF, File outF) throws IOException {
// TODO Auto-generated method stub
//System.out.println("Copying");
@SuppressWarnings("resource")
FileChannel inChannel = new FileInputStream(inF).getChannel();
@SuppressWarnings("resource")
FileChannel... | 3 |
public int uniquePathsWithObstacles(int[][] obstacleGrid) {
if (obstacleGrid == null || obstacleGrid.length == 0) return 0;
int row = obstacleGrid.length, col = obstacleGrid[0].length;
int hash[][] = new int[row][col];
for (int i = 0; i < col; i++) {
if (obstacleGrid[0][i] ==... | 9 |
public static Hand getBestHand(Card[] hole, Card[] communalCards) {
assert hole.length == 2;
assert communalCards.length == 5;
Hand[] allHands = new Hand[21];
Card[] available = new Card[]{hole[0],hole[1],communalCards[0], communalCards[1],communalCards[2],communalCards[3],communalCards[4]};
int counter = 0;... | 4 |
public static Boolean readFile(ByteBuffer buffer, FileTransfer fileReceiver){
ByteBuffer readBuffer = buffer.asReadOnlyBuffer();
buffer.limit(50);// 读取50个字节,解析获取内容的长度,内容长度最大为4个FFFF(4个字节),再加上2个字节\r\n
String msg = CoderUtils.decode(buffer);
if(!MyStringUtil.isBlank(msg)){// 上传文件的请求头
if(fileReceiver.isReadH... | 3 |
public void tagVirts() {
for (Clazz clazz : classes.values()) {
clazz.tagVirts(this);
}
for (DirManager dir : subDirs) {
dir.tagVirts();
}
} | 2 |
public void setCoef(String coef) {
this.coef = coef;
} | 0 |
@Override
public String toString() {
return this.nodeString(0);
} | 0 |
public void alertNext() {
scenesCounter++;
if(scenesCounter<scenePics.size()){
scene=scenePics.get(scenesCounter);
}else{
if(nextLevel.startsWith("b")){
getKarpfenGame().setLvl(new BossLevel(nextLevel, getKarpfenGame()));
}else if(nextLevel.startsWith("s")){
getKarpfenGame().setStory(new Storyli... | 3 |
public void showValues() {
String attribute;
ArffSortedTableModel model;
ArffTable table;
HashSet values;
Vector items;
Iterator iter;
ListSelectorDialog dialog;
int i;
int ... | 7 |
@Override
public boolean equals(Object o)
{
if (this == o) return true;
if (!(o instanceof FilterSet)) return false;
FilterSet filterSet = (FilterSet) o;
if (filters != null ? !filters.equals(filterSet.filters) : filterSet.filters != null) return false;
return true;
... | 4 |
public boolean instanceOf(Object obj, String className)
throws InterpreterException {
Class clazz;
try {
clazz = Class.forName(className);
} catch (ClassNotFoundException ex) {
throw new InterpreterException("Class " + ex.getMessage()
+ " not found");
}
return obj != null && clazz.isInstance(obj... | 2 |
private void addListener() {
final MainViewController mainViewController = this;
mainView.setAboutMenuListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
new AboutPanel();
}
});
mainView.setServerConfigMenuListener(new ActionListener() {
@Override
public vo... | 9 |
@Override
public void executeCurrentTasks() {
System.out.println("Thread: " + threadId + " is executing a task");
setThreadState(THREAD_STATE.RUNNING);
// System.out.println("Task list size: " + taskList.size());
for (int i = 0; i < taskList.size(); i++) {
Task task = taskList.remove(i);
// System.out... | 5 |
static void maybeDebugWarn(final String message, final boolean force) {
if (DEBUG_ALL || force) {
System.err.println(getTimestamp() + " " + message);
}
} | 2 |
public void closePanel(String chan) {
int index = indexOfTab(chan);
if (index != -1) {
tabs.removeTabAt(index);
if (index <= lastChanIndex)
lastChanIndex--;
}
setSelectedTab();
tabs.revalidate();
} | 2 |
@Before
public void setUp() throws Exception {
words = Lists.newArrayList();
for (int i = 0; i < 10; i++) {
words.add("Eric");
}
for (int i = 0; i < 30; i++) {
words.add(String.valueOf(i));
}
for (int i = 0; i < 50; i++) {
words.... | 3 |
public void setPersonId(int personId) {
this.personId = personId;
} | 0 |
private void initGui(Stage primaryStage) {
this.stage = primaryStage;
// splitPaneHoriz = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPanel, splitPaneVerti);
// splitPaneHoriz.setResizeWeight(0);
// splitPaneHoriz.setDividerLocation(250);
// splitPaneHoriz.addPropertyChangeListener(JSplitPane.DIVIDE... | 4 |
private void humanMove(int playerNumber){
boolean setCell = false;
while (true){
int x = 0,y = 0;
while (!setCell) {
x = GetData.GetXCoordinateOfCell(field);
y = GetData.GetYCoordinateOfCell(field);
if (playerNumber == FIRST_PLAYER... | 6 |
public String [] getOptions() {
String [] options = new String [16];
int current = 0;
if (m_noCleanup) {
options[current++] = "-L";
}
if (!m_collapseTree) {
options[current++] = "-O";
}
if (m_unpruned) {
options[current++] = "-U";
} else {
if (!m_subtreeRaising)... | 9 |
private void logErrorsFile(byte[] data) throws IOException {
if (ProduceCSV.produceLog) {
if (errorsFile.size() == 0) {
return;
}
if (fileErrorLog == null) {
openErrorLogFile();
}
fileErrorLog.println("------");
... | 4 |
private Boolean potEqual(Table table) {
boolean allEqual = true;
int max = 0;
for (Player player : table.getPlayers()) {
if (player == null) {
continue;
}
System.out.println("player : " + player.getName() + " : status : " + player.... | 6 |
public void buttonListener(int cell){
switch (cell){
case 1: _x = 1; _y = 1; break;
case 2: _x = 2; _y = 1; break;
case 3: _x = 3; _y = 1; break;
case 4: _x = 1; _y = 2; break;
case 5: _x = 2; _y = 2; break;
case 6: _x = 3; _y = 2; break;
... | 9 |
public byte[] toByteArray() {
return cw == null ? null : cw.toByteArray();
} | 1 |
public static void main(String[] args) {
logger.setLevel(Level.SEVERE);
ConsoleHandler handler = new ConsoleHandler();
handler.setLevel(Level.SEVERE);
logger.addHandler(handler);
if (args.length == 0) {
logger.warning("Invalid arguments count.");
return;
... | 6 |
public Object nextValue() throws JSONException {
char c = nextClean();
String s;
switch (c) {
case '"':
case '\'':
return nextString(c);
case '{':
back();
return new JSONObject(this);
case '[':
... | 8 |
public static void omniData(Object m){
rover = head;
while(rover != null){
if(rover.status == 1){
rover.sendObject(m);
}
rover = rover.next;
}
} | 2 |
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
HttpSession session = request.getSession(true);
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
session.removeAttribute("error... | 7 |
long largestPrimeFactor(long number){
ArrayList<Integer> list=new ArrayList<Integer>();
for(int i=2;i<number;i++){
boolean isPrime=false;
for(Integer prime:list){
if(i%prime==0){
isPrime=true;
break;
}
}
if(isPrime)
continue;
list.add(i);
if(number%i==0){
while(number... | 7 |
public void openRd(String filename) {
try {
this.close();
this.filename = filename;
inf = true;
file = new File(this.filename);
sc = new Scanner(file);
} catch (FileNotFoundException e) {
ExceptionLog.println("Ошибка открытия файла ... | 2 |
private void connect() throws Exception {
// // 创建SSLContext对象,并使用我们指定的信任管理器初始化
// TrustManager[] tm = { new MyX509TrustManager() };
// SSLContext sslContext = SSLContext.getInstance("SSL", "SunJSSE");
// sslContext.init(null, tm, new java.security.SecureRandom());
// // 从上述SSLContext对象中... | 2 |
public boolean treeContains(CoreInterface ci){
if(ci.getClass() == Dvd.class){
if(dvdTree.contains(ci)){
return true;
}
return false;
}else if(ci.getClass() == Location.class){
if(locationTree.contains(ci)){
return true;
}
return false;
}else if(ci.getClass() == Genre.class){
if(genre... | 6 |
private boolean isLocationInPicture(final int x, final int y) {
boolean result = false; // the default is false
if ((x >= 0) && (x < this.picture.getWidth()) && (y >= 0)
&& (y < this.picture.getHeight())) {
result = true;
}
return result;
} | 4 |
@EventHandler
public void WitherMiningFatigue(EntityDamageByEntityEvent event) {
Entity e = event.getEntity();
Entity damager = event.getDamager();
String world = e.getWorld().getName();
boolean dodged = false;
Random random = new Random();
double randomChance = plugin.getZombieConfig().getDouble("Wither.M... | 7 |
public void configQuickstart(Object args[]) {
//
//
final TerrainGen TG = new TerrainGen(
64, 0.0f,
Habitat.ESTUARY, 0.15f,
Habitat.MEADOW , 0.35f,
Habitat.BARRENS, 0.35f,
Habitat.DUNE , 0.15f
) ;
final World world = new World(TG.generateTerrain()) ;
TG.setupMi... | 5 |
public boolean sabotiere( int auswahl )
{
boolean erfolgreich = false;
switch ( auswahl )
{
case 1:
erfolgreich = goldStehlen();
break;
case 2:
erfolgreich = gebaeudeZerstoeren();
break;
case 3:
erfolgreich = kornVergiften();
break;
case 4:
erfolgreich = zufriedenheitVerri... | 4 |
public String prepareURL(String method, HashMap<String, String> params)
throws IllegalArgumentException {
String ret = Connection.baseURL + method + "?";
boolean first = true;
boolean illegalMethod = true;
// Validate given method is a supported method
for (final String s : Connection.method... | 9 |
public static void continueDealing(long currentTime) {
if (!isDealing) {
return;
}
if (numCardsDealt >= Game.NUM_INITIAL_CARDS) {
Game.linkedGet().flipCard();
isDealing = false;
return;
}
if (currentTime - initialTime >= DEAL_DELA... | 4 |
public void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2d = (Graphics2D) g;
// Draw the ghost Tetromino
g2d.setColor(Color.LIGHT_GRAY);
for (Point p : myWorld.generateGhostBlockCoordinates()) {
g2d.drawRect(p.x * blockSize + 3, p.y * blockSize + 3,
blockSize - 6, blockSize - 6)... | 5 |
private void startup() {
HSSettings settings = HSSettings.getInstance();
// The channel store loads its current set of channels. If no channel
// list is found then a default set of channels will be loaded into the
// list.
channelStore.setItemHistory(itemHistory);
chann... | 7 |
private static void removeEmptyComments(File directory) throws IOException {
for (File file : directory.listFiles()) {
if (file.isDirectory()) {
removeEmptyComments(file);
} else {
for (String currentEnding : CONFIG.getFileEndingsToCheck()) {
... | 7 |
public String mapMethodName(String owner, String name, String desc) {
String s = map(owner + '.' + name + desc);
return s == null ? name : s;
} | 1 |
public Key delMin() {
if (isEmpty())
throw new java.util.NoSuchElementException();
Key min = pq[1];
exch(1, N--);
sink(1);
pq[N + 1] = null;
if (N == pq.length / 4)
resize(pq.length / 2);
return min;
} | 2 |
Subsets and Splits
SQL Console for giganticode/java-cmpx-v1
The query retrieves a limited number of text entries within a specific length range, providing basic filtering but minimal analytical insight.