text
stringlengths
14
410k
label
int32
0
9
@SuppressWarnings({ "rawtypes", "unchecked" }) public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException{ resp.setContentType("text/html"); resp.setCharacterEncoding("utf-8"); Cache cache = null; try { CacheFactory cacheFactory = CacheManager.getInstance() .getCacheFactory(...
2
public void countDiffPixels() { if (image1 == null || image2 == null) { return; } int w1 = image1.getWidth(); int h1 = image1.getHeight(); int w2 = image2.getWidth(); int h2 = image2.getHeight(); int wmax = ...
9
public static void jams_wrap(List<String> jars, String srcPath, List<String> className) throws Exception { if (jars == null || jars.size() == 0) { throw new RuntimeException("No jar files!"); } if (srcPath == null) { throw new RuntimeException("No src path!"); } ...
8
final void method3874(Class229 class229, int i, Class229 class229_129_) { do { try { anInt7959++; boolean bool = false; if (class229_129_ != (((NativeToolkit) this).aClass229Array8086 [((NativeToolkit) this).anInt8175])) { ((NativeToolkit) this).aClass229Array8086[(((NativeToolkit) this) ...
8
public PathQuad findContainer(float targetX, float targetY) { PathQuad temp = this; // Avoid infinite looping of uncontained coordinates if(!temp.box.contains(targetX, targetY)) return null; while(!temp.noChildren()) { for(int a = 0; a<temp.children.length; a++) { if(temp.children[a].box.contains(t...
4
@Override public void setCity(String city) { super.setCity(city); }
0
public String getParameters() { return middle + ((middle.length() != 0 && trailing.length() != 0) ? " " : "") + trailing; }
2
public void close() { EIError.debugMsg("Closing"); if (clientReceiveThread != null) { clientReceiveThread.setRunning(false); } if (socket != null) { try { sendData("goodbye"); socket.close(); } catch (IOException e) { ...
3
public void close() { logger.debug("DBDao:: close -----------begin "); try { if (conn != null && !conn.isClosed()) { conn.close(); } } catch (Exception e) { logger.error(e, e); } logger.debug("DBDao:: close -----------end "); }
3
public CheckResultMessage checkG09(int day) { int r1 = get(23, 5); int c1 = get(24, 5); int r2 = get(30, 5); int c2 = get(31, 5); if (checkVersion(file).equals("2003")) { try { in = new FileInputStream(file); hWorkbook = new HSSFWorkbook(in); if (0 != (getValue(r1 + 7, c1 + day, 5).add( g...
5
public void transferToOtherCustomerAccount(double amount, BasicAccount source, BasicAccount destination){ if(amount > 0){ if(source.getAccountOwner() == this){ if(source instanceof CustomerTransferSource){ if(source.getCurrentAccountBalance() - amount > 0){ if(destination.getAccountOwner() != this){...
5
public String toString(){ return "devide by "; }
0
private void visitStandardCall(Node node, Node child) { if (node.getType() != Token.CALL) throw Codegen.badTree(); Node firstArgChild = child.getNext(); int childType = child.getType(); String methodName; String signature; if (firstArgChild == null) { i...
9
@RequestMapping(value = {"/SucursalBancaria/id/{idSucursalBancaria}"}, method = RequestMethod.GET) public void read(HttpServletRequest httpRequest, HttpServletResponse httpServletResponse, @PathVariable("idSucursalBancaria") int idSucursalBancaria) { ObjectMapper jackson = new ObjectMapper(); String...
2
public void update(GameContainer container, StateBasedGame game, int delta) throws SlickException { Input input = container.getInput(); // redemarrer le jeu if (input.isKeyPressed(Input.KEY_R)) { init(container, game); return; } //mettre le jeu en pause if (input.isKeyPressed(Input.KEY_P)) ...
6
void readFromCpp() throws FileNotFoundException { Scanner in = new Scanner(file); String line, section = ""; while (in.hasNext()) { line = in.nextLine(); if (line.trim().contains("/*")) { section = "Settings"; } if (line.trim().cont...
5
public ProfilePanel(final String emailName, final String emailUser, final FacelookAppGUI a) { super(); container = a; this.setBackground(Color.decode("#3b5998")); this.setPreferredSize(new Dimension(770,539)); setLayout(null); JLabel lblFacelook = new JLabel("Facelook"); lblFacelook.setFont(new Font("L...
7
public void update(InputHandler inHandler){ setX_Point(getX_Point()+(getxVel()*getDir())); if(getDamage()>0){ setDamage(getDamage()-getDamageLoss()); }else if(getDamage()<0){ setDamage(0); } if(timer==null){ timer= new Timer(200); } if(timer.isReady()){ if(timeVar==0){ timeV...
6
public boolean isInBox(int clickX, int clickY, int boxLeftTopX, int boxLeftTopY, int boxRightBottomX, int boxRightBottomY){ if(clickX >= boxLeftTopX + cornerX && clickX <= boxRightBottomX + cornerX && clickY >= boxLeftTopY + cornerY && clickY <= boxRightBottomY + cornerY){ return t...
4
@EventHandler public void WitherFastDigging(EntityDamageByEntityEvent event) { Entity e = event.getEntity(); Entity damager = event.getDamager(); String world = e.getWorld().getName(); boolean dodged = false; Random random = new Random(); double randomChance = plugin.getZombieConfig().getDouble("Wither.Fas...
7
static public RealLabelledData dataFromTextFile(String filename, int forcelabel, String split) { String line = ""; RealLabelledData ret = new RealLabelledData(); BufferedReader reader = null; if (split == null) split = " +"; // if we don't get split information, we assu...
7
public void createPanel() { setTitle("Global Preferences"); setSize(500, 600); setLocationRelativeTo(getParent()); setIconImage(Images.G_PREFS_ICON); contentPanel.setLayout(null); FileNameExtensionFilter ff = new FileNameExtensionFilter("Image files *(.jpg, .jpeg, .gif, .png)", "jpg", "jpeg", "gif", "png...
5
public GameConfiguration load() { try { if (istream == null) { istream = new FileInputStream(f); } JAXBContext context = JAXBContext .newInstance(GameConfiguration.class); Unmarshaller umarsh = context.createUnmarshaller(); GameConfiguration ret = (GameConfiguration) umarsh .unmarshal(ist...
3
BenevolentRobot() { // On construction, load an english dictionary and word frequency list. // Dictionary source: SCOWL (wordlist.sourceforge.net) // Frequency count: BNC Frequency list (http://www.kilgarriff.co.uk/bnc-readme.html) // Read in (frequency, word) pairs, hash them by word. freqMap = new HashMap<...
7
public ClassInfo getSuperclass() { if ((status & HIERARCHY) == 0) loadInfo(HIERARCHY); return superclass; }
1
public static boolean Validate(String xmlFile, String xsdFile, StringBuilder message){ Source schemaFile = new StreamSource(new File(xsdFile)); Source xmlSrc = new StreamSource(new File(xmlFile)); SchemaFactory schemaFactory = SchemaFactory .newInstance(XMLConstants.W3C_XML_SCHEM...
3
public static int[] FH(String[] h) { int[] r = new int[2]; r[0] = -1; Map<Character, Integer> m = new HashMap<Character, Integer>(); Integer i; for (String s : h) { i = m.get(s.charAt(0)); if (i == null) { i = 0; } i++; m.put(s.charAt(0), i); } if (m.keySet().size() == 2) { List<I...
9
private void init(Properties config) { // keepAliveInterval String interval = config.getProperty("keepAliveInterval"); try { keeper = new AliveKeeper(Integer.parseInt(interval)); } catch (Exception e) { keeper = new AliveKeeper(); } keeper.start();...
9
HashSet<String> findWord(char[][] matrix, HashSet<String> dict) { TreeNode root = new TreeNode((char) 0); for (String s : dict) root.addWord(s.trim()); HashSet<String> res = new HashSet<String>(); boolean[][] flag = new boolean[matrix.length][matrix[0].length]; for (int i = 0; i < matrix.length; i++) { ...
5
public String getTIN(){ String s = (String)personnelCBox.getSelectedItem(); int i; if(s == null || s.length() == 0){ return null; } for(i = 0;i < s.length(); i++){ if(s.charAt(i) == '~'){ break; } } return s.substring(i + 2, s.length()); }
4
public static void UpperTitle(){ try { if(conn == null || conn.isClosed()){ conn = DatabaseConnection.getConnection(); } } catch (SQLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try{ conn.setAutoCommit(false); PreparedStatement stmnt...
4
public void setQueue3(FloatQueue t) throws MismatchException { if (t == null) throw new NullPointerException("the arg cannot be null"); if (q1 != null) { if (t.getLength() != q1.getLength()) throw new MismatchException("queue 1 and 3 have different lengths!"); if (t.getPointer() != q1.getPointer()) ...
9
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((banckAccount == null) ? 0 : banckAccount.hashCode()); return result; }
1
@Override public boolean isAchieved() { Belief clientStateGoal = new Belief("Drinking"); for(Table table : tables) { if( !table.isFree() ) { for( Client client : table.getClients() ) { if( !table.getClientState(client).getName().equalsIgnoreCase( clientStateGoal.getName() )) return ...
4
public int checkSidwaysDown(int originLetter, int originNum, int newLetter, int newNum, Board b) { valid = 0; int diagnalDownLetter = originLetter; int diagnalDownNumber = originNum; if(newLetter > originLetter) { int downRightValid = 0; for(int counter = 0; counter < ((newNum-originNum)-1); counter++)...
6
public void run() { try { BufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream())); PrintWriter out = new PrintWriter(client.getOutputStream(), true); out.write(">ACCEPTED"); out.flush(); //DataInputStream is = new DataIn...
6
public void draw(Graphics g,Location origin, double scale, Color color, int xdiff, int ydiff){ g.setColor(this.color); for(int i = 0; i < locationPoints.size()-1; i++){ Location loc1 = locationPoints.get(i); Location loc2 = locationPoints.get(i+1); Point p1 = loc1.getPoint(origin, scale); Point p2 = ...
1
public float getB() { return b; }
0
private void addExp(ArrayList<String> players, String job, String level, CommandSender sender) { job = job.toLowerCase(); double experience = 1.0D; if(StringToNumber.isPositiveNumber(level)) experience = Double.parseDouble(level); if (PlayerJobs.getJobsList().get(job) == nul...
7
int repeatSub (int num){ while(num>=10){ num=num-10; } return num; }
1
public void visitArithExpr(final ArithExpr expr) { if (isLeaf(expr.left()) && isLeaf(expr.right())) { firstOrder = true; } }
2
public String getPassword(){ return password; }
0
protected List<Author> getAuthors() { io.println("Give authors(\"Firstname, Lastname\") separated by newline. Empty line stops."); Author element = io.getAuthor(": "); List<Author> list = new LinkedList<Author>(); while (element != null) { list.add(element); eleme...
2
@Override public void handle(HttpExchange exchange) throws IOException { System.out.println("In join game handler"); String responseMessage = ""; if(exchange.getRequestMethod().toLowerCase().equals("post")) { try { // check user login cookie and if valid get params exchange.getResponseHeaders().set...
5
public String stateToString() { String stateString = ""; boolean ticker = false; if ((STATE_TRACKING_GAZE & state) != 0) { stateString += "STATE_TRACKING_GAZE"; ticker = true; } if ((STATE_TRACKING_GAZE & state) != 0) { st...
9
private static void showIndividualSummaries() { StringBuilder out = new StringBuilder(); out.append("\n===========================================\n"); out.append("===== Total System Time per/thread =====\n"); out.append("===========================================\n"); Object...
3
public void teleportHome(CommandSender cs, Command cmd, String string, final String[] args) { if (args.length == 0) { final Player player = (Player) cs; if (player.hasPermission("warpsandports.homes.tp.default") || player.isOp()) { if(MainClass.players .contains(player.getUniqueId() + ...
9
private static VendorInventory getVendorInventory(int invId) { QueryExecutor qe = new QueryExecutor(); qe.SendQuery("SELECT * FROM RPG372DB_Inventory WHERE invId='" + invId + "'"); if (qe.resultSize() == 0) return null; VendorInventory venInv = new VendorInventory(null); int tempId; for (int i = ...
3
public String editblogDetails() { String outcome = null; Blog blog = this.blogDelegate.getBlogDetail(this.blogId); this.setBlogId(blog.getBlogId()); this.setBlogContent(blog.getBlogContent()); this.setBlogLabel(blog.getBlogContentLable()); this.setBlogCreatedDate(blog.g...
0
public Chessboard() { fields = new Field[NUMBER_OF_ROWS][NUMBER_OF_COLUMNS]; char row = 0; byte column = 0; for(int r = 0; r < NUMBER_OF_ROWS; r++) { row = (char) (FIRST_ROW + r); column = FIRST_COLUMN; for(int c = 0; c < NUMBER_OF_COLUMNS; c++) { fields[r][c] = new Field(row, column); }...
2
@Override public void start() { worker = new Thread() { @Override public void run() { while (!this.isInterrupted() && currentScene != null) { renderScene(currentScene); ...
3
public CheckResultMessage check30(int day) { return checkReport.check30(day); }
0
protected boolean isFinished() { final long timeDiff = System.currentTimeMillis() - startTime; //TODO make sure things get finished (time to be on target) return (((state != ClawPivotSubsystem.PICKUP && clawPID.onTarget() && timeDiff > 1500) || timeDiff > 4000) && (driveFinishedChecker == null ...
6
@Override public Object clone() { return new Buchi((HashSet<Character>) alphabet.clone(), (HashSet<Integer>) states.clone(), initialState, (HashSet<Integer>) acceptanceCondition.clone(), (HashSet<Transition>) transitionRelation.clone()); }
0
public static String getMessage(String message, Locale locale){ ResourceBundle resourceBundle = null; if(locale!=null) resourceBundle = ResourceBundle.getBundle(BUNDLE_NAME, locale); else resourceBundle = ResourceBundle.getBundle(BUNDLE_NAME); if(resourceBundle!=null){ message = resourceBundle.getStr...
2
@Override public FileVisitResult visitFile(Path file, BasicFileAttributes attr) { if (attr.isRegularFile()) { String name = "" + file; if (name.endsWith(".txt")) { for (JSONArray comments : extractor.extractFromCrawler(file, related)) { this.d...
4
public List performSynchronousInference() throws IOException, TimeOutException, CycApiException { if (getStatus() == SubLWorkerStatus.NOT_STARTED_STATUS) { start(); } if (getStatus() == SubLWorkerStatus.WORKING_STATUS) { try { synchronized (lock) { lock.wait(getTimeoutMsecs()...
9
public AjoutMotClefDialog(ArrayList<CategorieMotClef> categories) { setResizable(false); setModalityType(ModalityType.APPLICATION_MODAL); setTitle("Ajout d'un mot clef pour une catégorie"); setBounds(100, 100, 486, 168); getContentPane().setLayout(new BorderLayout()); contentPanel.setBorder(new EmptyBorder(...
2
public Node FindLoopBeginning(Node head) { Node fastrunner = head; Node slowrunner = head; while (fastrunner != null && slowrunner != null) { fastrunner = fastrunner.next.next; slowrunner = slowrunner.next; if (slowrunner == fastrunner) break; } if (fastrunner == null) return null; f...
8
@Override public ExecutionContext run(ExecutionContext context) throws InterpretationException { int x = DrawingZone.turtle.getPosX(); int y = DrawingZone.turtle.getPosY(); DrawingZone dw = UserInterface.dw; Value value = ((AbsValueNode) this.getChildAt(0)).evaluate(context); ...
3
private void updatePlayers(GameContainer c, int delta, Input in){ for(int i = 0; i < players.length; i++){ if(players[i].isAlive()){ Vector2f direction = new Vector2f(0, 0); if (in.isKeyDown(playerControls.get("P"+(i+1)+"N"))) { direction.add(new Vector2f(0, -1)); } else if (in.isKeyDown(playe...
8
public void paintComponent(Graphics g) { g.setColor(java.awt.Color.WHITE); g.fillRect(0, 0, getWidth(), getHeight()); g.setColor(java.awt.Color.BLACK); if (background != null) { g.drawImage(background, 0, 0, null); } ...
2
public String add(Properties serviceProperties) {String GETCommand="", ret=""; if(serviceProperties!=null && !serviceProperties.equals("")) { GETCommand=""; Enumeration e = serviceProperties.propertyNames(); while (e.hasMoreElements()) { String key = (String) e.nextElement...
5
public void saveToDB() { try { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); NewsInfo newsInfo = new NewsInfo(); newsInfo.title = TitleUtils.half2Fullchange(dataInfo.title); newsInfo.url = dataInfo.source; newsInfo.newspaper = dataInfo....
4
private void jButton6ChangDispalyMode(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ChangDispalyMode // TODO add your handling code here: if (this.testState != this.playback) { return; } if (this.tstErrors) { System.out.println("================"); System.out.println("E...
7
private void AppendPolygon(TEdge e1, TEdge e2) { // get the start and ends of both output polygons ... OutRec outRec1 = m_PolyOuts.get(e1.outIdx); OutRec outRec2 = m_PolyOuts.get(e2.outIdx); OutRec holeStateRec; if(Param1RightOfParam2(outRec1, outRec2)) holeStateRec = outRec2; else if(Param1RightOfParam...
9
Template(String name, Vector points) { this.Name = name; this.Points = Utils.Resample(points, Recognizer.NumPoints); this.Points = Utils.RotateToZero(this.Points); this.Points = Utils.ScaleToSquare(this.Points, Recognizer.SquareSize); this.Points = Utils.TranslateToOrigin(this.Points); }
0
public static Collection<String> getLinks(String article) { Document doc = null; try { doc = Jsoup.connect(article).get(); } catch (IOException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } Element b...
4
public Volume(Element ul) { Element header = ul; while(!header.tagName().equals("body")) { Element candidate = findHeader(header); if(candidate == null) { header = header.parent(); } else { header = candidate; break; } } if(!header.tagName().equals("body")) { title = header.select(...
7
public static void main(String[] args) { int r,proceso; int valorx = Integer.parseInt(JOptionPane.showInputDialog("Ingrese el valor del entero X")); int valory=Integer.parseInt(JOptionPane.showInputDialog("Ingrese el valor del entero Y")); if (valorx<=0 || valorx>255) { ...
5
public boolean Move(Tile tile) { // Concise method of checking if both tile.Enter(this) // and this.Enter(tile) succeed. boolean success = (tile.Enter(this) && this.Enter(tile)); // If the movement succeeded, update stuff and notify everyone. if(success) { this.setLoc(tile); tile.Entered(this); ...
2
public boolean save(WorldDescriptor descr) { boolean ostreamCreatedHere = false; try { if (ostream == null) { ostream = new FileOutputStream(f); ostreamCreatedHere = true; } JAXBContext context = JAXBContext .newInstance(WorldDescriptor.class); Marshaller marsh = context.createMarshaller();...
4
@EventHandler public void onDamage(EntityDamageEvent e) { if(!RushPlugin.isGameRunning() || RushPlugin.isGameFinished()) { e.setCancelled(true); return; } }
2
@Override public void deserialize(Buffer buf) { super.deserialize(buf); honor = buf.readUShort(); if (honor < 0 || honor > 20000) throw new RuntimeException("Forbidden value on honor = " + honor + ", it doesn't respect the following condition : honor < 0 || honor > 20000"); ...
6
public static void main(String[] args){ int i=0; int sum = 0; for (i=1;i<Integer.MAX_VALUE;i++){ sum+=i; int divs = dividers(sum); if (divs > 500) break; } System.out.println(sum); }
2
public static void main(String[] args) { int number1; int number2; String operator; Scanner input = new Scanner(System.in); System.out.print("Enter the first number: "); number1 = input.nextInt(); System.out.print("Enter the second number: "); num...
4
public static void toggleCommentForSingleNode(Node node, CompoundUndoable undoable) { int oldValue = node.getCommentState(); int newValue = Node.COMMENT_INHERITED; boolean isComment = node.isComment(); if (oldValue == Node.COMMENT_FALSE) { node.setCommentState(Node.COMMENT_TRUE); newValue = Node.COMMEN...
3
public double rollOut(StateObservationMulti state) { int thisDepth = this.m_depth; while (!finishRollout(state,thisDepth)) { //random move for all players Types.ACTIONS[] acts = new Types.ACTIONS[no_players]; for (int i = 0; i < no_players; i++) { ...
4
@Override public void update(double delta, World w) { super.update(delta, w); if(follow!= null) { this.setDx(((follow.getX()+follow.getxLen()/2)-(this.getX()+this.cameraWidth/2))/20); this.setDy(((follow.getY()+follow.getyLen()/2)-(this.getY()+this.cameraHeight/2))/20); }else{ this.setDx(this.getDx()...
5
public boolean compress(int maxX, int maxY) { boolean needRepaint = false; for( ; ; ) { Rectangle r = cardBounds(); if(r.width > maxWidth() || r.x + r.width >= maxX && dX > 5) { --dX; needRepaint = true; } else if(r.height >...
8
@Override public boolean dispatchKeyEvent(KeyEvent e) { if (e.getID() == KeyEvent.KEY_RELEASED) { char key = e.getKeyChar(); if (key >= 'a' && key <= 'z') key=(char) (key-32); if ((key >= '1' && key <= 'Z')){ KEYBORD.jButtonActionPe...
6
public List<Class<?>> getClasses(String packageName) throws ClassValidationException { try { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); String path = packageName.replace('.', '/'); Enumeration<URL> resources = classLoader.getResources(path); ...
6
private boolean checkValidUser_basicAuthentication( URI requestURI, HTTPHeaders headers, HypertextAccessFile htaccess, String authMethod, File authUserFile, Map<String,BasicType> additionalSettings, Map<String,BasicType> optionalReturnSettings ) throws IOException, ...
4
protected void stepToSquare(){ if (this.nextSquare==this.currentSquare+1){ //if the next square is to the right this.parent.setX(this.parent.getX()+this.parent.speed); } else if (this.nextSquare==this.currentSquare-1) { //if the next square is to the left this.parent.setX(this.pa...
8
* * @return a list of the backchaining implication rules which might apply to the given predicate * * @throws UnknownHostException if cyc server host not found on the network * @throws IOException if a data communication error occurs * @throws CycApiException if the api request results in a cyc server er...
2
public void update(Update query) throws IOException, Error, ClassNotFoundException{ Condition cond = query.getCondition(); ArrayList< ArrayList<Value> > tupleList; ArrayList<AttrAssign> attrAssignList = query.getAttrAssignList(); Hashtable<String, Table> tables = null; Table table; File tableFile = new Fil...
8
public Set adjacent(Object vertex) { if (!verticesToNeighbors.containsKey(vertex)) verticesToNeighbors.put(vertex, new HashSet()); return (Set) verticesToNeighbors.get(vertex); }
1
public void move() { if (userKick) { userKick = false; cleverBall = ball.getCopy(); while (cleverBall.getY() >= this.getTop()) { cleverBall.move(); } futureOfX = cleverBall.getX(); moveToBall = true; } if (m...
5
private static void executeFunctionalTestCase(File file) { ArrayList<Command> commands = new ArrayList<Command>(); System.out.println("Executing test case " + file.getName()); // Start up a server ServerThread server = new ServerThread(); server.start(); // Hashmap to keep track of the clients that h...
8
public static LinkedList<String> benchmarkIcebergs(Path path, double frequency){ Hashtable<String, Integer> tab = new Hashtable<String, Integer>(); int comp = 0; for (String s : new WordReader(path)){ if (!tab.containsKey(s)) tab.put(s, 1); else{ int d = tab.remove(s); ...
4
public ArrayList<UserModelBean> getAllUser() { // return value ArrayList<UserModelBean> userList = new ArrayList<UserModelBean>(); try { // create connection connection = java.sql.DriverManager.getConnection("jdbc:mysql://" + dB_HOST + ":" + dB_PORT + "/" + dB_NAME, dB_USER, dB_PWD); // Cr�ation d...
2
public Grid getGridObj() { boolean test = false; if (test || m_test) { System.out.println("FileManager :: getGridObj() BEGIN"); } if (test || m_test) { System.out.println("FileManager :: getGridObj() END"); } return m_gridObj; }
4
public int moverDeA(int deFila, int deColumna, int aFila,int aColumna){ if(esObjetoUno(aFila, aColumna)){ int valorACorrer=matriz[deFila][deColumna]; actualizarCasilla(deFila,deColumna, ID_VACIA); actualizarCasilla(aFila,aColumna, valorACorrer); robot.setCarga...
8
public String getCountry() { return country; }
0
private BoundType getBoundTypeForTerminalIntegerLiteral(Class<?> type, boolean array) throws SynException { if (int.class.equals(type)) { return IntBoundType.INSTANCE; } else if (type.isAssignableFrom(Integer.class)) { return IntegerBoundType.INSTANCE; } e...
7
@SuppressWarnings("static-access") public boolean approveSelection(){ boolean seccheck = false; File f = listener.getJfchooser().getSelectedFile(); if(f.exists() && listener.getJfchooser().getDialogType() == listener.getJfchooser().SAVE_DIALOG){ int result = JOptionPane.showConfirmDial...
6
public static String generatePossibleMoves() { String list=""; for (int i=0; i<64; i++) { switch (chessBoard[i/8][i%8]) { case "P": list+=Pawn.possiblePawnMoves(i); break; case "R": list+=Rook.possibleRookMoves(i); ...
9
public HashMap<Character, Vehicle> getVehicles() { return vehicles; }
0
public void testMinus_Seconds() { Seconds test2 = Seconds.seconds(2); Seconds test3 = Seconds.seconds(3); Seconds result = test2.minus(test3); assertEquals(2, test2.getSeconds()); assertEquals(3, test3.getSeconds()); assertEquals(-1, result.getSeconds()); ...
1
public void update(int delta) { int index = 0; Object projectileArray[] = projectiles.toArray(); while(index < projectileArray.length) { if(projectileArray[index] instanceof Projectile) { Projectile projectile = (Projectile) projectileArray[index]; ...
6