text
stringlengths
14
410k
label
int32
0
9
public AlumneVo buscarAlumne(String User) { try { DbConnection conex= new DbConnection(); PreparedStatement consulta = conex.getConnection().prepareStatement("SELECT * FROM alumnes where nomUser='" + User + "';"); ResultSet res = consulta.executeQuery(); if (res.ne...
2
private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnIngresarActionPerformed if (jPContrasena.getPassword().length!=6) { JOptionPane.showMessageDialog(this, "Contraseña Incorrecta", "Error", JOptionPane.ERROR_MESSAGE); jPContrasena.reques...
2
@Override public String load() { try { Class.forName(JDBC_DRIVER).newInstance(); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) { log.fatal("Driver failed", e); } Connection connection = null; try { ...
5
public long binHasDisk(){ return binHasDisk; }
0
@Override public void keyReleased(KeyEvent e) { switch (e.getKeyCode()) { case KeyEvent.VK_UP: System.out.println("Stop moving up"); break; case KeyEvent.VK_DOWN: currentSprite = anim.getImage(); robot.setDucked(false); break; case KeyEvent.VK_LEFT: robot.stopLeft(); break; case KeyEv...
5
public Object getValueAt(int row, int col) { Statement m = (Statement)statements.getBusinessObjects().get(row); if (col == 0) { return m.getName(); } else if (col == 1) { return Utils.toString(m.getDate()); } else if (col == 2) { return (m.isDebit()) ? "(D) -" : "(C) +"; } else if (col == 3) { ret...
8
public void setLength(){ if(length == Double.MAX_VALUE) length = Math.sqrt( Math.pow(fromNode.getxCoord()-toNode.getxCoord(),2) + Math.pow(fromNode.getyCoord()-toNode.getyCoord(),2) ); }
1
public int readNoEof() throws IOException { int result = read(); if (result != -1) return result; else throw new EOFException("End of stream reached"); }
1
private static Method findSetterWithCompatibleParamType(final Class<?> clazz, final String setterName, final Class<?> argumentType) { Method compatibleSetter = null; for( final Method method : clazz.getMethods() ) { if( !setterName.equals(method.getName()) || method.getParameterTypes().length != 1 ) { ...
8
private static void validateEmail(String email) throws TechnicalException { if (email == null || email.isEmpty() || email.length() > EMAIL_SIZE) { throw new TechnicalException(EMAIL_ERROR_MSG); } String regex = "\\w+@\\w+\\.[a-z]{2,}"; Pattern p = Pattern.compile(regex); ...
4
public void proceed(int i, int j) { //Initializing Infofield inf = new Infofield(); mi = new Infofield(deck1); oi = new Infofield(deck2); for (int i1 = 0; i1 < new Random().nextInt(60); i1++) { //Preparing deck1 = shuffle(deck1); deck2 = shuffle(deck2); } if (pif.isShields())...
7
public double getPosY() { return posY; }
0
public GUI(Startup startup, boolean Guion){ guion = Guion; s = startup; users = new JList<String>(s.getUserNames()); channels = new JList<String>(s.getChannelNames()); userpane = new JScrollPane(users); channelpane = new JScrollPane(channels); areapane = new JScrollPane(area); lists.setLayout(...
3
synchronized void newSumLog(int n) { if (n >= sumLog.length) { double sumLogOld[] = sumLog; double sumLogNew[] = new double[n + 1]; // Copy old values for (int i = 0; i < sumLogOld.length; i++) sumLogNew[i] = sumLogOld[i]; // Calc new values for (int i = sumLogOld.length; i < sumLogNew.length;...
3
public static int triangleAsum1(int x[][]) { int sum = 0; for (int i = 0; i < x.length; i++) { System.out.println(); for (int j = 0; j < x[i].length; j++) { if (i <= j) { System.out.print(x[i][j] + " "); sum = sum + x[i][j]; } else { System.out.print(" "); } } } System.out....
3
public Value merge(final Value v, final Value w) { SourceValue dv = (SourceValue) v; SourceValue dw = (SourceValue) w; if (dv.insns instanceof SmallSet && dw.insns instanceof SmallSet) { Set s = ((SmallSet) dv.insns).union((SmallSet) dw.insns); if (s == dv.insns && dv.size == dw.size) { return v; } e...
6
@Override public List<Framedata> translateFrame( ByteBuffer buffer ) throws LimitExedeedException , InvalidDataException { List<Framedata> frames = new LinkedList<Framedata>(); Framedata cur; if( incompleteframe != null ) { // complete an incomplete frame while ( true ) { try { buffer.mark(); ...
6
@Override public void channelRead(ChannelHandlerContext context, Object message) throws Exception { if (message instanceof HttpRequest && ((HttpRequest) message).getUri().toLowerCase() .startsWith("/redirect?")) { HttpRequest request = (HttpRequest) message; QueryStringDecoder decoder = new Query...
8
protected List<Node> expand(Node node, Problem problem, List<State> generatedStates, List<State> expandedStates) { List<Node> successorNodes = new ArrayList<Node>(); Node successorNode = null; State currentState = null; State successorState = null; Node bestNode = null; //If the current node and pr...
7
public CheckResultMessage check27(int day) { return checkReport.check27(day); }
0
private String[] readTextField1() { int size = 0; String[] s; String temp = jTextArea1.getText(); char c = temp.charAt(temp.length()-1); StringReader sr = new StringReader(temp); try { LineNumberReader lr = new LineNumberReader(sr); lr.skip(Long.MA...
4
public static ArrayList<Object> parseList(StringBuffer buf, int[] idx) { idx[0]++; ArrayList<Object> into = new ArrayList<Object>(); while (true) { skipSpace(buf, idx); if (idx[0] >= buf.length()) { System.err.println("Unexpected end"); return into; } if (buf.charAt(idx[0]) == ']') { idx[0...
4
protected Integer doInBackground() { Benchmark.start("UnreadNews"); int i = 0; try { BufferedReader reader = new BufferedReader(new InputStreamReader(new URL("http://feedthenuketerrorist.fr.nf/newsupdate.txt").openStream())); ArrayList<Long> timeStamps = Lists.newArrayList(); String ...
7
@Test public void testSum() { System.out.println("sum"); Polynomial<Double, Double, Double> instance = this._instance; double[] values; values = new double[4]; for (int i = 0; i < values.length; i++) values[i] = i + 1.0; Polynomial<Double, Double, Double...
9
public void onScheduledTick (World world, int x, int y) { Tile tile = world.getTile(x, y-1); if (tile != null && !tile.solid) { if (tile.id == Tile.water.id) world.setTile(x, y-1, Tile.stone); else world.setTile(x, y-1, Tile.lava); return;...
9
public void exportTMX(String path, String extention) throws IOException { StringBuilder seg1 = new StringBuilder(); StringBuilder seg2 = new StringBuilder(); path = checkPath(path, extention); try { OutputStream fout = new FileOutputStream(path); OutputStream bout = new BufferedOutputStream(fout); Ou...
9
public void insert(int key) { Node uusi = new Node(key, false); if (root == null) { root = uusi; return; } Node current = root; Node p = current; while (true) { if (key == current.key) { return; // Jos lisättävä on juur...
6
void compress(int init_bits, OutputStream outs) throws IOException { int fcode; int i /* = 0 */; int c; int ent; int disp; int hsize_reg; int hshift; g_init_bits = init_bits; clear_flg = false; n_bits = g_init_bits; maxcode = MAXCODE(n_bits); ClearCode = 1 << (init_bits - 1); EOFCode = ClearCo...
9
public void drawControlPoint(Graphics2D g){ //adjust later to center of circle = focus point g.drawOval((int)curve.getCtrlX() - 5, (int)curve.getCtrlY() - 5, 10,10); }
0
@Override public int advance(int target) throws IOException { if (scorerDocQueue.size() < minimumNrMatchers) { return currentDoc = NO_MORE_DOCS; } if (target <= currentDoc) { return currentDoc; } do { if (scorerDocQueue.topDoc() >= target) { return advanceAfterCurrent() ?...
7
@Override public Float get(int i) { switch (i) { case 0: return w; case 1: return x; case 2: return y; case 3: return z; default: throw new IndexOutOfBoundsException(); } }
4
public boolean onCTFCommand(CommandSender sender, Command cmd, String label, String[] args){ //admin command. commands are: session, team if (args.length == 0) { return false; //no just ctf command } if (args[0].equalsIgnoreCase("session")) { return onCTFSessionCommand(sender, cmd, label, args); }...
3
public void testConstructor_ObjectStringEx1() throws Throwable { try { new YearMonth("T10:20:30.040"); fail(); } catch (IllegalArgumentException ex) { // expected } }
1
public static void writeSrcProperties(String projN, ArrayList<String> tl, ArrayList<String> wf){ ArrayList<String> srcPpts=rfa.readInputStream(GenerateInitScripts.class.getResourceAsStream("config/srcOds/template.properties"),"UTF-8"); StringBuffer content=new StringBuffer(); for(int i=0; i<src...
7
public static void pdftoText(File file, String outDir) { PDFParser parser; String parsedText = null; PDFTextStripper pdfStripper = null; PDDocument pdDoc = null; COSDocument cosDoc = null; boolean filefound=false; String outFileName = null; String result=""; try { FileInputStream fis = new FileInputStream(file.getAbso...
8
public static SuitabilityEnumeration fromValue(String v) { for (SuitabilityEnumeration c: SuitabilityEnumeration.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); }
2
public int getY() { return loc.y; }
0
public void update() { ticks++; if (doAnimate) { if (changing) { alpha -= 0.05f; if (alpha < 0.0f) { alpha = 1.0f; changing = false; } else { changing = true; } } if (changingPause) { if (currentState != HELP) { alpha -= 0.05f; if (alpha < 0.0f) { alpha = ...
9
public void terminated(Pipe pipe_) { int index = pipes.indexOf (pipe_); // If we are in the middle of multipart message and current pipe // have disconnected, we have to drop the remainder of the message. if (index == current && more) dropping = true; // Remove t...
4
@Test public void getProjectiles(){ World w = new World(null); Projectile p1 = new Projectile(1,1,1,1, new Position(1,1),true); Projectile p2 = new Projectile(1,1,1,1, new Position(1,1),true); w.addProjectile(p1); w.addProjectile(p2); assertTrue(w.getProjectiles().size() == 2 && w.getProjectiles().co...
2
public static int[][] findShortestPathReturnCost(Graph g, int sourceVertex){ int n = g.getVerticesCount(); //keeping space for 1 extra cycle to detect a negative cycle int [][]cost = new int[n+1][n]; Graph.Edge[][] retrackt = new Graph.Edge[n+1][n]; for( Integer i: g.getAllVert...
7
@Override public Operation create(Scanner scanner) throws FactoryException { try { String metric = scanner.next(); if (metric.equals("pixelcount")) return new SearchOperation(saved, new PixelCountMetric()); else if (metric.equals("uniquechars")) ...
3
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ItemSet other = (ItemSet) obj; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return ...
6
private static String getNumberImageFile(int num) { if((2 <= num && num <= 6) || (8 <= num && num <= 12)) { return "images/numbers/small_prob/" + num + ".png"; } else { assert false; return null; } }
4
@Override public void run() { try { @SuppressWarnings("resource") ServerSocket socketServidor = new ServerSocket(1111); while (true) { Socket socketCliente = socketServidor.accept(); System.out.println("DEBUG: Cliente encontrado!"); Runnable handler = new ClientHandler(socketCliente); Thread...
2
public static Distance getMiDistance() { if (miDistancia == null) miDistancia = new Distance(); return miDistancia; }
1
public void drawUntersumme(WindowAndDataProvider windowAndDataProvider, Graphics g) { if(drawLowerSum == true) { double hoehe; DPoint p1, p2; p1 = new DPoint(); p2 = new DPoint(); for(double i=intervalLeft; i<=intervalRight-dx+(dx/4); i+=dx) { int j1, j2; j1 = 0; ...
8
public BigDecimal convert(String startUnit, BigDecimal in, Type type, String endUnit) { if (type != null && type.isInList(startUnit) != null && type.isInList(endUnit) != null) { if (startUnit.equals(endUnit)) { return in; } else { return convertReferenceTo...
4
void setColorProfile(ColorProfile profile) { if (profile.getWhitespaceColor() != null) { whitespaceColor = profile.getWhitespaceColor(); } if (profile.getLineHighlightColor() != null) { lineHighlightColor = profile.getLineHighlightColor(); } if (profile.getMatchingCharColor() != null) { ...
6
public void run(){ videoIdName = getFirstPropertyValue("video-id-prop"); videoRefIdName = getFirstPropertyValue("video-reference-id-prop"); writeToken = getFirstPropertyValue("write-token"); if((videoIdName == null) && (videoRefIdName == null)){ die("One or both of 'video-id-prop' or 'video-referen...
4
@Override public boolean valid() { return super.valid() && (ctx.skillingInterface.getAction().equals("Smelt") && !ctx.skillingInterface.select().id(MakeSword.HEATED_INGOTS[0]).isEmpty()) || (!ctx.backpack.isFull() && (ctx.backpack.select().id(options.getIngotId()).isEmpty() && ctx.backpack.select().id(MakeSw...
5
public boolean containsValue(Object value) { return this.map.containsValue(value); }
0
@Override public void updateMovement() { xxa = 0.0F; yya = 0.0F; if(keyStates[0]) { yya--; } if(keyStates[1]) { yya++; } if(keyStates[2]) { xxa--; } if(keyStates[3]) { xxa++; } jumping = keyStates[4]; running = keyStates[5]; }
4
private void walk() { setX_Point(getX_Point() + getxVel()); // for graphics if(isWalking()) { if(timer==null){ timer= new Timer(75); } if(timer.isReady()) { if(timeVar==0){ timeVarPosi=1; }else if(timeVar==3){ timeVarPosi=-1; } timeVar+=timeVarPosi; timer= ...
6
public void quickSort(int left, int right) { if (right <= left) return; int lt = left, gt = right; int i = lt; int pivotIndex = (int) (Math.random() * (right - left)) + left; T pivot = this.array[pivotIndex]; swapArrayValues(left, pivotIndex); whi...
4
public HashMap<Character, Integer> kVecinosMasCercanos(String ficheroTest) { HashMap<Character, Integer> mapaco = new HashMap<>(); // Inicializo el vector de vecinos try { Character letra = 'A'; // Inicializo el map a 0; for (int i = 0; i < 26; i++) { mapaco.put(letra, 0); letra++; } Bu...
8
public void setContent(JPanel content) { this.content = content; }
0
private void validarCategoriaConTipoDeComprobante() throws InvalidInvoiceException, InvalidIDException{ if(tipoDocumentoDeCliente==null) throw new InvalidInvoiceClientIDTypeException("Missing ID Type"); if(categoria==null) throw new InvalidInvoiceException("Invalid Invoice Category"); if(categoria.equals(TipoCate...
8
public boolean start() { synchronized (optOutLock) { // Did we opt out? if (isOptOut()) { return false; } // Is metrics already running? if (taskId >= 0) { return true; } // Begin hitting the se...
6
@Override synchronized public void init () { Game = getParameter("Game"); Games = getParameter("Games"); setLayout(new BorderLayout()); if (Games != null && !Games.equals("")) { L = new java.awt.List(); add("Center", L); Urls = new Vector(); try { BufferedReader in = null; if (Games.s...
7
public static String StripColor(String str) { if(str == null) return ""; StringBuilder sb = new StringBuilder(); char colorChar = ColorPrefix.charAt(0); boolean colorMode = false; for(int i=0; i<str.length(); i++) { char ch = str.charAt(i); if(ch == colorChar) { colorMode = true; con...
4
private void printTimeStamp(int level) { switch(level) { case ALWAYS: { psOut.print(MSG_ALWAYS+LOG_SEP); break; } case ERROR: { psOut.print(MSG_ERROR+LOG_SEP); break; } case INFO: { psOut.print(MSG_INFO+LOG_SEP); break; } case VERBOSE: { psOut.print(MSG_...
6
private Integer createUser(Criteria criteria, AbstractDao dao) throws DaoException{ Criteria loginCrit = new Criteria(); loginCrit.addParam(DAO_USER_LOGIN, criteria.getParam(DAO_USER_LOGIN)); Criteria emailCrit = new Criteria(); emailCrit.addParam(DAO_USER_EMAIL, criteria.getParam(DAO_US...
2
public boolean updateFFmpegArgumentsName(String name, String arguments, String extension) { boolean ret = false; if (connection == null || name == null || !hasFFmpegArgumentsName(name)) return ret; try { PreparedStatement stat = connection.prepareStatement("UPDATE " + FFmpegArgumentsTableName + " SET Argum...
6
public void localModify(String local_path, java.sql.Timestamp local_update, int user) { DBLikeFileObject data = new DBLikeFileObject(local_path, local_update, user); DBLikeFileObject search = null; Iterator<DBLikeFileObject> itr = localDB.iterator(); for (int i = 0; i < localDB.size(); i++) { search ...
2
public GUI getGUI(String title) { for (GUI g : GUIs) { if (g.getTitle().equalsIgnoreCase(title)) { return g; } } return null; }
2
public void createNodePossibilities(ArrayList<Rod> rodList) { int currLen = 0; int priceListLength = rodList.size(); for(int index = 0; index < priceListLength; index++) { currLen = rodList.get(index).getLength(); for(int eachRod = 0; eachRod < totalLength/currLen; eachRod++) { possibilities.add(new Rod...
2
public static void print(char[][] board,int rows, int cols){ for(int i=0;i< rows;i++){ for(int j =0;j < cols;j++){ System.out.print(board[i][j]+ " "); } System.out.println(); } }
2
public void writeInformation(Description d, int categoryID, HUD UI) { if (categoryID == 0) describeCondition(d, UI) ; if (categoryID == 1) describePersonnel(d, UI) ; if (categoryID == 2) describeStocks(d, UI) ; if (categoryID == 3) describeUpgrades(d, UI) ; }
4
protected void processGlobalResourceARList(Sim_event ev) { LinkedList regionalList = null; // regional GIS list int eventTag = AbstractGIS.GIS_INQUIRY_RESOURCE_AR_LIST; boolean result = false; // for a first time request, it needs to call the system GIS first, // then asks...
6
public void onFirstStat(Stat stat) { if (!stat.isNormalState()) onStatStateChanged(stat); }
1
*/ public 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 void moveNorth() throws InterruptedException{ if (isDoor[0] && !isLocked[0]){ currentY--; currentRoom = rooms[currentY][currentX]; currentRoom.playerVisits(); setAdjacentRooms(); Game.printMessage("You walk through the northern door\n"); } else if (!isDoor[0]) Game.printMessage("There is no...
4
protected void _setDistance(Distance distance) { _distance = distance; _setTarget(_targetFromDistance(distance)); }
0
public void addDay(String weekNumber, String day, Boolean value) { Map<String, Boolean> existingInner = data.get(weekNumber); if (existingInner == null) { existingInner = new HashMap<String, Boolean>(); } existingInner.put("day-" + day, value); data.put("week-" + wee...
1
public TernaryST() { N = 0; }
0
public String toString() { return "[Item object: id=" + this.id + " name="+ this.itemName + " desc=" + this.desc + " obtained=" + this.obtained + " cost=" + this.cost + "]"; }
0
public boolean mouseOver(int x, int y) { if (bounds.contains(x, y)) { if (!animating) { if (!beingClicked) currentIndex = 1; } } else if (buttonMode && !animating) currentIndex = 0; return false; }
5
private boolean isDirectory( String path ) { File f = new File( path ); if ( f.exists() ) { return f.isDirectory(); } else { char flag = path.charAt( path.length() - 1 ); if ( flag == '/' || flag == '\\' ) { return true; } else { return false; } } }
3
public short open_serial() { // the next line is for Raspberry Pi and gets us into the while loop and was suggested here was suggested http://www.raspberrypi.org/phpBB3/viewtopic.php?f=81&t=32186 System.setProperty("gnu.io.rxtx.SerialPorts", COM_PORT_NAME); Enumeration portEnum = CommPortIdentifier.getPo...
4
private void dfs(Graph<?> G, Object v, Object w) { this.marked.put(v, true); this.path.add(v); System.out.println(path); for (Object temp : G.getAdjacentVertices(v)) { if (temp.equals(w)) continue; if (path.contains(temp)) { break; } ...
5
public String getPrice() { return price; }
0
RoomOutput[][] printScheme(int i, int j, Schedule s){ RoomOutput[][] r = new RoomOutput[s.schedule[0][0].rooms.length][s.schedule[0][0].rooms[0].length]; for(int k=0; k<r.length; k++){ for(int m=0; m<r[0].length; m++){ r[k][m] = new RoomOutput(s.schedule[i][j].rooms[...
2
public InputSource resolveEntity(String pid,String sid) { if(log.isDebugEnabled()) log.debug("resolveEntity("+pid+", "+sid+")"); URL entity=null; if(pid!=null) entity=(URL)_redirectMap.get(pid); if(entity==null) enti...
9
protected <T> Subject createSubject(final SudoAction<T> c) { Subject s = c.getSubject(); if(s == null) { final Set<Object> credsPrivate = new LinkedHashSet<Object>(); final Set<Object> credsPublic = new LinkedHashSet<Object>(); final Set<Principal> principals...
7
public Node closeBra(int bras,int wasBraL,int firstbras,Node n){ if(n.getRN() == null){ int aux = wasBraL; while(true){ if(n.getnrB() > 0 && n.getownB() > aux){ n.setB(n.getnrB() - aux); n.setownB(n.getownB() - aux); break; } if(n.getnrB() > 0 && n.getownB() <= aux ){ aux -= n.ge...
8
private void loadPowerUpSprites() { // create "goal" sprite Animation anim = new Animation(); anim.addFrame(loadImage("heart1.png"), 150); anim.addFrame(loadImage("heart2.png"), 150); anim.addFrame(loadImage("heart3.png"), 150); anim.addFrame(loadImage("heart2.png"), 150)...
0
public static final void setup(Class<?> theClass) { BundleInfo.setDefault(new BundleInfo(theClass)); Path path; try { URI uri = theClass.getProtectionDomain().getCodeSource().getLocation().toURI(); path = Paths.get(uri).normalize().getParent().toAbsolutePath(); if (path.endsWith("support/jars")) { //$NON...
4
private boolean isBestScore(long l) { for(Map.Entry<Player, Long> entry : speeds.entrySet()) { entry.getValue(); if(l > entry.getValue()) return false; } return true; }
2
public void entrar() { try { int cedula = Integer.parseInt(usuario.getText()); String password = contraseña.getText(); DAO_Login login = new DAO_Login(cedula, password); login.conexion.conectar(); int tipoUsuario = login.login(); login.cone...
3
@Override boolean offerStop() { if (getPoints() >= 17) { setStop(true); System.out.println("AI stopped"); } else System.out.println("AI refused to stop"); return isStop(); }
1
public static void main(String[] args) throws InterruptedException { final int numberOfTrees= 10; final int numberOfDucks= 20; final int numberOfHunters= 10; HuntField field= new HuntField(12,24); //12x24 Swing swing = new Swing(field); for(int i=0; i<numberOfTrees; i++) new Tree(field); fo...
4
public void visitUCExpr(final UCExpr expr) { if (expr.expr == from) { expr.expr = (Expr) to; ((Expr) to).setParent(expr); } else { expr.visitChildren(this); } }
1
protected void setX(int _x) { this.x = _x; }
0
private void mergeListaServidores(List<InetAddress> IPServidores) { for (InetAddress IP : IPServidores) { boolean found = false; for (InetAddress IP2 : servidoresArquivo) { if (IP.equals(IP2)) { found = true; ...
5
protected void select( int posX, int posY ){ this.selected = boardController.select(posX, posY); if(this.selected.getUnit() != null){ // One unit if(this.selected.getUnit().getLoyalty() != this.loyalty){ // Unit 0 different loyalty try the nex one ;) if(this.selected.getUn...
4
public Ventana(InterfazJuego tipoJuego, int AnchoVentana, int AltoVentana, int DiametroImagen, int NumeroEnemigos, int NumeroObstaculos, int NumeroLocos) throws IOException{ //Creamos la ventana principal JFrame jf = new JFrame("Ventana Juego"); jf.addWindowListener(new WindowAdapter() { pub...
8
public void setCurrentPawnInfo(String pieceID) { char color = pieceID.charAt(0); if (color == 'g') { startPosition = greenStartPosition; homePosition = greenHomePosition; safetyZoneIndex = greenSafetyIndex; currentStart = greenStart; currentHom...
4
public static void write(String output) { Date d = new Date(); String timeStamp = String.valueOf(d.getTime()*1000); String outStep = timeStamp + ", " + output; p.println(outStep); }
0
private boolean compareParallelSequential (AbstractModel m1, AbstractModel m2) throws InterruptedException, ExecutionException{ //make steps on models for(int i = 0; i < TEST_FRAME_LIMIT; i++){ m1.step(); m2.step(); } //if lists are different sizes we can fail right away if(m1.p.size() != m2.p.siz...
6