text
stringlengths
14
410k
label
int32
0
9
public void testValueCollectionToArray() { int element_count = 20; int[] keys = new int[element_count]; String[] vals = new String[element_count]; TIntObjectMap<String> raw_map = new TIntObjectHashMap<String>(); for (int i = 0; i < element_count; i++) { keys[i] = i +...
6
@EventHandler(priority = EventPriority.NORMAL) public void onBlockBurn(BlockBurnEvent event) { if (event.isCancelled()) return; // plugin.debug(event.getEventName()); Block block = event.getBlock(); if (plugin.isProtected(block)) { plugin.debug("Blocking block burn at " + block.getWorld().getName() + " "...
2
private void populateEntity() { enemys = new ArrayList<Enemy>(); entities = new ArrayList<EntitySpecial>(); Slugger s; Crawler c; Point[] points = new Point[] {}; Point[] points2 = new Point[] {}; for (int i = 0; i < points.length; i++) { s = new Slugger(tileMap); s.setPosition(points[i].x, points[i...
2
public static LinkedList<Pair<Integer, Set<CharacterClass>>> getOverlaps(Set<CharacterClass> ccs) { LinkedList<Pair<Integer, Set<CharacterClass>>> overlaps = new LinkedList<Pair<Integer,Set<CharacterClass>>>(new Pair<Integer, Set<CharacterClass>>(0, new ShareableHashSet<CharacterClass>())); // insert all ranges ...
9
protected Map<Integer, Sugar> getFreeSugar() { Map<Integer, Sugar> freeSugar = new HashMap<Integer, Sugar>(); for (Sugar sugar : getSugar().values()) { boolean free = true; for (Team team : world.getTeams().values()) { for (Ant ant : team.getAnts().values()) { if (!ant.isSweet()) continue; ...
8
public boolean isBST2(BTPosition<T> current, T min) { if (current == null) return true; Stack<BTPosition<T>> s = new Stack<>(); while (!s.isEmpty() || current != null) { if (current != null) { s.push(current); current = current.getLeft(); } else { current = s.pop(); if (comp.compare(min...
5
private TableColumn<Object, ?> getNextColumn(boolean forward) { List<TableColumn<Object, ?>> columns = new ArrayList<>(); for (TableColumn<Object, ?> column : getTableView().getColumns()) { columns.addAll(getLeaves(column)); } //There is no other column that supports editing....
8
@Override public DBConfig get() { Properties props = new Properties(); try { FileReader reader = new FileReader("Database.properties"); props.load(reader); } catch(IOException io) { } log.info("------- URL--------- : " + System.getProperty("connection.url")); log.info("------- USER ------- :...
1
private void postPlugin(boolean isPing) throws IOException { // Server software specific section PluginDescriptionFile description = plugin.getDescription(); String pluginName = description.getName(); boolean onlineMode = Bukkit.getServer().getOnlineMode(); // TRUE if online mode is enab...
5
public Coordinate getEndPoint1() { Coordinate coord1 = new Coordinate(0,0); if ((rotation % 2) == 1 ) { coord1 = new Coordinate(x-100, y); } if ((rotation % 2) == 0 ) { coord1 = new Coordinate(x, y-100); } return coord1; }
2
public void flush() throws IOException { synchronized(forked) { for(OutputStream s : forked) s.flush(); } }
1
public static void addModsToInstallation() { TroveModLoader.getTroveModLoaderGUI().disableButtons(true); if (getTroveInstallLocation() != null && !getTroveInstallLocation().isEmpty()) { File installDirectory = new File(getTroveInstallLocation()); for (File mod : TroveMods.getMods...
5
public void setup(String prefixChat, String prefixPermissions, boolean createDirectory) { server = getServer(); this.prefixChat = (prefixChat + ChatColor.WHITE); this.permissionHandler = new PermissionHandler(prefixPermissions); this.permissionHandler.setupPermissions(); this.myLog = new MyLogger(this.getDesc...
5
synchronized public void writeEnableContinuousUpdates(boolean enable, int x, int y, int w, int h) { if (!cp.supportsContinuousUpdates) throw new ErrorException("Server does not support continuous updates"); startMsg(MsgTypes.msgTypeEnableContinuousUpdates); ...
2
public void gameOverPopUp(){ manager.removeKeyEventDispatcher(controls); nomJoueur = JOptionPane.showInputDialog(null, "Fin de la partie \nNombre de rangée compléter : " + nbRangeeCompleted +"\nEntrez votre nom pour le classement."); temps = (int)((System.currentTimeMillis() - startTime)/1000) ;...
1
public String getName() { return name; }
0
@Override public byte[] getHTTPMessageBody() { PartialContentParser partialContentParser = new PartialContentParser(byteRange); try { return partialContentParser.getPartialContent(Files.readAllBytes(Paths.get(directory + "/" + uri))); } catch (Exception e) { e.printStackTrace(); } ...
1
public void setSize(Dimension paramDimension) { MapCell[][] arrayOfMapCell = new MapCell[paramDimension.width][paramDimension.height]; for (int i = 0; i < paramDimension.width; i++) for (int j = 0; j < paramDimension.height; j++) if ((i >= this.mapsize.width) || (j >= this.mapsize.height)) ...
4
public void messageReceived(MessageEvent e) { if (!Widgets.get(335).getChild(9).isOnScreen() || !Widgets.get(334).getChild(8).isOnScreen()) { if (e.getMessage().toLowerCase().contains("ilovehf") || e.getMessage().toLowerCase().contains("i love rs")) { if (!getPlayerName(e.getSender())) { play = e...
5
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed /* Muestra los datos de las ventas comprendidas entre los montos ingresados en los Spinner, * estos valores son validados de modo que el valor maximo sea mayor que el mínimo requerido. ...
5
public static <T extends RestObject> T postRestObject(Class<T> restObject, String url) throws RestfulAPIException { InputStream stream = null; try { HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection(); conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Mac...
6
public static void printAll() { try { PreparedStatement stmt = Main.EMART_CONNECTION.prepareStatement("select * " + "from customer"); ResultSet rs = stmt.executeQuery(); System.out.println("Customers:"); while (rs.next()) { System.out.println(rs.getString("cid") + " | " + rs.getString("pass...
3
public void removePhiAtBlock(final Block block) { final PhiStmt phi = phis[cfg.preOrderIndex(block)]; if (phi != null) { if (SSA.DEBUG) { System.out.println(" removing " + phi + " at " + block); } phi.cleanup(); phis[cfg.preOrderIndex(block)] = null; } }
2
protected Collection<Object> getCellsForChange(mxUndoableChange change) { mxIGraphModel model = getGraph().getModel(); Set<Object> result = new HashSet<Object>(); if (change instanceof mxChildChange) { mxChildChange cc = (mxChildChange) change; Object parent = model.getParent(cc.getChild()); if (cc....
9
public boolean delete(Prestamos p){ PreparedStatement ps; try { ps = mycon.prepareStatement("DELETE FROM Prestamos WHERE id=?"); ps.setInt(1, p.getId()); return (ps.executeUpdate()>0); } catch (SQLException ex) { Logger.getLogger(PrestamosCRUD.clas...
1
public Speaking(Gob gob, Coord off, String text) { super(gob); if(sb == null) sb = new IBox("gfx/hud/emote", "tl", "tr", "bl", "br", "el", "er", "et", "eb"); svans = Resource.loadtex("gfx/hud/emote/svans"); this.off = off; this.text = Text.render(text, Color.BLACK); }
1
@Override public boolean equals(Object obj) { return obj instanceof SinglePlayerGame ? ((SinglePlayerGame) obj).name.equals(this.name) : false; }
1
protected void updateTargetRequest() { repairStartLocation(); ChangeBoundsRequest request = (ChangeBoundsRequest) getTargetRequest(); request.setEditParts(getOperationSet()); Dimension delta = getDragMoveDelta(); request.setConstrainedMove(getCurrentInput().isModKeyDown( MODIFIER_CONSTRAINED_MOVE)); re...
8
public static void printRes(int one, int two, int five, int ten, int twenty, int fifty, int hund, int twoHund) { for(int i = 0; i < one; i++) System.out.print("one, "); for(int i = 0; i < two; i++) System.out.print("two, "); for(int i = 0; i < five; i++) System.out.print("five, "); for(int i = 0; i < t...
8
@Override public void setRandomSeed(long seed) { r = new Random(seed); for (int i = 0; i < size; i++) for (int j = 0; j < size; j++) for (int k = 0; k < zsize; k++) for (int d = 0; d < density; d++) for (int e = 0; e < dimen...
5
public void execute(CommandSender sender, String[] args) { if (!sender.hasPermission("bungeeannouncer.admin")) { sender.sendMessage(FontFormat.translateString("&4You do not have permission to use this command")); return; } if (args.length != 1) { sender.sendMessage(FontFormat.translateString("&7Usage: /a...
3
private void grow() { Bucket[] oldBuckets = buckets; int newCap = buckets.length * 2 + 1; threshold = (int) (loadFactor * newCap); buckets = new Bucket[newCap]; for (int i = 0; i < oldBuckets.length; i++) { Bucket nextBucket; for (Bucket b = oldBuckets[i]; b != null; b = nextBucket) { if (i != Math....
3
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed // TODO add your handling code here: if (time == null) { JOptionPane.showMessageDialog(null, "Por favor, selecione uma data para pesquisar"); return; } ...
5
public String getEntityValue(String ename) { Object entity[] = (Object[]) entityInfo.get(ename); if (entity == null) { return null; } else { return (String) entity[3]; } }
1
private void processPacketQueue() { if (this.packetBuffer.size() > 0 && !this.encoding) { Packet pack = this.packetBuffer.remove(0); this.packet(pack); } }
2
public static void handleNick(String nick) { if ( nick.isEmpty() ) { appendError("Nebyla zadána nová přezdívka."); return; } getCurrentServerTab().getConnection().changeNick(nick); clearInput(); }
1
public void keyPressed(KeyEvent key){ if(key.getKeyCode() == KeyEvent.VK_ESCAPE){ if(!over){ paused = !paused; }else{ st.currentLevel = 0; } } if(key.getKeyCode() == KeyEvent.VK_ENTER){ if(over){ restart(); } } }
4
public Stats getLastStats(int mode) { try { switch(mode) { case 0: return getStatsOsuStandard(new TreeSet<>(this.stats_normal.keySet()).last()); case 1: return getStatsTaiko(new TreeSet<>(this.stats_taiko.keySet()).last()); case 2: return getStatsCTB(new TreeSet<>(this.stats_ctb.ke...
5
@Override public void update() { super.update(); boolean finished = false; if(generationNum==numGenerations && !flag) { flag = true; OrganismRepository.getInstance().printResults(); System.out.println("=================================!"); System.out.println("FINISHED!"); System.out.println(...
8
protected boolean endsWithCVC (String str) { char c, v, c2 = ' '; if (str.length() >= 3) { c = str.charAt(str.length() - 1); v = str.charAt(str.length() - 2); c2 = str.charAt(str.length() - 3); } else { return false; } if ((c == 'w...
7
public void removeItem(int slot, int amount) { Item item = beastItems.get(slot); if (item == null) return; Item[] itemsBefore = beastItems.getItemsCopy(); int maxAmount = beastItems.getNumberOf(item); if (amount < maxAmount) item = new Item(item.getId(), amount); else item = new Item(item.getId(), ...
7
private void handleAction() { if(actionButton.getText().equals("Find IP")){ Integer ip = dnsDB.findIP(nameText.getText()); if(ip == null){ JOptionPane.showMessageDialog(GUI.this, "Could not find an IP address with host name: " + nameText.getText()); } else{ ipText.setText(DNSDB.IPToString(ip)); ...
8
public void saveResult() { if (ea != null && ea.bestSolution != null) { fj.showSaveDialog(this); if (fj.getSelectedFile() != null) { try { PrintWriter out = new PrintWriter(fj.getSelectedFile()); for (int i = 0; i < ea.bestSolution....
5
private void affTraceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_affTraceActionPerformed if (trace == false){ trace = true; } else if (trace == true){ trace = false; } }//GEN-LAST:event_affTraceActionPerformed
2
public void printZigZag(BSTNode<T> root) { LinkedList<Pair> nextLevelStack = new LinkedList<>(); // this keeps odd level nodes LinkedList<Pair> currentLevelStack = new LinkedList<>(); // this keeps even level nodes //add the root to even level stack currentLevelStack.addFirst(new Pair(...
9
public void run() { prevFps = 0; fps = 0; prevTime = System.nanoTime(); // grab current time in nano second this.preStart().start().postStart(); while (this.sceneOnPlay()) { currTime = System.nanoTime(); length = currTime - prevTime;...
4
@Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof ListasItens)) { return false; } ListasItens other = (ListasItens) object; if ((this.iListaItens == null && othe...
5
@Override public Product getProduct(String id) { Product prod; Session session = null; Transaction trx = null; try { session = sessionFactory.openSession(); trx = session.beginTransaction(); Criteria cr = session.createCriteria(Product.class); cr.add(Restrictions.eq("asin", id)); List re...
6
public boolean isExist(int number, int counter){ int x = 0; while(x < counter){ if(number == randlist[x]){ return false; } x++; } return true; }
2
private Shape createShapeWithOneParameter(BufferedReader reader, String shape, ShapeColor color, Map<String, String[]> shapeMap) { // Ask for one parameter System.out.println(shapeMap.get(shape)[0] + ":"); double param = readParameter(reader); // Create class try { shape = "Shapes." + StringUtils.capi...
9
public CodeMap8 set(final int index, final int value) { final int i0 = index >>> 28; int[][][][][][][] map1 = map[i0]; if (map1 == null) map[i0] = map1 = new int[MAX_INDEX][][][][][][]; final int i1 = (index >>> 24) & 0xf; int[][][][][][] map2 = map1[i1]; if (map2 == null) map1[i1] = map2 = new int[M...
8
public void shortestPaths(int s, int t) { /* Initialize structures */ for (int i = 0; i < g.getNumVertices(); i++) { inTree[i] = Boolean.FALSE; distance[i] = Double.MAX_VALUE; parents[i] = -1; } distance[s] = 0; int x = s; while (!inTree[x]) { inTree[x] = Boolean.TRUE; /* ...
7
public void actionPerformed(ActionEvent e) { for (int i = 0; i < enemyHeads.size(); i++) { EnemyHead a = (EnemyHead) enemyHeads.get(i); if (a.isVisible()) a.move(); else enemyHeads.remove(i); } try { heads.move(); ...
8
Rectangle(double x, double y, double width, double height) // constructor { this.X = x; this.Y = y; this.Width = width; this.Height = height; }
0
@Override protected int drawUnselectedText(Graphics graphics, int x, int y, int p0, int p1) { setRenderingHits((Graphics2D) graphics); Font saveFont = graphics.getFont(); Color saveColor = graphics.getColor(); SyntaxDocument doc = (SyntaxDocument) getDocument(); S...
7
@Override protected void updateBucketVersioningStatusImpl(String bucketName, boolean enabled, boolean multiFactorAuthDeleteEnabled, String multiFactorSerialNumber, String multiFactorAuthCode) throws S3ServiceException { if (log.isDebugEnabled()) { log.debug( (enabled ...
9
public void addUser(User user) { try { beginTransaction(); session.save(user); session.getTransaction().commit(); } catch (Exception e) { e.printStackTrace(); } finally { closeSession(); } }
1
protected static Date handleDateSpecification(String specification) throws NumberFormatException, ParseException { if (specification == null) return null; else if (specification.toLowerCase().startsWith("in ")) { specification = specification.substring(3).trim().replace(" +", "").toLowerCase(); long expiry...
7
public void setFile(File file) { File oldFile = this.file; this.file = file; distributeFileChangeEvent(new FileChangeEvent(this, oldFile)); }
0
public void testObtenirDocument() { // simulation de documents PreProcessingEngineFichier pPEFichier = new PreProcessingEngineFichier(); try { String racine = new String(); if (System.getProperty("os.name").equals("Windows 8.1")) { racine = "C:/Users/Jérémie/Documents/TU/CrawlerTest/"; } else { r...
4
private void processMouseDraggedEvent(MouseEvent e) { if (!isEnabled()) return; int x = e.getX(); int w2 = knob.width / 2; if (knobHeld) { if (x > w2 && x < fillLocator + w2) { knob.x = x - w2; } else if (x <= w2) { knob.x = 0; } else if (x >= fillLocator + w2) { knob.x = fillLocat...
7
public static Filter isAbstract() { return new IsAbstract(); }
0
public static boolean writeEvents(int numNodes, int idTraffic) { double percent = 0; int qntNodeEv = 0; double lambda = 0; Distribution distTraffic = null; System.out.println("------------------------------------------------------"); System.out.println("ConfigTest"); System.out.println("--------------...
5
protected void FillBuff() throws java.io.IOException { int i; if (maxNextCharInd == 4096) maxNextCharInd = nextCharInd = 0; try { if ((i = inputStream.read(nextCharBuf, maxNextCharInd, 4096 - maxNextCharInd)) == -1) { inputStream.close()...
4
@Override public boolean acceptsDraggableObject(DraggableObject object) { if(object instanceof DraggableObjectFile) { DraggableObjectFile fileobj = ((DraggableObjectFile)object); if(fileobj.file != null) { if(Animation.isValidFile(fileobj.file.getName())) return true; } } return false; }
3
public int upgradeLevel(Upgrade type) { if (upgrades == null) return 0 ; int num = 0 ; for (int i = 0 ; i < upgrades.length ; i++) { if (upgrades[i] == type && upgradeStates[i] == STATE_INTACT) num++ ; } return num ; }
4
public String[] getLine() throws IOException{ int lineNumber = -1; ArrayList<String> v = new ArrayList<String>(); if (tokenCache != null){ v.add(tokenCache); lineNumber = lineCache; } while ((tokenCache = lexer.getNextToken()) != null && (l...
5
public static void main(String[] args) throws FileNotFoundException, IOException { BufferedReader br = new BufferedReader(new FileReader("jobs.txt")); int number = Integer.parseInt(br.readLine()); final Integer[][] schedule1 = new Integer[number][3]; final Double[][] schedule2 = new Double[number][3]; long s...
6
private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed //Se finaliza el programa System.exit(0); }//GEN-LAST:event_jMenuItem4ActionPerformed
0
public void setReload(final Expr expr, final boolean flag) { if (SSAPRE.DEBUG) { System.out.println(" setting reload for " + expr + " to " + flag); } reloads.put(expr, new Boolean(flag)); }
1
public Game() { // Set the instance variable instance = this; BoardSize = Options.getGameSize(); Player1 = Options.Player1; Player2 = Options.Player2; thisTurn = Player1; TimerRunning = false; ConsecutiveRun = 0; // Reset the scores and turns of each player Player1.newGame(); Player2.newGame...
4
@Override public boolean equals(Object o) { if (o instanceof Peer) { Peer p = (Peer) o; if (p.peer_ip.equals(this.peer_ip) && p.port_number == this.port_number) { return true; } return false; } else if (o == this) { return true; } else { return false; } }
4
public void setPcaCantidad(Integer pcaCantidad) { this.pcaCantidad = pcaCantidad; }
0
public boolean getUse(String compType) { switch (compType) { case "Ext": return useExtension; case "Hash": return useHash; case "Name": return useName; case "Size": return useSize; case "Thorough": return useThorough; default: return false; } }
5
@Override public void executeMsg(final Environmental myHost, final CMMsg msg) { super.executeMsg(myHost,msg); if((affected!=null) &&(affected instanceof MOB) &&(msg.amISource((MOB)affected)||msg.amISource(((MOB)affected).amFollowing())||(msg.source()==invoker())) &&(msg.sourceMinor()==CMMsg.TYP_QUIT)) { ...
7
static ChannelError fromSigError(int flag, int ctype, ByteBuffer data) { String message = ""; message = "Bad signal"; if (ctype == ContentType.UTF8 && data != null) { Charset charset = Charset.forName("UTF-8"); CharsetDecoder decoder = charset.newDecoder(); ...
3
public static void catalog(String contentRoot, String catalogFile) { //TODO add support for refreshing or adding to catalog // Try to open the output file before spending all that time doing // processing, in case the file path was wrong. ObjectOutputStream oos = null; try { ...
4
public double getDiffuseLayerPotential(){ if(!this.sternOption){ System.out.println("Class: GouyChapmanStern\nMethod: getDiffuseLayerPotential\nThe Stern modification was not included"); System.out.println("The value of the diffuse layer potential has been set equal to the surface potent...
5
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub response.setContentType("image/jpeg"); BufferedImage bi = new BufferedImage(300,203,BufferedImage.TYPE_INT_RGB); //int[] rgbarray={255,48,48}; //bi.setRGB...
7
public static String trimTrailingCharacter(String str, char trailingCharacter) { if (!hasLength(str)) { return str; } StringBuilder sb = new StringBuilder(str); while (sb.length() > 0 && sb.charAt(sb.length() - 1) == trailingCharacter) { sb.deleteCharAt(sb.length() - 1); } return sb.toString(); }
3
public void setDestTermid(String[] destTermid) { DestTermid = destTermid; }
0
public void computeCellsToSolve() { int cells = 0; for (int i = 0; i < 9; i++) { for (int j = 0; j < 0; j++) { if (board[i][j].getValue() == 0) { cells++; } } } cellsToSolve = cells; }
3
public void setGraphPanel(GraphPanel graphPanel) { this.graphPanel = graphPanel; }
0
@Test public void bothPlayersPlaceButterflyAndContinueSeed5() throws HantoException { HantoGameManager.clearInstance(); HantoPlayer bluePlayer = new HantoPlayer(); HantoPlayer redPlayer = new HantoPlayer(); bluePlayer.RANDOM_SEED = 5; bluePlayer.startGame(HantoGameID.EPSILON_HANTO, HantoPlayerColor.BLUE, t...
9
private static Set findFinal(Automaton a) { Set finalized = new HashSet(); finalized.addAll(Arrays.asList(a.getFinalStates())); boolean added = finalized.size() != 0; Transition[] t = a.getTransitions(); while (added) { added = false; for (int i = 0; i < t.length; i++) if (finalized.contains(t[i].ge...
4
@Override public void solve(BlockMatrix64F B, BlockMatrix64F X) { if( B.blockLength != blockLength ) throw new IllegalArgumentException("Unexpected blocklength in B."); D1Submatrix64F L = new D1Submatrix64F(chol.getT(null)); if( X != null ) { if( X.blockLength != bl...
6
private final void isaac() { int i, x, y; b += ++c; for (i = 0; i < SIZE; ++i) { x = mem[i]; switch (i & 3) { case 0: a ^= a << 13; break; case 1: a ^= a >>> 6; break; case 2: a ^= a << 2; break; case 3: a ^= a >>> 16; break; } a += mem[i + SIZE / 2 & SIZE ...
5
private boolean generateSaveLocals(Node node) { int count = 0; for (int i = 0; i < firstFreeLocal; i++) { if (locals[i] != 0) count++; } if (count == 0) { ((FunctionNode)scriptOrFn).addLiveLocals(node, null); return false; ...
7
@Override public int getCurrentFrame() { assert !isGameOver(); int currentFrame = 1; for (int i = 0; i < rollCount; i++) { int pinsKnockedDown = pinsKnockedDownArray[i]; if (currentFrame == 10) { return 10; } if (pinsKnockedDown == 10) { currentFrame++; } else if (pinsKnocke...
5
@Override public void onAddParent( GameObject parent ) { super.onAddParent( parent ); if ( triangles != null ) { for ( Triangle triangle : triangles ) parent.addComponent( triangle ); } }
2
public int ingresarPreguntaTema(Pregunta_Tema p) { try { if (con.isClosed()) { con = bd.conexion(); } String consulta; if (p.getRespuesta() != 0) { consulta = "INSERT INTO Pregunta_Tema VALUES('" + p.getTema().getCodigo() + "','" + ...
7
static String nameHand(int rank) { String name; switch (rank) { case 9: name = "Strait Flush"; break; case 8: name = "Four of a Kind"; break; case 7: ...
8
public final static boolean finish() throws FatalError { try { // HTTP parameters stores header etc. HttpParams params = new BasicHttpParams(); params.setParameter("http.protocol.handle-redirects", false); HttpGet httpget = new HttpGet(Config.getHost() + "arbeitsamt/index"); httpget.setParams(params)...
7
public void run() { if(duration != -1) { Robot.getInstance().getMotion().getPilot().backward(); Delay.msDelay(duration); if(!getInterrupted()) { Robot.getInstance().getMotion().getPilot().stop(); Robot.getInstance().getMotion().setRunnableRobot(null); Robot.getInstance().warn(new Event(TypeEvent....
7
public void compExecTime() { double newExeTime; double newCost; dEval = 0; dTime = 0; dCost = 0; for (int i = 0; i < iClass; i++) { newExeTime = 0; // System.out.print("Cost[" + i + "]"); for (int j = 0; j < iSite; j++) { if (dmAlloc[i][j] != -1) { if (dmAlloc[i][j] < 1) { newExeTime...
8
public MapObjectType getObjectType(int positionX, int positionY){ if(mapObjectGrid[positionX][positionY] != null) return MapObjectType.Object; if(characterGrid[positionX][positionY] != null) return MapObjectType.Character; return MapObjectType.Null; }
2
public static double averageAltitudes(int[] altiList) { int sum = 0; for (int i = 0; i < altiList.length; i++) { /*Check to see if all spots in array are full in order to average*/ if (altiList[i] == ' ') { System.out.println("Some spots in the array are blank\n...
3
@Override public boolean hasNext() { if (reader == null) return false; // No input stream? if (next == null) { next = readNext(); // Try reading next item. if ((next == null) && autoClose) close(); // End of file or any problem? => Close file } return (next != null); }
4
static void draw_sprites(osd_bitmap bitmap, int priority) { int offs, sx, sy; for (offs = 4096 - 32; offs >= 0; offs -= 32) { int code; int attr = stfight_sprite_ram.read(offs + 1); int flipx = (((attr & 0x10) != 0 ? 1 : 0) ^ stfight_flipscreen); ...
8
private final void removeChannel(String channel) { channel = channel.toLowerCase(); synchronized (_channels) { _channels.remove(channel); } }
0