text
stringlengths
14
410k
label
int32
0
9
private void normalMode() { boolean isDropBomb; int count = 0; gameMode = "Normal Mode"; System.out.println("----------- NORAML MODE -----------"); System.out.println("Tip: Press \"Q\" for quit Game"); while (true) { Coordinate dropBomb = this.inputPosition();...
6
public JSONObject toJSONObject(JSONArray names) throws JSONException { if (names == null || names.length() == 0 || this.length() == 0) { return null; } JSONObject jo = new JSONObject(); for (int i = 0; i < names.length(); i += 1) { jo.put(names.getString(i), this....
4
private void handleLs(String[] cmdLine){ if(0 == workersMap.size()) System.out.println("no worker in system"); else{ for(int i : workersMap.keySet()){ //System.out.println("id "+i+"status "+workerStatusMap.get(i)); if(workerStatusMap.get(i) == -1) ...
3
@Override public Object call() throws Exception { E item = null; while (!Thread.currentThread().isInterrupted()) { lock.lock(); // wait while the queue is empty notEmpty.await(); // new client came to the queue try { ...
1
private static int traverseParallel(Node node, CharSequence[] strings, int pos, int deep, List<Callable<Object>> jobs) { final int BIND_LIMIT = THRESHOLD / SUBBUCKET_THRESHOLD; for (char c = 0; c < ALPHABET; c++) { int count = node.size(c); if (count < 0) { ...
9
private void jButtonJouerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonJouerActionPerformed // Recuperation de la taille du tableau choisie String[] taille = ((String)this.jComboBoxTailleGrilles.getSelectedItem()).split("x"); int x = Integer.parseInt(taille[0]); ...
2
private void startMelangeAlphanumerique(){ boolean valeurValide; while(true){ valeurValide = true; String chaineACoder = ""; int choixDecalage = 1; System.out.println("Entrez la phrase à melanger: "); chaineACoder = sc.nextLine(); System.out.println("Choisissez le decalage:"); try{ choix...
4
private void heuristicInreply(List<MM2Message> messages, Connection connection) { // This is the msg_id ==> in-reply-to Hashtable<String, String> msg_id_to_message_id = new Hashtable<String, String>(); // This is message-id ==> msg_id Hashtable<String, String> message_id_to_msg_id = new Hashtable<String, Str...
9
public int getTailleY() { return plateau.getTailleY(); }
0
public int getMinimum(String[] area) { Map<String, Integer> repeatedNum = new HashMap<String, Integer>(); int average = 0; int totalDiff = 0; int max = 0; for(String str : area) { for(int i=0; i<str.length(); i++) { Integer val = repeatedNum.get(new String(""+str.charAt(i))); if(val == null) { ...
9
static String[] matchPrefixedField(String prefix, String rawText, char endChar, boolean trim) { Vector matches = null; int i = 0; int max = rawText.length(); while (i < max) { i = rawText.indexOf(prefix, i); if (i < 0) { break; } i += prefix.length(); // Skip past this pr...
9
public final void setWrapWidth(double wrapWidth) { this.wrapWidth.set(wrapWidth); }
0
private void createContent(){ if(contentPanelContent == null){ contentPanelContent = new JPanel(); } // TODO Create Method contentPanelContent.add(new JLabel("Dummy")); }
1
boolean hasAnnotations(ChangeEffect changeEffect) { return changeEffect.getMarker() != null // Do we have a marker? && (changeEffect.getMarker() instanceof Custom) // Is it 'custom'? && ((Custom) changeEffect.getMarker()).hasAnnotations() // Does it have additional annotations? ; }
2
public void listarProjetos() { ProjetoBO projet = new ProjetoBO(); try { tbProjetos.setModel(DbUtils.resultSetToTableModel(projet.preencheTabela(usuarioLogado.getDepartamento().getCodigo()))); } catch (SQLException ex) { } }
1
public ClosedLoop copy(){ if(this==null){ return null; } else{ ClosedLoop bb = new ClosedLoop(); this.copyBBvariables(bb); bb.nFeedbackBoxes = this.nFeedbackBoxes; bb.checkNoMix = this.checkNoMix; bb.checkConsolidate = this...
3
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://down...
6
public static OOXMLElement parseOOXML( XmlPullParser xpp ) { HashMap<String, String> attrs = new HashMap<>(); try { int eventType = xpp.getEventType(); while( eventType != XmlPullParser.END_DOCUMENT ) { if( eventType == XmlPullParser.START_TAG ) { String tnm = xpp.getName(); if( tnm.eq...
7
public void stopPlugins() { final Thread curThread = Thread.currentThread(); for (int i = 0; i < pluginsToRun.size(); i++) { final IRCPlugin plugin = pluginsToRun.get(i); if (plugin != null && plugin.isActive()) { if (pluginThreads.get(i) == curThread) { ...
5
public static ArrayList<Integer> getMinCoins2(int[] denoms, int sum) { ArrayList<Integer> vals = new ArrayList(); if (sum == 0) { return vals; } if (sum <= -1) { return null; } ArrayList<ArrayList<Inte...
8
private void encrypt(){ System.out.println("going to encrypt: " + historyFile + " end of file."); BigInteger keyString = init.getHpwd(); // setup AES cipher in CBC mode with PKCS #5 padding Cipher cipher = null; try { cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); } catch (NoSuchAlgorithmException...
8
public boolean getBoolean(String key) throws JSONException { Object object = get(key); if (object.equals(Boolean.FALSE) || (object instanceof String && ((String)object).equalsIgnoreCase("false"))) { return false; } else if (object.equals(Boolean.TRUE) ...
6
@GET @Path("/{username}") @Produces(MediaType.LIBROS_API_USER) public User getUser(@PathParam("username") String username) { User user = new User(); Connection conn = null; Statement stmt = null; String sql; try { conn = ds.getConnection(); } catch (SQLException e) { throw new ServiceUnavailableEx...
4
public void run() throws IOException { this.welcomingSocket = new ServerSocket(port); this.welcomingSocket.setSoTimeout(100000); try { System.out.println("Waiting for client on port " + welcomingSocket.getLocalPort() + "..."); Socket server = welcomingSocket.accept(); System.out.println("Local s...
6
private ArrayList<String> getRelevantOperands(String format) { ArrayList<String> relevantOps = new ArrayList<String>(); String[] mnemFormatSplit = format.split("\\s+"); ArrayList<String> mnemFormatTokens = new ArrayList<String>(); for (String formatTerm : mnemFormatSplit) { formatTerm = formatTerm.repla...
8
private void removeUpgrade(Upgrade upgrade, BodyPart bodyPart){ bodyPart.removeUpgrade(upgrade); upgrade.setUsed(false); }
0
public static double regularisedGammaFunction(double a, double x) { if (a < 0.0D || x < 0.0D) throw new IllegalArgumentException("\nFunction defined only for a >= 0 and x>=0"); boolean oldIgSupress = Stat.igSupress; Stat.igSupress = true; double igf = 0.0D; if (x != 0) { if (x < a + 1.0D) { // Series...
6
public boolean doDownload() throws IOException{ URL fullURL = new URL(srcUrl.toString() + srcFileName); Logger.log("Start downloading file: " + fullURL.toString()); URLConnection uc = fullURL.openConnection(); uc.setReadTimeout(0); String contentType = uc.getContentType(); int contentLength = ...
9
public MobHandler() { for(int i = 0; i < 10; i++) mobs.add(new Mob_GreenGoo()); for(int i = 0; i < 10; i++) mobs.add(new Mob_RedGoo()); for (int i = 0; i < 200; i++) { mobs.add(new Mob_Mouse()); } Console.log("Initialized GreenGoo"); }
3
public boolean canRatGoForward(MazeRat rat) { int offX = 0, offY = 0; switch (rat.dir) { case EAST: offX = 1; break; case NORTH: offY = -1; break; case SOUTH: offY = 1; break; case WEST: offX = -1; break; default: return false; } try { return (maze[rat.position.y + offY]...
5
public void ensureCapacity(int capacity) { if(data == null) { data = new byte[capacity]; } else if (data.length < capacity) { byte[] nb = new byte[capacity]; System.arraycopy(data, 0, nb, 0, data.length); data = nb; } }
2
public void drawLines(GC gc) { ArrayList<Wall> wallsList; if (intersectionPoints.size() != 0) { Drawer.drawLine(gc, new Point2D(0, y), intersectionPoints.get(0), Main.backgroundColor); Drawer.drawLine(gc, intersectionPoints.get(intersectionPoints.size() - 1), new Point2D(Constant...
9
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + dimensionCount; result = prime * result + dimensionNumBytes; result = prime * result + ((docValuesType == null) ? 0 : docValuesType.hashCode()); result = prime * result + indexOptions.hashCode(); ...
9
public TravelTrip findById(int id){ return em.find(TravelTrip.class, id); }
0
*/ public void display(Graphics2D g) { if ((freeColClient.getGame() != null) && (freeColClient.getGame().getMap() != null) && (focus != null) && freeColClient.isInGame()) { removeOldMessages(); displayMap(g); } else { ...
6
public int multiply(int n1, int n2) { if (n1 == 0 || n2 == 0) { // edge case return 0; } else if ( n2 < 0 ) { return - n1 + multiply(n1, n2 + 1); } else { return n1 + multiply(n1, n2 - 1); } }
3
public void chcur(Gob cur) { this.cur = cur; GobHealth hlt = cur.getattr(GobHealth.class); fx = null; if (hlt != null) fx = hlt.getfx(); if (cur.highlight != null) { long t = System.currentTimeMillis(...
5
private static List<Operation> getOperations(char[] source, char[] target, int[][] positionMinimum) { List<Operation> operations = new ArrayList<>(); boolean stop = false; int i = source.length; int j = target.length; Character operandeG; Character operandeD; wh...
9
@Test public void equalsShouldWorkAccordingToContract() { Chance coinToss = new Chance(0.5); assertFalse(coinToss.equals(null)); }
0
private static Integer getInt() { Boolean flag; int numInt = 0; do { Scanner scanner = new Scanner(System.in); try { numInt = scanner.nextInt(); flag = true; } catch (Exception e) { flag = false; System.out.println("Input type mismatch!"); System.out.print("Please input in Integer: ")...
2
@Test public void setTiles(){ Tile[][] tiles = new Tile[10][10]; for (int x = 0; x < tiles.length; x++){ for(int y = 0; y < tiles[0].length; y++){ tiles[x][y] = new Tile(new Position(x, y), 0); } } World w = new World(null); w.setTiles(tiles); assertTrue(w.getTiles().length == 10 && w.ge...
3
@Override public void actionPerformed(ActionEvent ae) { // TODO Auto-generated method stub if(ae.getSource()==comboBox1 ){ //System.out.println(comboBoxRoom); RoomDataSource roomDS = new RoomDataSource(); List<edu.cgu.ist303.db.Room> roomSingle = new ArrayList<edu.cgu.ist303.db.Room>(); roomSing...
7
@Override public boolean supportsDocumentAttributes() {return true;}
0
public WareHouseKeeper(Player player, Day current, BackToSchool frame){ backgroundSong = new Sound("sounds/Background/POL-misty-cave-short.wav"); backgroundSong.playSound(); student = player; day = current; this.frame = frame; earnedPercentage=0; int delay = 1000; //milliseconds...
8
@Override public void run() { while(true) { if(kayttajanKomento != Komento.EI_KOMENTOA) kasitteleKayttajanKomento(); if(!peliOnKaynnissa()) this.pelitilanteenPiirtaja.paivitaTilanne(); else { ...
4
public Ikkuna(Pelaaja pelaaja, Kamera kamera) { super(); this.pelaaja = pelaaja; this.kamera = kamera; }
0
public void getNextPosition() { if (left) { dx -= moveSpeed; if (dx < -maxSpeed) dx = -maxSpeed; } else if (right) { dx += moveSpeed; if (dx > maxSpeed) dx = maxSpeed; } if (falling && !ignoreGravity) dy += fallSpeed; }
6
@Override /**Observer Interface method. It executes when a message is received.*/ public void update(Observable obs, Object obj) { NetworkMessage message = (NetworkMessage)obj; //If we are greeted, we say hi back. if(message.getType() == NetworkMessage.TYPE_HELLO){ sender.sen...
1
public String guessName() { if (shadow != null) { while (shadow.shadow != null) { shadow = shadow.shadow; } return shadow.guessName(); } if (name == null) { Enumeration enum_ = hints.elements(); while (enum_.hasMoreElements()) { Hint hint = (Hint) enum_.nextElement(); if (type.isOfType(...
9
public int getRowsCount() { return m_rowsCount; }
0
private List<ProductIon> addProductIonListByCharge(PrecursorIon precursorIon, int charge) { List<ProductIon> ionList = new ArrayList<ProductIon>(); switch (ionPair) { case B_Y: ionList.addAll(ProductIonFactory.createDefaultProductIons(precursorIon, ProductIonType.B, charge))...
9
boolean isSubset( BitSet bs1, BitSet bs2 ) { for ( int i = bs1.nextSetBit(0);i>=0;i=bs1.nextSetBit(i+1) ) if ( bs2.nextSetBit(i)!=i ) return false; return true && bs2.cardinality()>bs1.cardinality(); }
3
@Override public void setMyProcess(Process p) { // Nothing here }
0
public static void main(String[] args) { String result = "aAddress, Address Select EmployeeCode,EmployeeName,Address1,Address2,Address3,Addressaa"; String keyWord = "Address"; int position = 0; while(true) { if (position >= result.length()) break; int index = result.indexOf(keyWord, position); i...
7
public static boolean validateHash(byte[] hash1, byte[] hash2) { if (hash1 != null && hash2 != null && hash1.length == hash2.length) { for (int i = 0; i < hash1.length; i++) { if (hash1[i] != hash2[i]) { return false; } } re...
5
@Override //Metodo que permite la modificacion de un producto existente en la BBDD public boolean modificarProducto(TProducto producto) { boolean correcto=false; TransactionManager.obtenerInstanacia().nuevaTransaccion(); try { //Iniciamos la transsacion y bloquea...
5
public ListRender() { setOpaque(true); }
0
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Contact other = (Contact) obj; if (!Objects.equals(this.firstName, other.firstName)) { return...
8
public static HashMap<Float, Integer> mapHitsToScore(File inputFile) throws Exception { System.out.println("PARSING: " + inputFile.getAbsolutePath()); BufferedReader reader = inputFile.getName().toUpperCase().endsWith("GZ") ? new BufferedReader(new InputStreamReader( new GZIPInputStream( new FileInp...
6
public IInfoflowConfig getSootConfig() { return this.sootConfig; }
0
private int getNextRosterID() { int m = 0; for (Roster r: rosters) { if (r.getRosterID() > m) { m = r.getRosterID(); } } return m+1; }
2
public static int [][] getVectors(String fileLocation) throws FileNotFoundException{ File file = new File(fileLocation); Scanner scan = new Scanner(file); //instantiate ArrayList to store inputs ArrayList<String> input = new ArrayList<String>(); while(scan.hasNextLine()) input.add(scan.nextLine()); //add ...
3
public void addToPlace(String value, int number) { ListElement index = head; if (number == 1 || index == null) { addToBegin(value); } if ((number > 1) && (number <= numberOfElements())) { while (index.next != null) { for (int i = 1; i < number - 1;...
8
private void initialiseComponents() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } catch (InstantiationExc...
5
public Game createNewGame(Game game) { try { Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); String url = "jdbc:derby:" + DBName; Connection connection = DriverManager.getConnection(url); Statement statement = connection.createStatement(); PreparedStatement pstmt = connection.prepareStatemen...
4
public boolean deleteBooking(int id){ Booking booking = null; try { booking = getBookingDao().queryForId(id); if(booking!=null){ for(Room room : getRoom(booking)){ removeRoomTo(booking, room); } for(Equipment equipment : getEquipment(booking)){ removeEquipmentTo(booking, equi...
4
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); DateFormat df = new SimpleDateFormat("dd/MM/yyyy"); if (cariText.getText().equalsIgnoreCase("") || cariText.getText() == null...
8
@EventHandler public void MagmaCubeInvisibility(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 static Location parseString( String fromString ) { if ((null==fromString) || (fromString.length() < 1 )) throw new IllegalArgumentException( "Bad input string=" + fromString ); String [] values = fromString.split( "[\\s" + DELIM + "\"]" ); // Can return "" when these match // System.out.println( "Loc...
9
public static void listingTeamAllSitesIncludingIndividualMembers( JSONObject json) { String teamNames[]; String teamId[]; String multiplePlayer[]; String players, playersId, playerInformation; String multiplePlayerId[]; int i = 0; int numberTeams = 0; try { teamNames = json.toString().split("\"di...
9
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Person other = (Person) obj; if (this...
9
private void readHeader(final DataInputStream in) throws IOException { final int magic = in.readInt(); if (magic != 0xCAFEBABE) { throw new ClassFormatError("Bad magic number."); } in.readUnsignedShort(); // major in.readUnsignedShort(); // minor }
1
public static void main(String[] args) { final int N = 3; ExecutorService service = Executors.newCachedThreadPool(); final CyclicBarrier cb = new CyclicBarrier(N); for(int i=0;i<N;i++){ Runnable runnable = new Runnable(){ @Override public void run(){ try { Thread.sleep((long)(Math.rando...
5
public static Coordinate2D[] partition(Coordinate2D c1, Coordinate2D c2, int numPartitions, int partitionIndex) throws Exception { if (numPartitions < 1) throw new IllegalArgumentException ( "Number of partitions is less than 1. numPartitions: " + numPartitions); else if (partitionIndex < 0) throw ne...
9
public String getVille() { return ville; }
0
private boolean invariant() { //TODO: InvalidModulException konform gestalten if (this.bezeichnung != null) if (!this.bezeichnung.isEmpty()) if (this.studiengang != null) if (!this.studiengang.isEmpty()) if (this.schule != null) if (!this.schule.isEmpty()) return true; return false; }
6
public static String getURL(String entityName,String methodName,String paramers,String url){ StringBuilder sb = new StringBuilder(); if(!isBlank(entityName)){ sb.append(entityName).append("!").append(methodName); }else if(!isBlank(url)){ sb.append(url); } if(!isBlank(paramers)){ sb.append("?").app...
3
final public void Type_name() throws ParseException { /*@bgen(jjtree) Type_name */ SimpleNode jjtn000 = new SimpleNode(JJTTYPE_NAME); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); jjtn000.jjtSetFirstToken(getToken(1)); try { Identifier(); } catch (Throwable jjte000) { ...
8
public static void main(String[] args) throws IOException { int testMark = 0; char gradeLetter = 0; String s = ""; System.out.println("Enter your test mark: "); while ((testMark = System.in.read()) != -1) { s += (char) testMark; System.out.println("s " + s); if (testMark == (int) '\u0013') br...
6
public Unit getBetterExpert(Unit expert) { GoodsType production = expert.getWorkType(); GoodsType expertise = expert.getType().getExpertProduction(); Unit bestExpert = null; int bestImprovement = 0; if (production == null || expertise == null || production == experti...
9
public void realizarOP(String texto) { OrdenCliente orden; String serv="10.8.7.3"; int puertoServ=5000, puertoCli=4999; Escuchar h; switch (texto) { case "upload": JFileChooser fc = new JFileChooser(); fc.setFileSelectionMode(JFileChoos...
7
public ArrayList<Integer> quickSort(ArrayList<Integer> a) { //Algorithim is given a list, base case, pick a random pivot, create subarrays //place elements into subarrays based on comparison with pivot, recursivley call //on subarrays while pivot is at its final point. concatenate the recursive //calls with ...
6
@Override public Object execute(HttpServletRequest request, HttpServletResponse response) throws Exception { Contexto oContexto = (Contexto) request.getAttribute("contexto"); oContexto.setVista("jsp/mensaje.jsp"); AlumnoBean oAlumnoBean = new AlumnoBean(); AlumnoParam oAlumnoPara...
1
public final void initUI() { setTitle("Sigma Function Solver"); setSize(320, 330); setLocationRelativeTo(null); setResizable(false); setDefaultCloseOperation(2); JPanel panel = new JPanel(); getContentPane().add(panel); panel.setLayout(null); fi...
9
public void setShutdownFontcolor(int[] fontcolor) { if ((fontcolor == null) || (fontcolor.length != 4)) { this.shutdownFontColor = UIFontInits.SHDBTN.getColor(); } else { this.shutdownFontColor = fontcolor; } somethingChanged(); }
2
protected static ArrayList<String> getOffspringStrings(int startIndex, String treeStr) { ArrayList<String> children = new ArrayList<String>(); treeStr = treeStr.trim(); int lastParen = matchingParenIndex(startIndex, treeStr); //Scan along subtree string, create new strings separated by commas *at 'highest le...
8
@Override public Dimension minimumLayoutSize(Container parent) { int height = 0; int width = (mColumns - 1) * mHGap; synchronized (parent.getTreeLock()) { Insets insets = parent.getInsets(); int compCount = parent.getComponentCount(); int[] widths = new int[mColumns]; int rows = 1 + (compCount - 1) ...
7
public Boolean infoAction() { try { HashMap<String, String> apiCall = new HashMap<String, String>(); apiCall.put("action", "info"); JSONObject apiResponse = call(apiCall); if(apiResponse != null) { if(apiResponse.getInt("code") == 0) { JSONObject payload = apiResponse.get...
7
public MoveResult endOfMoveChecker(MoveResult battleResult) { MoveResult result = battleResult; boolean redCanMove = false; boolean blueCanMove = false; if (result.getStatus() == OK) //If someone has not already won { for (PieceLocationDescriptor piece: pieceHandler.getRedPieces()) { if (canMov...
9
public Job newJob( TriggerFiredBundle bundle, Scheduler scheduler ) throws SchedulerException { Class<? extends Job> jobClass = bundle.getJobDetail().getJobClass(); return this.injector.getInstance( jobClass ); }
1
public static void main(String[] args) { final int daysInWeek = 7; final int months = 12; final String[] weekDays = new String[]{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; final String[] monthNames = new String[]{"January", "February", "March", "April...
7
public void render(Graphics g) { if (!transmitting) { Resource resource = null; try { for (String key : resources.keySet()) { resource = (Resource) resources.get(key); resource.render(g); } } catch (Conc...
3
@Override public Message createMessage(byte code, DataInputStream in) throws IOException { switch (code) { case AcknowledgeMessage.CODE: return new AcknowledgeMessage(in); case ConnectMessage.CODE: return new ConnectMessage(in); ...
8
public void update() { this.oneDayPass(); int sellIn = this.getContentSellIn(); int quality = this.getContentQuality(); if (sellIn >= midSellIn) { quality += qualityNormalUp; } else if (sellIn < midSellIn && sellIn >= lowSellIn) { quality += qualityDoubleUp; } else if (sellIn < lowSellIn ...
5
public String seeOthersInfo() throws Exception { Connection conn = null; ResultSet rs = null; Statement stmt = null; try{ Class.forName("com.mysql.jdbc.Driver"); conn = DriverManager.getConnection(url, user, psw); if (!conn.isClosed()) System.out.println("Success connecting to the Database!"); e...
3
public static HashMap<String, HashMap<String, Integer>> getMap(String filePath) throws Exception { HashMap<String, HashMap<String, Integer>> map = new HashMap<String, HashMap<String,Integer>>(); BufferedReader reader = filePath.toLowerCase().endsWith("gz") ? new BufferedReader(new InputStreamReader( ...
6
public void compact() throws Exception { ArrayList<Row> delenda = new ArrayList<Row>(); for ( int i=0;i<rows.size();i++ ) { for ( int j=0;j<rows.size();j++ ) { if ( i != j ) { Row r = rows.get( i ); ...
7
public boolean equals(Object loc) { if (!(loc instanceof SerializableLocation)) return false; SerializableLocation compare = (SerializableLocation) loc; if (x == compare.x && y == compare.y && z == compare.z && yaw == compare.yaw && pitch == compare.pitch && worldName...
7
public static String describeId3v2Support(Property p) { String supp=""; for(Id3v2FrameConfig cfg : id3v2Fields) { if(cfg.frameProperty == p) { if(supp.length()>0) supp += ", "; supp += cfg.frameID + (cfg.versionMatch.equals("*")?"":" (" + c...
5
public static void print(){ for (int i = 0; i < 500; i++) { System.out.println(i); } }
1