text
stringlengths
14
410k
label
int32
0
9
public void run() { // Used to assign each error an id so an error tree structure can be // constructed. int errorIdCounter = 0; while (true) { try { // Read from dump file to point array String dumpData = dReader.readDumpFile(); if (dumpData != null) { JSExecutionTracer.addPoint(dumpData);...
9
private void parseSimpleFace(String[] tokens, MeshData md, ScanData sd) { short[] indices = new short[tokens.length-1]; for(int i = 1; i < tokens.length; i++) indices[i-1] = (short) (Short.parseShort(tokens[i])-1); if(computeNormals) { // First we compute the normal float[] normal = {0,0,0}; fl...
9
public void setEditedBlock(JBlock b) { if(b==editing) return ; if(editing!=null) finnishEdit(); editing=(startBlock)b; fields.clear(); fieldsPane.removeAll(); name.setText(editing.name); silent.setSelected(editing.silent); displayName.setSelect...
5
public void testProviderSecurity() { if (OLD_JDK) { return; } try { Policy.setPolicy(RESTRICT); System.setSecurityManager(new SecurityManager()); DateTimeZone.setProvider(new MockOKProvider()); fail(); } catch (SecurityException...
2
public static String itostrx(int hex) { final int BASE = 16; final int ASCII_DIGITS = 48; final int ASCII_LETTERS = 55; final int CUTOFF = 10; String result = ""; do{ int remainder = (hex % BASE); if(remainder >= CUTOFF){// If it is a letter result = (char) (remainder + ASCII_LETTERS) + result; ...
2
public static void shootProjectile(String projectileName, Screen screen, int ref, TimeManager currentTime, int dist, Point shooterPosition) { if (projectileName.equals(ProjectileNames.CANNISTER_SHOT)) { Projectile canisterShot = new CanisterShot(screen, ref, currentTime); canisterShot.shoot(dist, shoot...
8
public static void install() { if (installed == null) { installed = new RepeatingReleasedEventsFixer(); Toolkit.getDefaultToolkit().addAWTEventListener(installed, AWTEvent.KEY_EVENT_MASK); } }
1
public static Rule_COMMA parse(ParserContext context) { context.push("COMMA"); boolean parsed = true; int s0 = context.index; ArrayList<Rule> e0 = new ArrayList<Rule>(); Rule rule; parsed = false; if (!parsed) { { ArrayList<Rule> e1 = new ArrayList<Rule>(); int ...
7
@Override public void run() { while (true) { if (shutdown) { if (this.id % 10 == 0) // every 10th thread logger.info("Thread #" + this.id + " increased the counter " + this.sum + "-times"); else logger.info("Thread #" + this.id + " summed up to " + this.sum); return; } if (st...
5
@Override public Object execute(Scope scope, Statement tokens) { Method method = null; Object[] args = new Object[tokens.size()]; for (int i = 0 ; i < args.length;++i){ try { args[i] = scope.getValue(tokens.get(i)); } catch (PoslException e) { // TODO Auto-generated catch block e.printStackTr...
7
private Float averageMarketChange(float[] changes) { float sum = 0; float valid = 0; for (float f : changes) { if (f == f) { sum += f; valid++; } } // System.out.println("SUMMING GIVES : " + sum); return sum / valid; }
2
public List<BatchResult> doFlushStatements(boolean isRollback) throws SQLException { try { if (isRollback) { return Collections.emptyList(); } else { return executeStatements(); } } finally { for (StatementData stmt : statem...
4
@Override public boolean onCommand(final CommandSender sender,final Command command,final String label,final String[] args) { if (args.length <= 1) { return false; } final OfflinePlayer player = this.plugin.getServer().getOfflinePlayer(args[0]); if (player == null) { ...
6
private void createFiles(File path, File rel) throws DBException { if (path.isDirectory()) { for (String name : path.list()) createFiles(new File(path, name), new File(rel, name)); } if (null != rel && !path.isDirectory()) { NodeNameDTO node = nameDAO.find(rel, false); if (null == n...
7
public static String modUtente(HttpServletRequest req) { HttpSession s = req.getSession(); UserBean user = (UserBean) s.getAttribute("user"); String username = user.getUsername(); try { Utente u = Model.getUtente(username); switch (u.getPermission()) { ...
9
private void addTable() { tableModel = new DefaultTableModel(new String[] { "nazwa", "punkty", "czas zakończenia" }, 0); table = new JTable(tableModel); table.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 1) { JTable target = (JTable) e....
1
public String getEventName() { return eventName; }
0
static GateType getTypeFromString(String type) { if (type.toUpperCase().trim().equals("AND")) return AND; else if (type.toUpperCase().trim().equals("OR")) return OR; else if (type.toUpperCase().trim().equals("NOT")) return NOT; else if (type.toUpperCase().trim().equals("NAND")) return NAND; else ...
9
public void setProtocol(FileProtocol protocol) { this.protocol = protocol; setText(protocol.getName()); }
0
@Override public Class<?> getColumnClass(int columnIndex) { switch(columnIndex){ case 0: return String.class; case 1: return String.class; case 2: return Double.class; case 3: return Component.class; default: return Object.class; } }
5
void createTabList(Composite parent) { tabList = new Tree(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); Arrays.sort(tabs, new Comparator() { public int compare(Object tab0, Object tab1) { return ((GraphicsTab)tab0).getText().compareTo(((GraphicsTab)tab1).getText()); } }); HashSet set = new ...
7
public void resetStatus() { if (map.isEmpty()) return; synchronized (map) { for (ModelCanvas mc : map.values()) { if (!mc.isUsed()) continue; final MDContainer c = mc.getMdContainer(); c.getModel().stop(); c.getModel().clearMouseScripts(); c.getModel().clearKeyScripts(); mc.setUse...
8
public void step(SimulationComponent mComp) { String tLine = lineList.get(ticks); tick(); Pattern tPat1 = Pattern.compile("\\s*print\\s*\"(.*)\".*"); Matcher tM1 = tPat1.matcher(tLine); if(tM1.matches()) { mComp.addStatusMessage(name + " output : " + tM1.group(1)); } else { mComp.add...
5
private void btnConsultarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConsultarActionPerformed // TODO add your handling code here: try { //Para establecer el modelo al JTable DefaultTableModel modelo = new DefaultTableModel(); this.Jtable.setModel(...
4
public double Caldj(int iy, int im, int id) throws palError { int ny; double d = 0.0; TRACE("Caldj"); /* Default century if appropriate */ if ((iy >= 0) && (iy <= 49)) { ny = iy + 2000; } else if ((iy >= 50) && (iy <= 99)) { ny = iy + 1900; ...
5
@Override public boolean okMessage(final Environmental myHost, final CMMsg msg) { if(!super.okMessage(myHost,msg)) return false; if(!(affected instanceof MOB)) return true; if((msg.source()==affected) &&(msg.targetMinor()==CMMsg.TYP_DAMAGE) &&(msg.target() instanceof MOB) &&(msg.source().getWorshi...
8
public double operar(){ double a,b, resultado = 0; String operacion; while(miPila.size()>2){ a = Double.parseDouble(miPila.pop()+""); b = Double.parseDouble(miPila.pop()+""); operacion = miPila.pop()+""; ...
5
@Test(expected = UnsupportedOperationException.class) public void test() throws IOException { pq = new PacketQueue(); cl = new ConnectionListener(Settings.getPortNumber(), "", pq); Thread simserver = new Thread(new Runnable() { @Override public void run() { ...
4
public static void main(String[] args) throws SQLException { //RequetesPays pp= new RequetesPays(); pays ok // RequetesPays.ecrirePays("ALLEMAGNE"); // VuePays vtest= new VuePays(); // vtest.setVisible(true); //Pays ll= RequetesPays.paysId(2); /...
1
@Override public void undoableEditHappened(UndoableEditEvent undoableEditEvent) { UndoableEdit edit = undoableEditEvent.getEdit(); // Make sure this event is a document event if (edit instanceof DefaultDocumentEvent) { // Get the event type DefaultDocumentEvent event = (DefaultDocumentEvent) edit; Even...
8
protected Term extractTerm(String fis) { String line = ""; for (char c : fis.toCharArray()) { if (!(c == '[' || c == ']')) { line += c; } } List<String> nameTerm = Op.split(line, ":"); if (nameTerm.size() != 2) { throw new Runt...
6
public IEvaluableToken parse() { try { // 1. Extract all parentheses into TokenLists extractParentheses(); // 2. Convert operator tokens to operators, including their arguments // in the correct order ^ * / + - extractOperator(TokenOperatorFactorial.class); extractOperator(TokenOperatorPower.cl...
8
public void merge(int A[], int m, int B[], int n) { if (m<=0&&n<=0){ return; } int index = m+n-1; while(m!=0&&n!=0){ if(A[m-1]>B[n-1]){ A[index]=A[m-1]; m--; } else { A[index]=B[n-1]; ...
7
public ArrayList<Auction> searchWinnerByBoth(String keyword, String username, String winner) { try { ArrayList<Auction> auctions = new ArrayList<Auction>(); String[] keywords = keyword.split(" "); String[] usernames = username.split(" "); String[] winners = winner.split(" "); String sql = "select * ...
9
private Operator findO(I I, ArrayList<O> Oids){ for(O O:Oids){ if(O.id.equals(I.id)){ return O; } } Operator curr = I.next; while(curr != null){ if(curr.type == Operator.Type.O && I.id.equals(curr.id)){ ...
5
/** @param column The source column being dragged. */ protected void setSourceDragColumn(Column column) { if (mSourceDragColumn != null) { repaintColumn(mSourceDragColumn); } mSourceDragColumn = column; if (mSourceDragColumn != null) { repaintColumn(mSourceDragColumn); } }
2
public void updateRightClick(int cellPosX, int cellPosY) { if (!(cells[cellPosX][cellPosY].getIsRevealed())) { cells[cellPosX][cellPosY].setCellState(); if (cells[cellPosX][cellPosY].getCellState() == 1) { for (GameEventHandler gameEvent : gameEventList) { gameEvent.buttonUpdate(cellPosX, cellPosY, Bu...
7
private JSONWriter append(String string) throws JSONException { if (string == null) { throw new JSONException("Null pointer"); } if (this.mode == 'o' || this.mode == 'a') { try { if (this.comma && this.mode == 'a') { this.writer.write('...
7
* The plant that the creature is interested in * @param amount * The amount of energy that the creature is interested in * @return true, if the creature is happy to make a partnership, else false */ protected synchronized boolean requestCompanionship(IntelCreature creature,...
6
@Override public Room modifyRoom(MOB mob, Room R, int showFlag) throws IOException { if((showFlag == -1) && (CMProps.getIntVar(CMProps.Int.EDITORTYPE)>0)) showFlag=-999; boolean ok=false; while(!ok) { int showNumber=0; R=genRoomType(mob,R,++showNumber,showFlag); genDisplayText(mob,R,++showNumber,s...
9
public void setAcceptByFinalState(boolean t) { turingAcceptByFinalState = t; turingAcceptByFinalStateCheckBox.setSelected(t); }
0
public InputStream getInputStream() throws IOException { if( !this.isOpen() ) throw new IOException( "Cannot retrieve resource's input stream. Resouce was not yet opened." ); if( this.readLimitInputStream == null ) { if( this.contentRange.getLastBytePosition() >= this.getCoreResource().getLength() ) t...
4
private void initGenome(StateObservation stateObs) { genome = new int[N_ACTIONS][POPULATION_SIZE][SIMULATION_DEPTH]; // Randomize initial genome for (int i = 0; i < genome.length; i++) { for (int j = 0; j < genome[i].length; j++) { for (int k = 0; k < genome[i][j]....
3
public IllegalOrphanException(List<String> messages) { super((messages != null && messages.size() > 0 ? messages.get(0) : null)); if (messages == null) { this.messages = new ArrayList<String>(); } else { this.messages = messages; } }
3
protected Size2D arrangeNN(BlockContainer container, Graphics2D g2) { double x = 0.0; double width = 0.0; double maxHeight = 0.0; List blocks = container.getBlocks(); int blockCount = blocks.size(); if (blockCount > 0) { Size2D[] sizes = new Size2D[blocks.size...
7
public BEValue toBEValue() throws UnsupportedEncodingException { Map<String, BEValue> peer = new HashMap<String, BEValue>(); if (this.hasPeerId()) { peer.put("peer id", new BEValue(this.getPeerId().array())); } peer.put("ip", new BEValue(this.getIp(), Torrent.BYTE_ENCODING)); peer.put("port", new BEValue(t...
1
private boolean arePiecesBetweenSourceAndTarget(int sourceRow, int sourceColumn, int targetRow, int targetColumn, int rowIncrementPerStep, int columnIncrementPerStep) { int currentRow = sourceRow + rowIncrementPerStep; int currentColumn = sourceColumn + columnIncrementPerStep; while...
8
public void find(Course[][] courses) { System.out.print("Enter Department: "); String dept = scan.next(); dept = dept.toUpperCase(); System.out.print("Enter Course Number: "); int courseNum = scan.nextInt(); boolean found = false; for(int x = 0; x < courses.length; x++) { for(int y = 0; y < cours...
6
public static void nouvellePartie() { if (fenetreNouvellePartie != null) { fenetreNouvellePartie.dispose(); } fenetreNouvellePartie = new WindowNouvellePartie(); if (fenetrePrincipale != null) { fenetrePrincipale.dispose(); } }
2
private void btnAbrirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAbrirActionPerformed //Se le asigna lo que hay en la caja de texto a nombre String nombre = String.valueOf(txtNombreArchivo.getText()); //Se crea un objeto General g = new General(); String...
3
protected void checkCommand(String command) { if (command == null) throw new IllegalArgumentException("ERR00403012b"); if (!drinkPattern.matcher(command).matches()) { Out.infoLn("Processing command: '%1$s' ...", command); Processing.process("Sending mail", 1000); ...
2
public void setSpawnEye(World world, Location location){ if (customConfigurationFile == null) { customConfigurationFile = new File(plugin.getDataFolder(), "spawn.yml"); } customConfig = YamlConfiguration.loadConfiguration(customConfigurationFile); String worldName = world.getName(); for (String worldN : plugin...
7
@Override public boolean activate() { return (Players.getLocal().isMoving() && !Constants.BEAR_AREA.contains(Players.getLocal()) && !Constants.ESCAPE_AREA.contains(Players.getLocal())); }
2
public SetTranslationInfoResult genLoad() { checkPermission(viewerId); HashoutListToJson hashoutListToJson = new HashoutListToJson(); List<EntityJson> jsons = hashoutListToJson.loadEntities(HashoutList.INTL_MESSAGES_CURRENT.getId().getKey()); Map<String, List<EntityJson>> nameToJson = new HashMap<String...
6
private void loadConfig( String filename ) { try{ File file = new File(filename); BufferedReader br = new BufferedReader(new FileReader(file)); String str; while((str = br.readLine()) != null) { if( str != null ) { String item[] = str.split(":"); if( item[0].equals( "port" ) ) ...
8
public Vision() { _setDistance(0); }
0
public DWT() { }
0
public void executeSequence(MoveSequence sequence) { for (MovementAction action : sequence) { switch (action) { case Forward: forward(); break; case TurnLeft90: turnLeft90(); break; case TurnLeft45: ...
6
private void sendMsg(TsapiRequest req, CSTAPrivate priv) throws IOException { synchronized (this.out) { IntelByteArrayOutputStream acBlock = new IntelByteArrayOutputStream( 18); IntelByteArrayOutputStream encodeStream = new IntelByteArrayOutputStream(); IntelByteArrayOutputStream privateData = new Intel...
9
@Override public void spremi(Resource r) { Evictor e = new Izbaci(); File file = new File(m.getNazivSpremista() + "\\" + r.getNaziv()); try { if (m.isKb()) { trenutnaVelicina = m.izracunajVelicinu(); if ((trenutnaVelicina + r.getSadrzaj().toString...
9
public String[] toArray() { return new String [] {String.valueOf(points), endTime==null?" ":endTime.toString()} ; }
1
public static void createImages() { String pokemonType; char a; URL url; for (int i = 0; i < pokedexImg.length; i++) { pokemonType = getSpecies(i+1).toString(); if(pokemonType.equalsIgnoreCase("Mr_Mime")) pokemonType="Mr_Mime"; else if(pokemonType.equalsIgnoreCase("Nidoran_M")...
4
public void moveCannonBalls(){ // Move the cannonballs for(int i=0; i<cannons.size(); i++){ CannonBall cannon = cannons.get(i); if(cannon.getDone()){ try { // Makes the "splashed" cannonball appear longer Thread.sleep(10); ...
3
@RequestMapping(value = {"search", "s"}) @ResponseBody public Map search( @RequestParam int page, @RequestParam(value = "limit") int pageSize, @RequestParam(required = false, defaultValue = "0") int gradeId, @RequestParam(required = false, defaultValue = "0") int ...
4
protected void evalDefinitions(String[] command) { Matcher matcher; boolean isStatic = false; for (String ci : command) { ci = ci.trim(); if (ci.equals("")) continue; if (ci.toLowerCase().startsWith("static")) { ci = ci.substring(6).trim(); isStatic = true; } else { isStatic = false...
9
@Override public boolean equals(Object o) { if(o == null) { return false; } if(o == this) { return true; } if(!(o instanceof Pixel)) { return false; } Pixel other = (Pixel) o; return (...
4
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); InterfaceDepartamento aO = new DepartamentoDAO(); De...
9
public TestInstanceInfo getTestInstance(long testInstanceId) throws Exception { TestInstanceInfo testInstance = null; QcRequest qcRequest = new QcRequest(QcConstants.QC_ENDPOINT_URL + "/test-instance/" + testInstanceId); try { XMLConfiguration testInstanceData = restCl...
1
@Override public PermissionType getType() { return PermissionType.RCON; }
0
public void healPokemonNoPrompt() { for (Pokemon aPartyPokemon : partyPokemon) { if (aPartyPokemon != null) { aPartyPokemon.health = aPartyPokemon.healthMax; aPartyPokemon.status = Pokemon.Status.OK; aPartyPokemon.substatus = Pokemon.Substatus.OK; ...
2
public void run() { try { sourceDataLine.open(audioFormat); sourceDataLine.start(); int cnt; // Keep looping until the input read method // returns -1 for empty stream or the // user clicks the Stop button causing // stopPlayback to switch from false to // true. while ((cnt = aud...
4
private byte[] decrypt(final byte[] encryptedResponse) throws IOException { // if (DISPLAY_APDU) { // System.out.println("CIPHERTEXT RESPONSE APDU:"); // System.out.println("yo: " + Integer.toHexString(encryptedResponse[0] & 0xFF)); // for (int i = 0; i < en...
9
public Position getNodeAhead(Position position, int angle){ Position _pos = null; if(angle >= 360){ angle -= 360; } if(angle < 0){ angle += 360; } switch(angle){ case 0: _pos = new Position(position.getX(), position.getY() - 1); break; case 90: _pos = new Position(position.getX() + ...
6
private void createControlPanel(){ controlPanel = new JPanel(); final JButton startButton = new JButton("start"); final JButton stopButton = new JButton("stop"); stopButton.setEnabled(false); final JButton pauseButton = new JButton("pause"); pauseButton.setEnabled(false)...
3
public String getParsedFormat() { String formatted = ""; for(String str : format.split(" ")) if(!str.isEmpty() && !str.equalsIgnoreCase("...")) formatted = formatted + " " + str.substring(1, str.length()); else formatted = formatted + " " + str; return formatted; }
3
public static void main(String[] args) { Scanner scan = new Scanner(System.in); Integer rowNumber = Integer.parseInt(scan.nextLine()); Integer startNumber = scan.nextInt(); scan.nextLine(); boolean hasElement = false; ArrayList<Integer> outputs = new ArrayList<Integer>()...
8
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); g.setColor(Color.WHITE); for (MoveableObject asteroid : field.getAsteroids()) { asteroid.draw(g); } g.setColor(Color.RED); for (MoveableObject bullet : field.getBullets()) { bullet.draw(g); } g.setColor(Color.GREEN)...
2
@Override public String healthText(MOB viewer, MOB mob) { final double pct=(CMath.div(mob.curState().getHitPoints(),mob.maxState().getHitPoints())); if(pct<.10) return L("^r@x1^r is almost squashed!^N",mob.name(viewer)); else if(pct<.25) return L("^y@x1^y is severely gashed and bruised.^N",mob.name(vie...
7
public static AccessibilityFeatureEnumeration fromValue(String v) { for (AccessibilityFeatureEnumeration c: AccessibilityFeatureEnumeration.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); }
2
@Override public void execute() { System.out.println("Production Dialog is off..... Turning on"); Constants.PRODUCTION_WIDGET.interact("Toggle Production Dialog"); final Timer timeout = new Timer(2000); while(timeout.isRunning() && Settings.get(1173)==1879048192) { Task.sleep(50); } }
2
public static void main(String[] args) { Flyweight flyweight1, flyweight2, flyweight3; FlyweightFactory ff = new FlyweightFactory(); flyweight1 = ff.factory("aaa"); flyweight2 = ff.factory("bbb"); // 如果存在,则不创建新的对象 flyweight3 = ff.factory("aaa"); flyweight1.func(); flyweight2.func(); flyweight3.func(...
0
public static PlayerConfig getPlayerConfig(String name) throws Exception { PlayerConfig config = new PlayerConfig(name); HashMap<String, String> classifiers = new HashMap<String, String>(); HashMap<String, HashMap<String, Boolean>> attributes = new HashMap<String, HashMap<String, Boolean>>(); SAXBuilder bui...
7
private void isLessThanEqualsToInteger(Integer param, Object value) { if (value instanceof Integer) { if (!(param <= (Integer) value)) { throw new IllegalStateException("Integer is not greater than supplied value."); } } else { throw new IllegalArgumentException(); } }
2
private void createItems() { ih = new ItemHandler(); MenuItem info = new MenuItem("(c) UploadR v"+Constants.VERSION +" | shortcuts "+(Constants.KEYS_ENABLED ? "enabled" : "disabled")); info.setEnabled(false); this.add(info); for(byte i=0;i<ItemHandler.items.length;++i) { if(ItemHandler.items[i][0].equal...
3
public static void generateCsvFromList(String fileName, List<Object> elems, Integer rowElems) throws IOException { StringBuffer buffer = new StringBuffer(); if (elems.isEmpty()) { createCsvFile(fileName, buffer.toString()); } else { rowElems = rowElems == null ? 1 : rowElems < 1 ? 1 : rowElems; int el...
7
public static void experimentEcoli3(String[] args) { // insertion of sequence with partly similarity final String ID = args[0]; ExecutorService exec = Executors.newFixedThreadPool(Runtime .getRuntime().availableProcessors()); System.out.println("Start with " + Runtime.getRuntime().availableProcessors() ...
7
private void jLabel3MouseClicked(java.awt.event.MouseEvent evt) { //Set options of all panels for (Component p : getParent().getComponents()) { if(p instanceof AbleToGetOptions) { ((AbleToGetOptions) p).getOptions(); } } CardLayout cl =...
2
public static void checkGlobalConfigYAML() { File config = new File(path + "config.yml"); if(!config.exists()) { try { config.createNewFile(); FileConfiguration c = YamlConfiguration.loadConfiguration(config); c.set("Features.AutoBroadcast.Enabled", false); c.set("Features.AutoSave.Enabled", true...
2
private static double[] getResistPoints(int curvePoints,int lineNumber, double[] highPrices) { double[] rPoints = new double[lineNumber]; for(int i =0;i<lineNumber-1;i++){ double price = 0; for(int j=-curvePoints;j<=0;j++){ if((i+j>=0) && (i+j<lineNumber-1) && hig...
5
private void drawVillagers(int screenX0, int screenY0, Graphics2D gI) { ArrayList<Village> villages = getVillages(); for (Village v : villages) { for (Villager villager : v.getPopulation()) { double vAbsX = villager.getRelativeX()+(v.getX()-screenX0+0.5)*Chunk.lengthOfChunk-0.5, vAbsY = villager.getRel...
2
private void checkStatus(boolean force) { if (isMuted()) { if (status != MicStatus.MUTED || force) { status = MicStatus.MUTED; trayIcon.setImage(mutedIcon); if (guiDisplay) { guiPanel.setBackground(mutedColour); } ...
7
@Override public Iterator<TElement> iterator() { return this._source.iterator(); }
0
@Override public void onEnable() { this.log = getLogger(); saveConfig(); this.world = getConfig().getString("world", "world"); this.ccost = getConfig().getInt("chunk-cost", 0); int id = getConfig().getInt("tool.id", 280); String name = getConfig(...
2
@Override public void addComponent(Component component, LayoutParameter... layoutParameters) { Set<LayoutParameter> asSet = new HashSet<LayoutParameter>(Arrays.asList(layoutParameters)); if(asSet.contains(MAXIMIZES_HORIZONTALLY) && asSet.contains(GROWS_HORIZONTALLY)) throw new IllegalArg...
4
public Pair<Pair<Livraison, PlageHoraire>, NoeudItineraire> supprimerLivraison(Noeud noeudSel) { if(this.testItineraireCharger()){ //Suppression autoris�e Livraison liv = null; for(PlageHoraire ph : this.plagesHoraire){ liv = ph.rechercheLivraison(noeudSel); if(liv != null){ //Livraison supprime...
4
public static boolean isGamemode(String gamemode) { if (gamemode.equalsIgnoreCase("survival") || gamemode.equalsIgnoreCase("0") || gamemode.equalsIgnoreCase("creative") || gamemode.equalsIgnoreCase("1") || gamemode.equalsIgnoreCase("adventure") || gamemode.equalsIgnoreCase("2")) { return true; ...
6
public Piste getPelaajanAlkusijainti() { return pelaajanAlkusijainti; }
0
public void testPlus() { Period base = new Period(1, 2, 3, 4, 5, 6, 7, 8); Period baseDaysOnly = new Period(0, 0, 0, 10, 0, 0, 0, 0, PeriodType.days()); Period test = base.plus((ReadablePeriod) null); assertSame(base, test); test = base.plus(Period.years(10)); ...
3
private Object parseString() throws StreamCorruptedException { int strLen = readLength(); indexPlus(1); // get rid of " Object output; CharBuffer cb = CharBuffer.allocate(strLen); boolean containsZeroChar = false; for (int r = 0; r < strLen; r++) { char ch; try { ch = input.get(); if (ch == '\...
4
private void menuOpenMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_menuOpenMouseClicked // TODO add your handling code here: }//GEN-LAST:event_menuOpenMouseClicked
0