text
stringlengths
14
410k
label
int32
0
9
public String readText() throws IOException { StringBuilder builder = new StringBuilder(); String marker = getMarker(); if (mType == XMLNodeType.START_TAG) { next(); } do { if (mType == XMLNodeType.TEXT) { if (builder.length() > 0) { builder.append(' '); } builder.append(getText()); ...
5
public void lookAt(String object, ArrayList<String> inv) { if (object.equalsIgnoreCase("floor")) { System.out.println("It is a cold and hard stone floor.\n"); } else if (object.equalsIgnoreCase("wall") || object.equalsIgnoreCase("walls")) { System.out.println("The walls are made ...
9
private void fixDeadReference(TreeNode referencedNode, TreeNode node) { if (node.leftIsWire && node.leftChild == referencedNode) { node.leftChild = referencedNode.parent; } if (node.rightIsWire && node.rightChild == referencedNode) { node.rightChild = referencedNode.parent; } }
4
public void destroy(String id) throws IllegalOrphanException, NonexistentEntityException, RollbackFailureException, Exception { EntityManager em = null; try { em = getEntityManager(); em.getTransaction().begin(); Area area; try { area = em....
8
@Override public synchronized Object getNext() { Object obj = super.getNext(); if (fileOpen) { try { while (processLine()) {} if (!fileOpen) {theStream.close();} } catch (IOException ioe) { System.err.println("Could not close FileReader: " + "\n" + ioe); } } return obj; }
4
public void calcThisFATEntOffset(int N) { int FATOffset = 0; if (typeOfFileSystem.equalsIgnoreCase("FAT16")) { FATOffset = N * 2; } else if (typeOfFileSystem.equalsIgnoreCase("FAT32")) { FATOffset = N * 4; } thisFATSecNum = BPB_ReservedSecCnt + (FATOffset ...
2
public void checkComment() { // discard obsolete comments while inside methods or fields initializer (see bug 74369) // don't discard if the expression being worked on is an ObjectLiteral (see bug 322412 ) if (!(this.diet && this.dietInt == 0) && this.scanner.commentPtr >= 0 && !(expressionPtr >= 0 && expressionSt...
8
@Override public int rectIntersection( double x, double y, double w, double h ) { if( x + w <= this.x || x >= this.x + this.w || y + h <= this.y || y >= this.y + this.h ) { return INCLUDES_NONE; } if( x >= this.x && y >= this.y && x + w <= this.x + this.w && y + h <= this.y + this.h ) { return INCLUDES_ALL;...
8
public void testGetChronology_Object_Zone() throws Exception { GregorianCalendar cal = new GregorianCalendar(TimeZone.getTimeZone("Europe/Paris")); assertEquals(GJChronology.getInstance(MOSCOW), CalendarConverter.INSTANCE.getChronology(cal, MOSCOW)); cal = new GregorianCalendar(TimeZone...
1
private Error unpackError() throws MikrotikApiException { nextLine(); Error err = new Error(); if (hasNextLine()) { while (!line.startsWith("!")) { if (line.startsWith(".tag=")) { String parts[] = line.split("=", 2); ...
6
public P039C() { Scanner sc = new Scanner(System.in); N = sc.nextInt(); segments = new Segment[N]; dp = new int[N][N]; r = new boolean[N][N]; prev = new int[N]; for (int[] row: dp) { Arrays.fill(row, -1); } for (int i = 0; i ...
7
private IMessage adapterMessage(IMessage m) { ArrayList<Character> al=new ArrayList<Character>(); for(int i=0;i<m.taille();i++) { if(m.getChar(i)==CARACTERE_INTERDIT) { for(int j=0;j<SUBSTITUTION.length();j++) { al.add(SUBSTITUTION.charAt(j)); } } else { if(m.getChar(i)==Character.toUpperC...
6
protected void load() { Scanner in = null; try { in = new Scanner(file); } catch(FileNotFoundException e) { e.printStackTrace(); System.exit(0); } if (vertices == null) { vertices = new ArrayList<Vertex>(); textures = new ArrayList<Texture>(); triangles = new ArrayList<Triangle>(); } while(in.has...
9
public PersonApplication(Person p) { Area =""; WorkPosition = new ArrayList<String>(); Satisfied = false; Person = p; title=""; Contract=""; namePer=""; MobilePer=""; emailPer=""; companyLab=""; posLab=""; nameLab=""; MobileLab=""; }
0
public Key delMin() { if (N == 0) throw new RuntimeException("Priority Queue Underflow"); Key min = heap[1]; heap[1] = heap[N]; // half exchange heap[N--] = null; sink(1); // resize if (N == heap.length / 4) heap = resize(heap, heap.length / 2); return min; }
2
public void backupDoc(String indexName) throws Exception{ File file = new File(configService.getBackupDataFilePath(indexName)); JsonFactory jfactory = new JsonFactory(); /*** write to file ***/ JsonGenerator jGenerator = jfactory.createGenerator(file, JsonEncoding.UTF8); long startTime = System.c...
7
private JButton makeButton(String label, String iconName, ActionListener listener, String tooltip) { ImageIcon icon = new ImageIcon(getClass().getResource( "/ICON/web/" + iconName)); JButton button = new JButton(label, icon); button.addActionListener(listener); button.setToolTipText(tooltip); return bu...
0
@Override public boolean process( final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) { if (annotations == null || annotations.isEmpty()) { return false; } // we need the actual TypeElement of the annotation, not just it's name ...
9
public BValue parseBValue() { Token next = tk.next(); BValue ret; switch(next.getType()) { case Token.TRUE: ret = new Bool(true); break; case Token.FALSE: ret = new Bool(false); break; case Token.VAR: ret = new Variable("v" + Integer.toString(((VarToken) next).getIndex())); case Token.N...
9
private boolean jj_2_42(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_42(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(41, xla); } }
1
public synchronized void move(Entity e, int x, int y){ int id = e.id; int w = e.width; int h = e.height; for(int cx = 0; cx < w; cx++) for(int cy = 0; cy < h; cy++){ int cxex = cx + (int) e.x; int cyey = cy + (int) e.y; int cxx = cx + x; int cyy = cy + y; world[cxex][cyey].remove(id); ...
8
public List<TravelTrip> findAll(){ CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<TravelTrip> criteria = cb.createQuery(TravelTrip.class); Root<TravelTrip> travelTrip = criteria.from(TravelTrip.class); criteria.select(travelTrip).orderBy(cb.asc(travelTrip.get("country")));...
0
public void saveFile(String filename) { try { List<String> sections_list = new ArrayList<String>(); for (String key : map.keySet()) { String section = key.split("\\.")[0]; if (!sections_list.contains(section)) sections_list.add(section); } ...
6
public static GenericNode findeBestWay(GenericNode start) { @SuppressWarnings("Convert2Diamond") HashMap<GenericEdge, GenericNode> log; log = new HashMap<GenericEdge, GenericNode>(); GenericNode res = null, other, current = start; current.setDistance(0); PriorityQueue queue = new PriorityQueue(new ComparatorDista...
7
public int bonusGain(Territoire t) { List<Peuple> lstTmp = t.getPrisesDuTerritoire(Partie.getInstance().getTourEnCours()); Iterator<Peuple> it = lstTmp.iterator(); while( it.hasNext() ){ Peuple p = it.next(); if( p == this){ return 1; } } return 0; }
2
protected void consume(int cc) throws CompilationException { if ((cc<0) || (c!=cc)) { CompilationException exc= new CompilationException(c==-1?1:3,new Character((char)c)); exc.col=column; if (c==-1) exc.col--; throw exc; }; read(); };
4
public double inputToDouble() { double inputValue = 0; while (true) { try { inputValue = Double.valueOf(this.in.next().trim()); break; } catch (NumberFormatException e) { System.out.println("That wasn't a double value"); this.in.nextLine(); } catch (InputMismatchException e) { System.ou...
3
public static void executeDualGb(Gameboy gbL, Gameboy gbR, int[] movesL, int[] movesR) { // finish unfinished frames if (!gbL.onFrameBoundaries) gbL.step(); if (!gbR.onFrameBoundaries) gbR.step(); System.out.println("executeDualGb: initial steps " + gbL.stepCount + " - " + gbR.stepCount); ...
9
@Override public boolean isExistUrl(String url) { Statement stmt; ResultSet rs; ResultSet rsHistory; try { stmt = con.createStatement(); String query = "SELECT * FROM " + TABLE_NAME + " WHERE url = '" + url + "'"; rs = stmt.executeQuery(query); String query4History = "SELECT * FROM " + TABL...
3
private boolean zzRefill() throws java.io.IOException { /* first: make room (if you can) */ if (zzStartRead > 0) { System.arraycopy(zzBuffer, zzStartRead, zzBuffer, 0, zzEndRead - zzStartRead); /* translate stored positions */ zzEndRead -= zzStartRead; zzCurrentPos -= zzStartRead; zzMarkedPos -= zz...
5
public Point toGate(Point current){ double ox = 0, oy = 0; Point gate = new Point(dimension/2, dimension/2); // if both the x and y of the piper are farther than 1 from the gate, change both // !finishround signifies that the piper is not ready to move towards the target yet if(Math.abs(gate.x - current.x) > ...
8
public boolean eatBloodMedicine(BloodMedicine bm){ if(this.isLive && bm.isLive() && this.getRect().intersects(bm.getRect())){ this.blood = 100; bm.setLive(false); return true; } return false; }
3
public void onPart(String chan, IRCUserInfo user, String msg) { String nick = user.getNick(); String username = user.getUsername(); String host = user.getHost(); if (msg.length() > 0) msg = " ("+ msg +")"; String line = "* Part: "+ nick +" ("+ username +"@"+ host +") parts "+ chan + m...
2
@Override public void handle(HttpExchange exchange) throws IOException { Database db = new Database(); XStream xStream = new XStream(new DomDriver()); Search_Input input = (Search_Input) xStream.fromXML(exchange.getRequestBody()); String username = input.getUsername(); String password = input.getPassword(...
9
public int getArmForce() { return armForce; }
0
public IllegalOrphanException(List<String> messages) { super((messages != null && messages.size() > 0 ? messages.get(0) : null)); if (messages == null) { this.messages = new ArrayList<String>(); } else { this.messages = messages; } }
3
public int compareTo(Object tmp ) { int result; if (tmp instanceof Person) result = (firstTicks < ((Person)tmp).GetFirstTicks() ? -1 : (firstTicks == ((Person)tmp).GetFirstTicks() ? 0 : 1)); else if (tmp instanceof BlankEvent) result = (firstTicks < ((BlankEv...
8
public void renderTile(int xp, int yp, Tile tile){ xp -= xOffset; yp -= yOffset; for (int y=0; y < tile.sprite.SIZE; y++){ int ya = y + yp; //ya is absolute y value, yp is offset for (int x=0; x < tile.sprite.SIZE; x++){ int xa = x + xp; if (xa < 0 - tile.sprite.SIZE || xa >= width || ya < 0 || ya >...
7
public void doLargeDelimitedWithPZMap() { try { final String mapping = ConsoleMenu.getString("Mapping ", LargeDelimitedWithPZMap.getDefaultMapping()); final String data = ConsoleMenu.getString("Data ", LargeDelimitedWithPZMap.getDefaultDataFile()); LargeDelimitedWithPZMap.c...
1
public void setDireccion(String direccion) { this.direccion = direccion; }
0
private void checkProductions(int x,int y) { HashSet <String> tempSet=new HashSet <String>(); for (int i=0; i<myProductions.length; i++) { for (int k=x; k<y; k++) { String key1=x+","+k; String key2=(k+1)+","+y; for (String A : myMap.get(key1)) { for (String B : myMap.get(key2)) ...
6
@Override public String toString() { StringBuilder imports = new StringBuilder(); importLines.add( importJavaLines ); importLines.add( importJavaxLines ); importLines.add( importExternalLines ); importLines.add( importComLines ); for ( List<String> lines : importLin...
3
public boolean changeMixer(String mixerName) { Mixer mx=null; try { //stop current line this.line.stop(); this.line.close(); this.line.flush(); // Record this mixer change if (debugAudio==true) audioDebugDump("changeMixer() : mixerName="+mixerName); //set the new mixer and line mx=getMixer(m...
7
public void saveDatabase() { try { File directory = new File(getDataFolder() + File.separator + "anvils"); if (!directory.exists()) directory.mkdirs(); for (File file : directory.listFiles()) { file.delete(); } for (int i = 0; i < anvils.size(); i++) { Location loc = (Location) anvils...
6
public static LogicObject findSelectionKeyWithEquivalents(Cons pattern) { { Cons candidatekeys = pattern.rest.rest; { Keyword testValue000 = ((Keyword)(pattern.value)); if ((testValue000 == Logic.KWD_DEPENDENTS) || (testValue000 == Logic.KWD_ISA)) { } else if (testValue00...
8
@Override public String toString() { return "Message["+source+"->"+dest+" seqNum:"+seqNum+" duplicate:"+duplicate+" kind:"+kind+" data:"+data+" TimeStamp:" + this.timeStamp + "]"; }
0
public void close() { try{ if(connection!=null && !connection.isClosed()) { connection.close(); connection=null; } }catch(SQLException ex) { ex.printStackTrace(); } }
3
static boolean inside(int r, int c) { return r >= 0 && r <= n && c >= 0 && c <= n - r; }
3
private boolean aggregate(char entryCharacter, char exitCharacter, boolean prefix) { if (c != entryCharacter) return false; nextCharacter(); skipWhiteSpace(); if (c == exitCharacter) { nextCharacter(); return true; } for(;;) { ...
9
public static void main(String args[]) throws FileNotFoundException { try { t = PdfUtilities.chooseFolder(); if (t != null) { ArrayList<File> files = PdfUtilities.getPaths(new File(t), new ArrayList<File>()); if (files == null) return; String extension; PdfReader reader; try {...
9
public void keyPressed(KeyEvent evt) { if (evt.getKeyCode() == keys[UP]) { this.direction = DIR_UP; } else if (evt.getKeyCode() == keys[DOWN]) { this.direction = DIR_DOWN; } else if (evt.getKeyCode() == keys[LEFT]) { this.direction = D...
5
@Override protected String getModel() { return "Volvo XC90"; }
0
public int getArrowProjectileGfxId(int weaponId, int arrowId) { if (arrowId == 884) { return 11; } else if (arrowId == 886) { return 12; } else if (arrowId == 888) { return 13; } else if (arrowId == 890) { return 14; } else if (arrowId == 892) return 15; else if (arrowId == 11212) return 1...
7
private String getString(int next) throws IOException { StringBuilder str = new StringBuilder(); str.append((char) next); while (!isQuote((next = getChar()))) { // TODO: Properly read escape sequences str.append((char) next); } str.append((char) next); return str.toString(); }
1
public static void main(String[] args){ Scanner in = new Scanner(System.in); int n=in.nextInt(); int[] a = new int[n+1]; for(int i=0;i<n;i++){ a[i+1]=in.nextInt(); } int t = in.nextInt(); int[] d = new int[n+1]; int[] swap = new int[n+1]; int cnt = 0; for(int i=1;i<=n;i++){ if(a[i]==i...
8
@Override public Customer readCustomer(int customerID) { if (doc == null) return null; Element currRoot = doc.getRootElement(); Element parrentCusto = currRoot.getChild("customers"); List<Element> listCustos = parrentCusto.getChildren(); for (Element customer : listCustos) { int newCustomerID = Integ...
3
public int getSupplierCode() { return getValue().getSuppliercode(); }
0
public void woodcuttingComplex(int screen) { if (screen == 1) { clearMenu(); menuLine("1", "Normal Tree", 1511, 0); menuLine("1", "Achey Tree", 2862, 1); menuLine("10", "Light Jungle", 6281, 2); menuLine("15", "Oak Tree", 1521, 3); menuLine("20", "Medium Jungle", 6283, 4); menuLine("30", "Willow ...
4
private void draw() { double size = getWidth() < getHeight() ? getWidth() : getHeight(); canvas.setWidth(size); canvas.setHeight(size); ctx.clearRect(0, 0, size, size); if (isFrameVisible()) { //frame Paint frame = new LinearGradient(0.14 * size, 0.14 * size, ...
3
public static Card getHighestCard(Card card1, Card card2) { return (card1.getRank().getValue() > card2.getRank().getValue()) ? card1 : ((card1.getRank().getValue() < card2.getRank().getValue()) ? card2 : null); }
2
public boolean validarUsr(String nick, String psw){ //System.out.println(nick); //System.out.println(psw); getLista g = new getLista(); ListaClientes = g.getListaCliente(); for(int i = 0;i<ListaClientes.size();i++){ // System.out.println(ListaClientes.get(i).getNombre(...
6
private void buildReport(ParseNode current, int indent, StringBuilder b) { while(current != null) { if(current.Terminal == null) { for(int i = 0; i < indent; i++) b.append(" "); // 2 spaces b.append(current.ProductionRule.toString()); b.append('\n'); // Children buildReport(current....
3
@Override public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) { //System.out.println("getScrollableBlockIncrement"); switch(orientation) { case SwingConstants.VERTICAL: return visibleRect.height; case SwingConstants.HORIZONTAL: return visibleRect.width; ...
2
@Override public void quit() { quitProgram(); }
0
public void updateDisplay() { if(userValues !=null && systemValues !=null) { for(int row = 0; row < systemValues.length; row++) { for(int col = 0; col < systemValues[row].length; col++) { systemValues[row][col] = userValues[row][col]; } ...
4
public double getDecimal(){ return (double)numerator / (double)denominator; }
0
public int etsiTasonNumero(ArrayList<String> rivit) { int tasonNumero = 0; for (String string : rivit) { if(string.startsWith("Taso: ")) { tasonNumero = Integer.parseInt(string.substring(6)); } } return tasonNumero; }
2
public Meeting getMeeting(int id) { Meeting returner = null; for (int i = 0; i < meetingList.size(); i++) { if (meetingList.get(i).getID() == id) { returner = meetingList.get(i); } } return returner; }
2
public void scrollCellToView(JTable table, int rowIndex, int vColIndex) { if (!(table.getParent() instanceof JViewport)) { return; } JViewport viewport = (JViewport) table.getParent(); Rectangle rect = table.getCellRect(rowIndex, vColIndex, true); Rectangle viewRect =...
9
public final synchronized void sendRawLine(String line) { if (isConnected()) { System.out.println("Sending Raw Line: " + line); _inputThread.sendRawLine(line); } }
1
private void deSelectAllOtherSoundEffects(String key, String filename) { logger.logDebug("ENTERED deSelectAllOtherSoundEffects key = " + key + ", filename = " + filename); logger.logDebug(" key = " + key); logger.logDebug(" filename = " + filename); logger.logDebug(" listOfSoundFiles.size =...
6
private static boolean isLocationInScreenBounds(Point location) { GraphicsDevice[] graphicsDevices = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices(); for (int j = 0; j < graphicsDevices.length; j++) { if (graphicsDevices[j].getDefaultConfiguration().getBounds().contains(location)) { ...
2
@Test public void twoCompCircular1() throws Exception { try { C1 c = new C1(); fail(); } catch (RuntimeException E) { assertTrue(E.getMessage().contains("src == dest")); } }
1
public final synchronized boolean isConnected() { return _inputThread != null && _inputThread.isConnected(); }
1
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onPlayerItemHeld(PlayerItemHeldEvent event) { try { if((event.getPlayer().hasPermission("arctica.use")) && (!event.getPlayer().hasPermission("arctica.immune"))) { ItemStack ...
8
@Override public void doLayout() { Insets insets = getInsets(); int x = insets.left + HMargin; int y = insets.top + VMargin; Dimension d = classNameText.getPreferredSize(); classNameText.setBounds(x + ClassNameOffset + ClassNameSpace, y, d.width, d.height); y +=...
9
public float getFloat(String key, float _default) { return containsKey(key) ? get(key).floatValue() : _default; }
1
@Override public void onDisable() { synchronized (updateChecker) { try { getLogger().info("Waiting for updater to complete"); updateChecker.join(); } catch (InterruptedException ex) { getLogger().log(Level.SEVERE, "Error while waiting f...
1
public void undo(IDTextField field) { // no active list if (list == null) return ; int otherID = field.getMyID() ; int index = 0 ; boolean notFound = true ; ListIterator iterator = list.listIterator() ; // search for undo's while (iterator.hasNext() && notFound) { Und...
4
public void calculScore(){ int score = 0; for (Town t : towns){ if(t.isTown()==true) score += 2; else score++; } if (hasLonguestRoad==true) score += 2; if (hasBiggestArmy==true) score += 2; score += bonusScore; this.score = score; if(score>=10) { EndGameFrame endGame = new EndGameFrame...
5
private Cliente get_Cliente (String codigo){ String detalle = ""; Cliente cli = new Cliente(); r_con.Connection(); try { String sql = ( "SELECT cli_codigo, cli_nombre, cli_apellido, cli_fecha_nac, cli_cuit, loc_descripcion, cli_direccion, cli_calle, cli_sit_frente...
6
public void accel(double aX, double aY, double aZ) { velX += aX; velY += aY; velZ += aZ; if (Math.abs(velX) > speed) { velX = (velX / Math.abs(velX)) * speed; } if (Math.abs(velY) > speed) { velY = (velY / Math.abs(velY)) * speed; } ...
3
public void PerformBroadcast() { if(!responseServer.running) { gameList.clear(); UpdateGameList(); } responseServer.startServerBroadcast(); }
1
@Override public boolean createTable(String query) { Statement statement = null; try { this.connection = this.getConnection(); if (query.equals("") || query == null) { this.writeError("SQL query empty: createTable(" + query + ")", true); return...
4
public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); char[] s1 = br.readLine().toCharArray(); char[] s2 = br.readLine().toCharArray(); int len1 = s1.length; int len2 = s2.length; int max_all = Integer.MIN_VALUE; int[][] lcs =...
8
private void configurePropertiesForObjectSchema(JsonNode rawProperties, ObjectSchema schema, URL schemaLocation) { if (rawProperties == null) { return; } for (Iterator<String> iterator = rawProperties.fieldNames(); iterator.hasNext();) { String fieldName = iterator.next(...
3
private void test(Class<?> clazz, String methodName, int expectedParamsCount) throws Exception { InvocationChainRetriever retriever = new InvocationChainRetriever(); String className = clazz.getName(); InputStream in = this.getClass().getResourceAsStream("/" + className.replace('.', '/') + ".class"); Clas...
6
public static void method208(boolean flag, Model model) { int i = 0; int j = 5; if (flag) { return; } Interface.modelCache.clear(); if (model != null && j != 4) { Interface.modelCache.put(model, (j << 16) + i); } }
3
private void load() { for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { pixels[x + y * width] = sheet.pixels[(x + this.x) + (y + this.y) * sheet.width]; } } }
2
@Override public void loadImages() { if(hImgLdr == null){ hImgLdr = new HorseRaceImageLoader(); } GameObject background = gameObjects.get("BACKGROUND"); if(backgroundStand == null){ backgroundStand = new BufferedImage[1]; } backgroundStand[0] = hImgLdr.scaleBufferedImage(hImgLdr.loadBufferedImage(Hor...
9
public boolean isJumpPressed(){ if(isXboxControllerAttached()){ if(xboxController.isAPressed()){ return true; } } if(jump.isPressed()){ return true; } return false; }
3
private boolean initialiseNextBlock() throws IOException { /* If we're already at the end of the stream, do nothing */ if (this.streamComplete) { return false; } /* If a block is complete, check the block CRC and integrate it into the stream CRC */ if (this.blockDecompressor != null) { int blockCRC = ...
8
public void setSize(int size) { this.size = size; }
0
public void lisaaEste(Este este) { esteet.add(este); }
0
public String getDuration() { String duration = "-"; if(segments != null) { long durationMinutes = 0; for(int i=0; i< segments.size(); i++) { Segment segment = (Segment) segments.elementAt(i); if(segment.getDuration() != null) { String[] currDuration = StringUtil.split(segment.getDuration(), ":")...
6
static String formatDouble(double x, int just, int width, int dec) { int sign = 1; if (x < 0) { sign = -1; x = -x; } double pow10 = 1; for (int i = 0; i < dec; i++) { pow10 *= 10; } double y = Math.round(pow10 * x) / pow10; String s = "" + y; int i = s.indexOf('.'); int l = s.length(); ...
9
@Override public Class getColumnClass(int indiceColonne){ //System.out.println("ModeleListeLocations::getColumnClass()") ; switch(indiceColonne){ case 0 : return Integer.class ; case 1 : return String.class ; case 2 : return String.class ; case 3 : return String.class ; case 4 : ...
9
public void visitSRStmt(final SRStmt stmt) { if (stmt.array == from) { stmt.array = (Expr) to; ((Expr) to).setParent(stmt); } else if (stmt.start == from) { stmt.start = (Expr) to; ((Expr) to).setParent(stmt); } else if (stmt.end == from) { stmt.end = (Expr) to; ((Expr) to).setParent(stmt); } ...
3
protected void recursiveBalance(TreeNode currentNode) { setBalance(currentNode); int balance = currentNode.balance; if (balance == -2) { if (height(currentNode.left.left) >= height(currentNode.left.right)) { currentNode = rotateRight(currentNode); } else...
5
public void printObj () { //Suppression des oiseaux qui ont touche quelque chose synchronized(Fenetre._list_birds) { for(int i = 0; i < Fenetre._list_birds.size(); i++) { if (Fenetre._list_birds.get(i).isDestructed()) { Fenetre._list_birds.remove(i); if (Fenetre._list_birds.size() != 0) Fenet...
7