text
stringlengths
14
410k
label
int32
0
9
static byte[] discardWhitespace(byte[] data) { byte groomedData[] = new byte[data.length]; int bytesCopied = 0; for (int i = 0; i < data.length; i++) { switch (data[i]) { case (byte) ' ' : case (byte) '\n' : case (byte) '\r' : case (by...
5
public static boolean WillCapture(Planet s,Planet d) { // Tested // Planet d = destination // Planet c = source if (s!=null&&d!=null) return s.NumShips()/2 > d.NumShips(); return false; }
2
@Override public void onDisable() { PluginDescriptionFile pdfFile = this.getDescription(); log.info( pdfFile.getName() + " version " + pdfFile.getVersion() + " is disabled." ); // cancel all tasks (and clear list) Collection<Integer> woolGrowingTaskIDs = this.woolGrowingSheep.values(); ...
1
private Node getRootNode(File configFile) throws ParsingException { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); dbFactory.setIgnoringComments(true); dbFactory.setNamespaceAware(false); dbFactory.setValidating(false); DocumentBuilder db =...
5
@Override protected void readMessage(InputStream in, int msgLength) throws IOException { if (msgLength != MESSAGE_LENGTH) { throw new IllegalStateException( "Message Length must be 2 for CONNACK. Current value: " + msgLength); } // Ignore first byte in.read(); int result = in.read(); swit...
7
public void setLessthan(TLessthan node) { if(this._lessthan_ != null) { this._lessthan_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(...
3
public boolean skipPast(String to) throws JSONException { boolean b; char c; int i; int j; int offset = 0; int length = to.length(); char[] circle = new char[length]; /* * First fill the circle buffer with as many characters as are in the...
9
public Object nextContent() throws JSONException { char c; StringBuffer sb; do { c = next(); } while (Character.isWhitespace(c)); if (c == 0) { return null; } if (c == '<') { return XML.LT; } sb = new Str...
7
public void commitOnly(final Set methods, final Set fields) { classInfo.setClassIndex(constants.addConstant(Constant.CLASS, type)); classInfo.setSuperclassIndex(constants.addConstant(Constant.CLASS, superclass)); final int ifs[] = new int[interfaces.length]; for (int i = 0; i < ifs.length; i++) { ifs[i...
1
public static List<Medicament> selectAll(EntityManager em) throws PersistenceException { List<Medicament> lesMedicaments = null; Query query= em.createQuery("select m from Medicament m"); lesMedicaments = query.getResultList(); return lesMedicaments; }
0
public boolean isSportKit() { return sportKit; }
0
@Override public void paint(Graphics g) { //super.paint(g); //To change body of generated methods, choose Tools | Templates. if (isDirty) { try { graph(lastPlot); g.drawImage(img, 0, 25, this); } catch (InterruptedException ex) { ...
4
public final WaiprParser.trigger_return trigger() throws RecognitionException { WaiprParser.trigger_return retval = new WaiprParser.trigger_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token sh=null; CommonTree sh_tree=null; RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(a...
4
public boolean isEqual(Collider c) { if(c == null) return false; c.updateVerts(); updateVerts(); if(c.verts.length != verts.length) return false; for(int x=0;x<verts.length;x++) { if(verts[x].x != c.verts[x].x || verts[x].y != c.verts[x].y) return false; } return true; }
5
public static void updateMapModel(BotState state) { // mal schauen... // possibleOpponentSuperRegionsLastTurnBegin = // possibleOpponentSuperRegionsLastTurn; List<Region> opponentRegions = state.getVisibleMap().getEnemyRegions(state); for (Region enemyRegion : opponentRegions) { if (!regionsOpponentHold.c...
8
@Test public void testDoorDirection() { int sumUp = 0; int sumDown = 0; int sumLeft = 0; int sumRight = 0; int sumNone = 0; for (BoardCell b : board.getCells()) { if (b.isRoom()){ //b = new RoomCell(b); RoomCell.DoorDirection d = ((RoomCell) b).getDoorDirection(); // System.out.println(d)...
7
public boolean checklogin() { boolean loginflag = false; System.out.println("ATTEMPTING TO CONNECT TO DB!!"); Connection con = null; Statement stmt = null; ResultSet rs = null; try { Class.forName("com.mysql.jdbc.Driver"); //con =...
6
public static void main(String[] args) { Scanner in = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); int n = in.nextInt(); int[] a = readArray(in, n); long s = 0; for (int i : a) s += i; if (n < 3 || s % 3 != 0) { ...
8
public String toString() throws JSONException { if (this.string == null) { int c; int length = 0; char chars[] = new char[this.length]; for (int at = 0; at < this.length; at += characterSize(c)) { c = this.characterAt(at); if (c < 0...
3
@Test public void invalidBillingAddrCreateProfile() { Address billing = getTestBillingAddress(); Card card = getTestCard(); ProfileResponse createdProfile = null; try { createdProfile = beanstream.profiles().createProfile(card, null); Assert.fail("Fail test because the billing address was empty"); } c...
7
public void weibullStandardProbabilityPlot(){ this.lastMethod = 13; // Check for negative x values if(this.sortedData[0]<0){ System.out.println("Method weibullStandardProbabilityPlot: negative x value found - weibullThreeParProbabilityPlot called"); t...
5
public static Collection<String> generateBindings(String s, Collection<Integer> xVals, Collection<Integer> yVals) { ArrayList<String> strings = new ArrayList<String>(); if (s.contains("!1") && s.contains("!2")) { for (int x : xVals) for (int y : yVals) strings.add(s.replace("!1", "" + x).replace("!2"...
6
public static void unMuteBackground(){ // Used for loops int i; // Used so that the methods associated with a midi player can be accessed. MidiPlayer currentMidiPlayer; //Checks the slide for slide for content if (null != entityPlayers) { for(i =0;i <entityPlayers.size(); i++) { // test whe...
4
@Override public int read () throws IOException { int character = super.read(); if (this.first) { while (character != '\n') character = super.read(); character = super.read(); this.first = false; } if (character == -1) return -1; if (character == '.') return '-'; i...
6
public boolean similar(Object other) { try { if (!(other instanceof JSONObject)) { return false; } Set<String> set = this.keySet(); if (!set.equals(((JSONObject)other).keySet())) { return false; } Iterator<St...
9
public <V> Adapter.Setter<V> makeSetter(String methodName, Class<V> _class) { try { final Method method = version.getClass().getMethod(methodName, _class); return new Adapter.Setter<V>() { public void call(V value) { try{ lock.lock(); if (firstTime) { ...
5
public void load() throws ContainerDatabaseException { try { this.database.load(); } catch (IOException ex) { throw new ContainerDatabaseException(ex); } // get dispensers Map<String, YAMLNode> containers = this.database.getNodes("containers"); // XXX: This is already named containers as we plan to m...
4
public void blockade() { }
0
public void setComando(List<?> list) { for(PComando e : this._comando_) { e.parent(null); } this._comando_.clear(); for(Object obj_e : list) { PComando e = (PComando) obj_e; if(e.parent() != null) { e.pa...
4
public void testSetStart_RI2() { MutableInterval test = new MutableInterval(TEST_TIME1, TEST_TIME2); try { test.setStart(new Instant(TEST_TIME2 + 1)); fail(); } catch (IllegalArgumentException ex) {} }
1
public ArrayList<String> getPost(String ID) throws SQLException { ArrayList<String> messages = new ArrayList<String>(); PreparedStatement ps = null; ResultSet rs = null; Connection con = null; try { con = dbConnect.getDBConnection(); String querypostID = ...
6
@Override public int compare(CommandEntity e1, CommandEntity e2) { if(e1.getCalendar().getTime().getTime() < e2.getCalendar().getTime().getTime()) return -1; else if(e1.getCalendar().getTime() == e2.getCalendar().getTime()) return 0; else return 1; ...
2
int decode(Buffer b){ int ptr=0; DecodeAux t=decode_tree; int lok=b.look(t.tabn); if(lok>=0){ ptr=t.tab[lok]; b.adv(t.tabl[lok]); if(ptr<=0){ return -ptr; } } do{ switch(b.read1()){ case 0: ptr=t.ptr0[ptr]; break; case 1:...
6
public ArrayList<Spot> getEmptySpots() { ArrayList<Spot> eSpots = new ArrayList<Spot>(); for (int i = 0; i < SIZE; i++) { for (int j = 0; j < SIZE; j++) { if (grid[i][j] == 0) { Spot sp = new Spot(i,j); eSpots.add(sp); } } } return eSpots; }
3
private static Production[] createRules(Node node) { Map e2t = elementsToText(node); String left = (String) e2t.get(RULE_LEFT_NAME); if (left == null) left = ""; NodeList list = ((Element) node).getElementsByTagName(RULE_RIGHT_NAME); Production[] p = new Production[list.getLength()]; for (int i = 0; i < ...
3
public static void main(String[] args) { final int MAX_BALL = 50; final int MAX_FLOOR = 1000; Scanner scanner = new Scanner(System.in); int p = scanner.nextInt(); int[][] dp = new int[MAX_BALL + 1][MAX_FLOOR + 1]; for (int i = 0; i < p; i++) { int setNumber = scanner.nextInt(); int b = scanner.nextInt...
7
private final void method1341(Object object, Interface14 interface14, int i, int i_0_) { try { if (i < -84) { anInt2314++; if ((i_0_ ^ 0xffffffff) < (anInt2324 ^ 0xffffffff)) throw new IllegalStateException("s>cs"); method1338(7, interface14); anInt2311 -= i_0_; while (anInt2311 < 0) { ...
6
public static BlackBox rippleAdder(int amount) { BlackBox[] fullAdders = new BlackBox[amount]; BlackBox rippleAdder = new BlackBox(); for (int i=0; i<amount; i++) { if (amount==1) { fullAdders[i] = CreateBlackBox.fullAdder(); rippleAdder.addElement(fu...
4
public String getText() { return text; }
0
public void setClickTarget(URL paramURL, String paramString) { if (paramURL != null) { if (!this.imListening) { addMouseListener(this.mouseHandler); } } else if (this.imListening) removeMouseListener(this.mouseHandler); this.url_target = paramURL; this.frame = paramSt...
3
private static void assertFiles(final File expected, final File actual) { String actualLine, expectedLine, trimmedLine; BufferedReader expectedR = null, actualR = null; try { expectedR = new BufferedReader(new FileReader(expected)); actualR = new BufferedReade...
8
@SuppressWarnings("unused") public Debate getSpecificDebate(String id) { Element root = document.getRootElement(); Element debateElement; Debate debate = null; Element debateE = (Element) document .selectSingleNode("//debate[@id='" + id + "']"); if (debateE != null) { String topic = debateE.element...
8
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 void showMarkStderr(int i, int showEvery) { if (i % showEvery == 0) { if (i % (100 * showEvery) == 0) System.err.print(".\n" + i + "\t"); else System.err.print('.'); } }
2
private void ejecuta() { int contador = 0; // Contara los segundos de ejecucion del programa int limite = Constantes.LIMITETIEMPO; // Se establecera el limite en SEGUNDOS de la // ejecucion del programa /*PRUEBAS BUILDER ArrayList<InterfazDeTiposCiclista> listaejecutatipo = new ArrayList<InterfazDeTiposCiclista...
5
@Override public void computeNormalisingConstant() throws InternalErrorException { totalTimer.start(); PopulationVector N = qnm.N.copy(); int r = 0, Nr; int R = qnm.R, M = qnm.M; BigRational[] curG = new BigRational[matrixSize], G_1 = null; for (int i = 0; i < matrixS...
8
public void update() { int i; plateau.eraseCourante(); boolean colision = plateau.descendre(vitesse); if (colision) { plateau.drawCourante(); plateau.nouvellePiece(); int[] lines = plateau.checkLines(); plateau.deleteLines(lines); ...
4
public String getLabelCode(){ if(falsePart == null){ return condition.getLabelCode() + this.printLineNumber(true) + "goto := " + this.labelFalse + " if " + condition.place + " == false \n" + truePart.getLabelCode() + this.printLineNumber(true) + "label := " + this.labelFalse; } ...
1
@Override public java.util.List<String> tabComplete(CommandSender sender, String alias, String[] args) throws CommandException, IllegalArgumentException { Validate.notNull(sender, "Sender cannot be null"); Validate.notNull(args, "Arguments cannot be null"); Validate.notNull(alias, "Alias can...
6
void splitCycle(){ //cycles[activeCycle] jest "przycinany" !!!!!!???????!!!!! Cycle oldC = cycles[activeCyc.get(0)]; int cut1 = oldC.vxList.indexOf(tempCycle.vxList.get(0)); //indeks w activeCyc.vxList punktu tempCycle.vxList[0] int cut2 = oldC.vxList.indexOf(tempCycle.vxList.get(tempCycle.vxList.size()-1)); Ar...
7
public void testWithChronologyRetainFields_invalidInNewChrono() { YearMonth base = new YearMonth(2005, 13, COPTIC_UTC); try { base.withChronologyRetainFields(ISO_UTC); fail(); } catch (IllegalArgumentException ex) { // expected } }
1
public static String getSuffix(String str, String out) { if (str == null || str.length() == 0) { return null; } int i = str.lastIndexOf(out); if (i == -1) { return null; } return str.substring(i + out.length()); }
3
private int getOffsetY(int rowStartOffset, FontMetrics fontMetrics) throws BadLocationException { // Get the bounding rectangle of the row Rectangle r = component.modelToView( rowStartOffset ); int lineHeight = fontMetrics.getHeight(); int y = r.y + r.height; int descent = 0; // The text needs to be ...
4
@Test public void enqueuesAndDequeues() { assertTrue(queue.dequeue().equals("apples") && queue.dequeue().equals("oranges") && queue.dequeue().equals("pickles") && queue.dequeue().equals("tommytoes") && queue.dequeue() == null); }
4
public void getNextURLs(int max, List<WebURL> result) { while (true) { synchronized (mutex) { if (isFinished) { return; } try { List<WebURL> curResults = workQueues.get(max); workQueues.delete(curResults.size()); if (inProcessPages != null) { for (WebURL curPage : curResults) ...
8
public ArrayList<Prestamos> getAll(){ PreparedStatement ps; ArrayList<Prestamos> rows = new ArrayList<>(); try { ps = mycon.prepareStatement("SELECT * FROM Prestamos"); ResultSet rs = ps.executeQuery(); if(rs!=null){ try { w...
4
private void add(core.Hero hero, WidgetStackGrid list, core.Position2Object<GroupOfUnits> p2u) { if (hero.getUnits().size() >= 6 ) { QMessageBox.warning(this, "Nie można dodać", "W garnizonie jest już 6 jednostek"); } else { core.UnitType type = (core.UnitType)this.unit.itemData(this.unit.currentIndex()); ...
3
public static CompoundTag objectToCompoundTag(Object object) { CompoundTag tag = new CompoundTag(new HashMap<String, Tag>()); for (Field field : object.getClass().getFields()) { try { if (field.get(object) == null) continue; Tag t = null; t = Tag.fromValue(field.get(object)); ...
3
public final void mLETTER() throws RecognitionException { try { int _type = LETTER; int _channel = DEFAULT_TOKEN_CHANNEL; // C:\\Users\\Florian\\Dropbox\\Git\\CI_WiSe2013-2014\\CI_Aufgabe3\\teil1\\symbolraetsel_AST_Normalisiert\\SymbolraetselAST.g:36:7: ( ( 'A' .. 'Z' )+ ) ...
5
@Test public void testEditPromotion() { BlockingQueue<Promotion> promotionAux = null; Product book = new Product("Book", 1234, 2.30, 100); Promotion promotion = new Promotion(book, 1.00, 1245); facade.addProduct(book); facade.addPromotion(promotion); try { Thread.sleep(4000); } catch (InterruptedE...
4
@Before public void setUp() { calendarUsers = new CalendarUser[numInitialNumUsers]; events = new Event[numInitialNumEvents]; eventAttentees = new EventAttendee[numInitialNumEvents]; this.calendarService.deleteAllUsers(); this.calendarService.deleteAllEvents(); this.calendarService.deleteAllEventAttendee...
7
static final public void opRel() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EGAL: jj_consume_token(EGAL); expression.empileOpera(YakaConstants.EGAL); break; case DIFF: jj_consume_token(DIFF); expression.empileOpera(YakaConstants.DIFF); br...
7
@Override public int hashCode() { int result = minimumValue != null ? minimumValue.hashCode() : 0; result = 31 * result + (maximumValue != null ? maximumValue.hashCode() : 0); result = 31 * result + (averageValue != null ? averageValue.hashCode() : 0); result = 31 * result + (singleV...
4
public static void setFlag(BoardModel boardModel, Point point) { Cell currentCell = boardModel.getBoard()[point.getPosX()][point.getPosY()]; if (boardModel.getNumberOfFlags() > 0 && !currentCell.isFlagged()) { currentCell.setFlagged(true); boardModel.setNumberOfFlags(boardModel....
2
public void print(final PrintStream out) { out.println(name + "." + type + (isDirty ? " (dirty) " : "") + ":"); Iterator iter; iter = code.iterator(); while (iter.hasNext()) { out.println(" " + iter.next()); } iter = tryCatches.iterator(); while (iter.hasNext()) { out.println(" " + iter.n...
3
public String location() { return "Acceptable at all locations."; }
0
void expandNodes(List<String> a) { long startTime = System.currentTimeMillis(); AnyAction aa = new AnyAction(this); int index = 1; while (index < a.size()) { final String s = a.subList(0, index + 1).toString(); for (int i = 0, n = getRowCount(); i < n; i++) { ...
7
public void buildSound(int column) { int count = -1; sou.clear(); for (int j = 0; j < buttons[1].length; j++) { if (buttons[column][j].getState()) { try { sou.addClip("samples/sam2/" + sampleLines[j]); // System.out.println("sample: " + sampleLines[j] + // " added"); count++; } c...
9
public static void main(String[] args) throws IOException{ if ((args.length < 2) || (args.length < 4 && !args[0].equals("-chisquareALL"))) { System.out.println("Wrong arguments: -chisquare modelFileName featureA featureB"); System.out.println(" -chisquareALL modelFileName"); } else { Map<St...
9
public String[] getPathBinLinux() { // // This method looks for the path where all executable program // are linked on a Linux system. // String pathBin = System.getenv("PATH"); int countDoublePoint = 0; int i = 0; while(i<pathBin.length()) { if ((pathBin.charAt(i)) == ':') countDoublePoint++; i...
5
public void compareMsg(String msg, BufferedReader br) throws Exception{ String adyacentIp; if (msg.contains(":")){ System.out.println("<SERVER>RECIEVING FROM CLIENT:" + msg); String[] firstPick = msg.split(":"); adyacentIp = firstPick[1]; if ((!adyacentIp...
6
public List<PecaFornecida> listarPecasFornecedores() { List<PecaFornecida> lista = new ArrayList<>(); for (Fornecedor f : fornecedores) { for (PecaFornecida p : f.getFornecimentos()) { lista.add(p); } } return lista; }
2
public void setImagen(String imagen) { this.imagen = imagen; }
0
public Command parse(String[] args) throws ParseException { // if no args are given, do defaultAction if (args.length == 0) { args = new String[] {defaultAction.toString()}; } // determine action and get syntax for it CommandSyntax syntax = parseAction(args); Command.ActionType action = syntax.getAct...
7
public void buildDatabase() { this.lineCount = 0; try { while (this.bufrReader.ready()) { this.process(this.bufrReader.readLine() + '\n'); this.lineCount++; } this.bufrReader.close(); } // print the error catch (IOExcept...
3
public void loadFile() { File inputFile = new File( EXTERNAL_FILE ); if(!inputFile.exists()){ try { JAXBContext context = JAXBContext.newInstance( Contacts.class ); File outputFile = new File( EXTERNAL_FILE ); Marshaller marshaller = context.createMarshaller(); Contacts contacts = new Contacts()...
7
public String toString() { // only ZeroR model? if (m_ZeroR != null) { StringBuffer buf = new StringBuffer(); buf.append(this.getClass().getName().replaceAll(".*\\.", "") + "\n"); buf.append(this.getClass().getName().replaceAll(".*\\.", "").replaceAll(".", "=") + "\n\n"); buf.append("War...
9
public static boolean isEnglishLetter(char c) { return (c >= 65 && c <= 90) || (c >= 97 && c <= 122); }
3
@Override public boolean insert(final char character, final int level) { if (level == 1) { // Char should be one of sons // We checked isFull at the previous level so one of them is null if (left == null) { left = new Leaf(character); } else { // right == null right = new Leaf(character); isFull...
6
@EventHandler public void onBlockDamage(BlockDamageEvent event) { Player player = event.getPlayer(); if (!plugin.canBuild(player)) { event.setCancelled(true); if (message != null) message.sendMessage(player); } }
2
public RockTile(Sprite sprite, String id){ super(sprite, id); }
0
public boolean matchString(String s) { int k = idx; for (int i = 0; i < s.length(); i++) { if (k >= len || s.charAt(i) != buf[k++]) { return false; } } idx = k; return true; }
3
public void paint(Graphics g) { switch (gameState) { case GAMESTART: g.setColor(Color.yellow); g.fillRect(0,0,VWIDTH,VHEIGHT); g.setColor(Color.blue); g.setFont(font); g.drawString("Welcome to Catamaran!", VWIDTH/2 - 180, 100); g.drawString("Click to Start", VWIDTH/2 - 100, ...
7
private void addPossibleTakingMove(final List<Move> moveList, final int targetFile, final boolean isPromoting) { if (ChessRules.fileWithinBounds(targetFile)) { final ChessCoord tarCoord = Coords.coord(targetFile, this .getCoord().getRank() + this.rankStep); ...
6
public String longestPalindrome(String s) { if(s==null || s.length()<2) return s; int l = s.length(); char[] arr = s.toCharArray(); boolean[][] mat = new boolean[l + 1][l + 1]; int aj=0,ai=1; for(int i=0;i<=l;i++){ for(int j=0;j<=l-i;j++){ ...
8
@SuppressWarnings("unchecked") public static void read(String fileName) throws FileNotFoundException { // prepare to read file FileInputStream fin = new FileInputStream("plugins/" + Main.pluginName + "/" + fileName); ObjectInputStream ois; try { // attempt to read file ois = new ObjectInputStream(fin);...
4
@Override public Node<T> getParent(Node<T> n) { if (safety && !contains(n)) { throw new NodeNotFoundException(); } else if (n == null) { return null; } for (Node<T> tn : this) { Iterator<Node<T>> children = children(tn); while (children.hasNext()) { Node<T> child = children.next(); if (chil...
6
public Class<?> getConfigurableAnnotation(ArrayList<Class<?>> classes) { if(configurableAnnotation == null) findConfigurableAnnotation(classes); return configurableAnnotation; }
3
public void setSimObjects(Garden[] g, Player[] c){ //setting language-specific strings if(Locale.getDefault() == Locale.GERMAN || Locale.getDefault() == Locale.GERMANY){ nameOld = Lang_GER.nameOld; title = Lang_GER.pitchWindow; restartL = Lang_GER.setUpWindow; } else if(Locale.getDefault() == Locale.FREN...
5
public void reset() throws InterruptedException { boolean test = false; if (test || m_test) { System.out.println("Game :: reset() BEGIN"); } int x = getGrid().getGridWidth(); int y = getGrid().getGridHeight(); setGrid(new Grid(x, y)); setPlayer1Score(0); setPlayer2Sco...
4
public void epoch(){ EPOCH_allmoves = STAT_allmoves / (double) STAT_rounds; EPOCH_badmoves = STAT_badmoves / (double) STAT_allmoves; EPOCH_wins = STAT_wins / (double) STAT_rounds; resetStats(); //Running average of this model's stats if (first_epoch){ first_epoch = false; MODEL_badmoves = EPOCH_bad...
1
public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException { Input input = gc.getInput(); if(input.isKeyPressed(Input.KEY_SPACE)){ Sounds.bleep.play(); sbg.enterState(Game.menu); } counter+=delta; if(counter > 2000){ bgcolor = (bgcolor+1) %5; counter = 0; } ...
2
public float getLineThickness() { // check for border style if (borderStyle != null) { return borderStyle.getStrokeWidth(); } // check the border entry, will be solid or dashed else if (border != null) { if (border.size() >= 3) { return bor...
3
public void run () { try { setVendedor(getLocal().asignarVendedor()); local.getCompradores().remove(this); local.getCompradoresSiendoAtendidos().add(this); comprar(); } catch (InterruptedException e) { e.printStackTrace(); } }
1
public BufferedImage[] draw(String msg) { BufferedImage[] result = new BufferedImage[msg.length()]; msg = msg.toUpperCase(); for (int i = 0; i < msg.length(); i++) { for(int l = 0; l < characters.size(); l++){ if(Character.toString(msg.charAt(i)).contains(CorrectText(characters.get(l).getName(),true...
3
@Override public void render(GameContainer container, Graphics graphics) throws SlickException { gameMapRenderer.render(); gameMap.getItemsOnMap().forEach(i -> i.render()); players.forEach(Player::renderGlass); players.forEach(Player::render); int position = 10; final int offset = 30; int...
4
public void waitForPageToLoad() { // Logger.getInstance().info("waitForPageToLoad started"); WebDriverWait wait = new WebDriverWait(driver, Long.parseLong(getTimeoutForPageLoad())); try { wait.until((ExpectedCondition<Boolean>) new ExpectedCondition<Boolean>() { public Boolean apply(final WebDriver d) { ...
5
public int getRemainingSize() { return 0; }
0
public Object [][] getDatos(){ Object[][] data = new String[getCantidad_Cuentas ()][colum_names.length]; //realizamos la consulta sql y llenamos los datos en "Object" try{ if (colum_names.length>=0){ r_con.Connection(); String c...
5
public void setOptions(String[] options) throws Exception { String tmpStr; super.setOptions(options); tmpStr = Utils.getOption('N', options); if (tmpStr.length() != 0) setNumInstances(Integer.parseInt(tmpStr)); else setNumInstances(20); tmpStr = Utils.getOption("n...
9