text
stringlengths
14
410k
label
int32
0
9
public ExtDecimal dec() { if (type == Type.NUMBER) { return add(new ExtDecimal(-1)); } else if (type == Type.POSITIVEZERO) { return MINUSONE; } else if (type == Type.NEGATIVEZERO) { return MINUSONE; } else if (type == Type.INFINITY) { retur...
5
public void averge(){ int grade; int totalgrade; int averagegrade = 0; int counter; counter=0; totalgrade=0; grade=0; Scanner s = new Scanner(System.in); System.out.println("Enter the grade or -1 to quit:"); grade=s.nextInt(); while(grade!=-1){ totalgrade=totalgrade+grade; System.out.println...
2
boolean checksum( String sentence, String checksum ) { int cs = 0; for( int i = 0; i < sentence.length(); i++ ) cs ^= sentence.charAt(i); //checksums match? return Integer.parseInt( checksum, 16 ) == cs; }
1
private void initPatients(int totalTime) { int time = 0; while (time < totalTime) { Patient p = new Patient(this.patients.size(), time); this.patients.add(p); time += this.generateNextCustomerEntranceInterval(); } }
1
private EditorPane createEditor(final Component panel) { final SelectionDrawer drawer = new SelectionDrawer(dfa); EditorPane editor = new EditorPane(drawer, new ToolBox() { public java.util.List tools(AutomatonPane view, AutomatonDrawer drawer) { java.util.List tools = new java.util.LinkedList(); to...
0
public void availableSlavesPolicy (int availableslaves) { System.out.println("availableSlavesPolicy"); int pending = pendingVMs.size(); int numberofslaves = resourcePool.size(); if (availableslaves+pending < 0.3*(numberofslaves) && numberofslaves+pending < maximumslaves) { launchVMs(1); } else if (availabl...
8
public static String rotateLeft(String str, int rotatePos){ if( rotatePos < 0 ){ throw new IllegalArgumentException("rotatePos < 0"); } if( str == null ){ throw new IllegalArgumentException("Can't rotate NULL string"); } final int strLength = str.length(); while( rotatePos > strLength ){...
9
private void loadProperties(String path) { ResourceBundle rbHome = ResourceBundle.getBundle(path); Enumeration<String> actionEnumHome = rbHome.getKeys(); while(actionEnumHome.hasMoreElements()) { String command = actionEnumHome.nextElement();; String className = rbHome.getString(command); try { Cla...
4
private boolean move(float a_xa, float a_ya) { while (a_xa > 8) { if (!move(8, 0)) return false; a_xa -= 8; } while (a_xa < -8) { if (!move(-8, 0)) return false; a_xa += 8; } while (a_ya > 8) { ...
8
final public CycList xorForm(boolean requireEOF) throws ParseException, java.io.IOException, UnsupportedVocabularyException { CycObject sent = null; CycObject sent2 = null; CycList val = new CycList(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case XOR_CONSTANT: jj_consume_token(XOR_CONSTANT); b...
4
public static List<Map<Integer, Double>> startLdaCreation(BookmarkReader reader, int sampleSize, boolean sorting, int numTopics, boolean userBased, boolean resBased, boolean topicCreation, boolean smoothing) { timeString = ""; int size = reader.getBookmarks().size(); int trainSize = size - sampleSize; Stopwa...
6
private static void evaluateAndSavePredictions(Predictor predictor, List<Instance> instances, String predictions_file) throws IOException { PredictionsWriter writer = new PredictionsWriter(predictions_file); // TODO Evaluate the model if labels are available. AccuracyEvaluator e = new AccuracyEvaluator(); Sy...
1
int serialisePair( byte[] bytes, int p, int setSize, int dataOffset, int dataTableOffset, int parentId ) throws MVDException { try { int oldP = p; int flag = 0; if ( parent != null ) flag = CHILD_FLAG; else if ( children != null ) ...
8
public static void write(Map<?, ?> map, File file) { BufferedWriter writer = null; try { writer = new BufferedWriter(new FileWriter(file)); for (Map.Entry<?, ?> entry : map.entrySet()) { writer.write(entry.getKey() + "=" + entry.getValue() + System.lineSeparator()); } } catch (IOException e) { ...
8
@Override public void delete(Sondage obj) { PreparedStatement pst = null; try { pst = this.connect().prepareStatement("DELETE FROM Sondage where id=?;"); pst.setInt(1, obj.getId()); pst.executeUpdate(); System.out.println("suppres...
3
private void updateWeights(){ //update the weights matrix based on the decisions made in the round for (Decision d: myDecisions) weights[d.getSlot()][d.getCard()]++; }
1
public void compress(long maxDelta) { long[] bandBoundaries = computeBandBoundaries(maxDelta); for (int i = this.numTuples - 2; i >= 0; i--) { if (this.summary[i].delta >= this.summary[i + 1].delta) { int band = 0; while (this.summary[i].delta < bandBoundaries...
9
public static void listen() { listener = new Thread() { @Override public void run() { try { while (!isInterrupted()) { if (rxSock == null || rxSock.isClosed()) { rxSock = new ServerSocket(receivePort); } try { waiting.add(rxSock.accept()); // Handle messag...
9
public ObjectInstantiator newInstantiatorOf(Class type) { if(!Serializable.class.isAssignableFrom(type)) { throw new ObjenesisException(new NotSerializableException(type+" not serializable")); } if(JVM_NAME.startsWith(SUN)) { if(VM_VERSION.startsWith("1.3")) { return new ...
5
public ParkerPaulTime(String time) { error = null; String[] splitTime = time.split(":"); if (splitTime.length != 2) { error = "Invalid or No separator entered"; return; } if (!applyHour(splitTime[0])) { return; } if (!validate...
4
private void extractOperator(Class<? extends IOperatorToken> operatorClass) { Stack<Integer> positions = new Stack<Integer>(); // find operator positions for (int i = size() - 1; i >= 0; i--) { if (operatorClass.isInstance(get(i))) { positions.push(i); } } // offset, used when positions are updat...
7
boolean valid(int x, int y) { if (x < 0 || y < 0) return false; if (x >= m) return false; if (y >= n) return false; return true; }
4
private CycList queryVariablesInternal(final CycList queryVariables, final CycObject query, final CycObject mt, final InferenceParameters queryProperties, final String inferenceProblemStoreName, final long timeoutMsecs) throws UnknownHostException, IOException...
8
public void showHint(LBNode n) { if(intfHint.isVisible() || n.getHint().trim().equals("")) return; intfHint.setTitle(n.getLabel()); hintNode=n; hintWidth = n.getHintWidth(); if (n.getHintIsHTML()) { tpHint.setEditorKit(new HTMLEditorKit()); ...
7
private void exportToJournal() { // TODO save movements (and counterparties) into accounting [or with different button] int[] rows = tabel.getSelectedRows(); if (checkAccountAndSelection(rows)) { if (checkCounterParties(rows)) { Object[] accountList = accounts.getBusinessObjects().toArray(); Account ba...
9
public void setDate(LocalDate value) { this._date = value; }
0
public GameState(int[] Perm, int inNumPlayers){ NumWolves = Perm.length - 1; NumPlayers = inNumPlayers; PlayerRoles = new int[NumPlayers]; for(int n = 0; n < NumPlayers; n++){ PlayerRoles[n] = 1; // Initialise all players to be living innocents. } for(int i = 0; i < Perm.length; i++){ int n = Perm[i]...
2
public static boolean isPermitted(String user, MessageEvent event) throws IllegalAccessException, SQLException, InstantiationException { if (CommandLinks.permitted.contains(user) || isRegular(user,event,false)) { return true; } else { if (!CommandLinks.strike1.contains(user)) { ...
4
@Override public void setComponent(JComponent c) { this.component = c; }
0
public double DeltaAdd(Instance inst, double r) { //System.out.println("DeltaAdd"); int S_new; int W_new; double profit; double profit_new; double deltaprofit; S_new = 0; W_new = occ.size(); if (inst instanceof SparseInstance) { //System.out.println("DeltaAddSparceInstance"); for (int i = 0; i < inst.nu...
7
@Override public void actionPerformed(ActionEvent e) { try { if (e.getActionCommand().equals("Voeg opdracht toe aan quiz")) { voegOpdrachtToeAanQuiz(); } else if (e.getActionCommand().equals(" Verwijder opdracht in quiz ")) { verwijderOpdrachtInQuiz(); } else if (e.getActionCommand().equals("Alle wi...
8
public void rebuild() { backButton = new GuiButton(this, 0, 300, 550, "gui.back"); videoButton = new GuiButton(this, 0, 100, 200, "gui.options.video"); videoVsyncButton = new GuiButton(this, 0, 100, 200, "gui.options.video.vsync." + (Client.instance.preferences.video.vsync ? "on" : "off")); videoFullscreenButton = ...
3
private void updateTurnOption() { if(model.getTurnOptionState() == Model.TurnOptionState.DEACTIVATED) { turnOption.setEnabled(false); } else { turnOption.setEnabled(true); } switch(model.getTurnOptionState()) { case THROWDICE: turnOptionText = "Wuerfeln"; break; case THROWDICEAGAIN: tur...
5
public static boolean isMove(Commands one, Commands two){ boolean path = getFileName(one).equals(getFileName(two)); boolean cata = one.getCatalog() == two.getCatalog(); //Null check and makes sure that the commands are opposite boolean comm = !(((one.getCommand() == null) || (two.getCom...
4
public void run() { DbConnection dbConn = new DbConnection(); Connection conn = dbConn.getConnection(); try { String statement; while (true) { Statement stmt = conn.createStatement(); statement = ImageStorage.statementsPoll(); try { if (statement != null) { stmt.execute(statement); ...
7
protected Object computeBounds() { Envelope bounds = null; for (Iterator i = getChildBoundables().iterator(); i.hasNext(); ) { Boundable childBoundable = (Boundable) i.next(); if (bounds == null) { bounds = new Envelope((Envelope)childBoundable.getBounds()); } else ...
2
public static File choose(Component comp, boolean open, String title, String dir, String name, String... extension) { StdFileDialog filter = new StdFileDialog(extension); FileDialog dialog; Window window = WindowUtils.getWindowForComponent(comp); int mode = open ? FileDialog.LOAD : FileDialog.SAVE; if (window...
5
public boolean equals(Object object) { if (object instanceof ActivityNode) { ActivityNode actNode = (ActivityNode) object; if ((this.activity == null || actNode.getActivity() == null) && !(this.activity == null && actNode.getActivity() == null)) { return false; } if (this.nodeNr != actNode.nodeN...
9
public void majPlateau(Positions pos, Positions newPos) { if (!(newPos == null)) { this.plateau[pos.getLigne()][pos.getColonne()] = EtatDesCases.LIBRE; this.plateau[newPos.getLigne()][newPos.getColonne()] = EtatDesCases.OCCUPEE; return; } if (this.plateau[pos.getLigne()][pos.getColonne()] == EtatDesCa...
2
public void draw(Graphics2D g) { for (int row = 0; row < mapHeight; row++) { for (int column = 0; column < mapWidth; column++) { int currentTile = map[row][column]; tilesSpec.position.x = column * tilesSpec.size; tilesSpec.position.y = row * tilesSpec.size; switch (currentTile) { case 0: g.draw...
9
public void setCommandButtonBorderthickness(int[] border) { if ((border == null) || (border.length != 4)) { this.buttonCom_Borderthickness = UIBorderthicknessInits.COM_BTN.getBorderthickness(); } else { this.buttonCom_Borderthickness = border; } somethingChanged(...
2
public void killAll() { for (int i = 0; i < bots.size(); i++) { bots.get(i).close(); } }
1
public void setLastName(String lastName) { this.lastName = lastName; }
0
public Object clone() { return new Turtle(this); }
0
@Override public String getOOXML() { StringBuffer ooxml = new StringBuffer(); if( cxnSp != null ) { ooxml.append( cxnSp.getOOXML() ); } if( graphicFrame != null ) { ooxml.append( graphicFrame.getOOXML() ); } if( grpSp != null ) { ooxml.append( grpSp.getOOXML() ); } if( pic != null ) {...
5
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { Player player = null; if (sender instanceof Player) { player = (Player) sender; } if (args.length != 1) { sender.sendMessage("/delmail <ID>"); return true; } ResultSet rs; java....
6
@Override /*public void focusGained(FocusEvent evt) { if (evt.getSource() == dataPacketText) { dataPacketText.setText(""); } } @Override public void focusLost(FocusEvent evt) { // do nothing }*/ public void actionPerformed(ActionEvent evt){ if (evt.getSource() == connectBtn) { serialPortManage...
8
protected Behaviour getNextStep() { if (stage >= STAGE_DONE) return null ; if (type != TYPE_CONTACT && ! canTalk(other)) { abortBehaviour() ; return null ; } if (starts == actor && stage == STAGE_INIT) { final Action greeting = new Action( actor, other, this, "acti...
8
public void insert(Key v) { // Insert pq[++N] = v; int i = swim(N); // resizing if (N >= pq.length - 1) pq = resize(pq, 2 * pq.length); // Mark the min if (minIndex == -1) minIndex = i; else if (v.compareTo(pq[minIndex]) < 0) minIndex = i; }
3
private boolean findEntry() { Cursor waitCursor = new Cursor(shell.getDisplay(), SWT.CURSOR_WAIT); shell.setCursor(waitCursor); boolean matchCase = searchDialog.getMatchCase(); boolean matchWord = searchDialog.getMatchWord(); String searchString = searchDialog.getSearchString(); int column = searchDialog.getSel...
6
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } MultiBelop other = (MultiBelop) o; if (nokkelBelopMap.size()!= nokkelBelopMap.size()) { ret...
8
public static void main(String[] args) { if (args.length != 1) System.out.println("Please specify a Unit Test Case name"); else { LogQuerierTest lqTest = new LogQuerierTest(); if(args[0].compareTo("-generateLogs") == 0) { lqTest.genrateLogFiles(); return; } if((new File("unit_tests/" + ...
8
public MemoryUsagePanel() { super(); // initializes members m_Memory = new Memory(); m_History = new Vector<Double>(); m_Percentages = new Vector<Double>(); m_Colors = new Hashtable<Double,Color>(); // colors and percentages m_BackgroundColor = parseColor("BackgroundColor...
7
private void hold() { if (hold.isEnabled()) { hold.setEnabled(false); if (hold.getTetromino() == null) { initializePositions(); hold.setTetromino(tetromino); getNextTetromino(); } else { initializePositions(); Tetromino tmp = hold.getTetromino(); hold.setTetrom...
2
public PlanSkill(JSONObject skill) throws FatalError { super("Skill"); try { category = skill.getString("Kategorie"); try { count = skill.getInt("Anzahl"); } catch (JSONException e) { } try { bank = skill.getBoolean("Bank"); } catch (JSONException e) { } } catch (JSONException e)...
3
public static int getFriendlySupport(Game game, Position position, Player player) { Iterator<Position> neighborhood = get8NeighborhoodIterator(position); Position p; int support = 0; while ( neighborhood.hasNext() ) { p = neighborhood....
3
public void getFullName() { fullName.toString(); }
0
void BaseExpr() { printer.startProduction("BaseExpr"); switch (la.kind) { case 9: { Get(); printer.print(stack.size() + ": In with: " + currentType); this.enterParenthesis(this.currentType); Expr(); Expect(10); this.exitParenthesis(); printer.print(stack.size() + ": Out with: " + lastType...
6
public RestrictedAction(String string, Icon icon) { super(string, icon); }
0
@Override public boolean equals( Object obj ) { if( obj == this ) { return true; } if( obj == null || obj.getClass() != getClass() ) { return false; } DefaultItemKey<?> that = (DefaultItemKey<?>) obj; return that.id == id && that.typeName.equals( typeName ); }
6
@EventHandler public void CaveSpiderSpeed(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.getCaveSpiderConfig().getDouble("CaveSpid...
6
public void afficherPraticien(Praticien unPraticien) { /*Lieu exercice a ajouter */ this.vue.getjTextFieldNum().setText(unPraticien.getNumero()); this.vue.getjTextFieldNom().setText(unPraticien.getNom()); this.vue.getjTextFieldPrenom().setText(unPraticien.getPrenom()); this.vue.getjTextF...
0
/* */ public static void sendPacket(Player p, Object packet) /* */ { /* */ try { /* 68 */ Object nmsPlayer = getHandle(p); /* 69 */ Field con_field = nmsPlayer.getClass().getField("playerConnection"); /* 70 */ Object con = con_field.get(nmsPlayer); /* 71 */ Method packet_...
5
public Path(String path) { this.path = path; pathArray = trimSlashes(path).split(DELIMITER); }
0
@Override public boolean checkLife() { if (curHP <= 0) { return false; } else { return true; } }
1
private final void promoteSuccs(Instruction from, Instruction to) { if (succs == from) succs = to; else if (succs instanceof Instruction[]) { Instruction[] ss = (Instruction[]) succs; for (int i = 0; i < ss.length; i++) if (ss[i] == from) ss[i] = to; } }
4
private void initMachine(Collection<State> states) { if (states == null || states.size() == 0) { throw new NullPointerException("Machine must have at least one state"); } //put all the states into the hash map int numStartStates = 0; for (State state : states) { numStartStates += state.isStart()? 1 : 0...
5
public void run(){ DataInputStream dIn = user.getInput(); boolean done = false; try { while(!done) { byte messageType = dIn.readByte(); switch(messageType) { case 1: // Chat messg Server.printMessage(user.getName() + ": " +dIn.readUTF(), user); break; case 2: // Command int ...
8
private byte[] crypt_raw(byte password[], byte salt[], int log_rounds) { int rounds, i, j; int cdata[] = (int[])bf_crypt_ciphertext.clone(); int clen = cdata.length; byte ret[]; if (log_rounds < 4 || log_rounds > 31) throw new IllegalArgumentException ("Bad number of rounds"); rounds = 1 << log_rounds; ...
7
@Override public void load() throws IOException { FileInputStream fileInputStream = new FileInputStream(new File(file)); XSSFWorkbook workbook = new XSSFWorkbook(fileInputStream); FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator(); DateTimeFormat...
6
@Override protected void doEditing() { if (this.col == 0) { component.model.removeRow(this.row); } }
1
public void renderGame(Game game) { Ship ship = game.getShip(); List<Bullet> bullets = game.getBullets(); List<Asteroid> asteroids = game.getAsteroids(); List<Alien> aliens = game.getAliens(); List<Powerup> powerups = game.getPowerups(); List<Particle> particles = game.getParticles(); long points = game.g...
6
private TuplesWithNameTable updateTuplesByCond(Condition cond, ArrayList<AttrAssign> attrAssignList, ArrayList<Integer> PrimaryKeyList, TuplesWithNameTable tuples){ Hashtable<String, Integer> nameTable = tuples.getNameTable(); //Tuple list will be modified directly ArrayList< ArrayList<Value> > tupleList = tuples...
9
public static void submitStackTraces(Context context) { Log.d(Constants.TAG, "Looking for exceptions in: " + Constants.FILES_PATH); String[] list = searchForStackTraces(); if ((list != null) && (list.length > 0)) { Log.d(Constants.TAG, "Found " + list.length + " stacktrace(s)."); for (int inde...
6
public void joueurSuivant() { setEtape(0); /* on calcule les gains du tour et on met à jour les pts de victoire */ int argent = joueurEnCours.calcArgentTour(); Game.getInstance().showTemp(argent + " point(s) gagné(s) durant ce tour !"); joueurEnCours.addArgent(argent); if (indexJoueurEnCours == lst...
3
public static ComplexPoly rootsToPoly(Complex[] roots){ if(roots==null)return null; int pdeg = roots.length; Complex[] rootCoeff = Complex.oneDarray(2); rootCoeff[0] = roots[0].times(Complex.minusOne()); rootCoeff[1] = Complex.plusOne(); ComplexP...
2
public void updatePos() { if(--time >= 0 && direction != -1) { switch (direction) { case 0: { y--; break; } case 1: { x++; break; } case 2: ...
6
public void populate(IChunkProvider var1, int var2, int var3) { BlockSand.fallInstantly = true; int var4 = var2 * 16; int var5 = var3 * 16; int var6; int var7; int var8; int var9; for(var6 = 0; var6 < 8; ++var6) { var7 = var4 + this.hellRNG.nextInt(16) + 8; ...
6
public Template(String directory, String filename) { this.tpl = new YamlConfiguration(); try { file = new File(directory, filename); this.tpl.load(file); upgrade(file); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (InvalidConfigu...
3
public void updateChampion (Champion c) { if (champion != c) { champion = c; icon.setIcon (champion.getIcon()); name.setText (champion.getName()); style.setText (firstLetterUppercase (champion.getPlayStyle().toString())); tacticBox.removeAll(); tacticBox.add (new JLabel (c.getPrimaryStrategy().getIc...
2
@Override public void enqueCommand(final List<String> commands, final int metaFlags, double actionCost) { if (commands == null) return; final CMObject O = CMLib.english().findCommand(this, commands); if((O == null) ||((O instanceof Ability) &&CMath.bset(metaFlags, MUDCmdProcessor.METAFLAG_ORDER) &&CM...
7
private Animation createMirrorEnemyAnim(String str) { Animation anim = new Animation(); for(int i=1;i<=26;i++){ anim.addFrame(getMirrorImage(loadImage(str+i+".png")), 80); } return anim; }
1
@Override public boolean matches(List<Character> currentMatching) { if(currentMatching.get(0) != KeyMappingProfile.ESC_CODE) return false; if(currentMatching.size() == 1) return true; if(currentMatching.get(1).charValue() > 26) return false; if(cur...
4
public Model load(Path path) throws IOException { // read file line by line BufferedReader read = null; Model model = null; try { String currentLine; FileReader reader = new FileReader(path.toFile()); read = new BufferedReader(reader); while ((currentLine = read.readLine()) != null) { if (cu...
8
public boolean equals(Object ob) { if (super.equals(ob)) { CandyForKid other = (CandyForKid) ob; if (color != other.color) return false; } return true; }
2
@Override public int compareTo(AstronomicalObject o) { return (this.mass < o.mass) ? -1 : (this.mass > o.mass) ? 1 : 0; }
2
private Handshake validateHandshake(Socket socket, byte[] peerId) throws IOException, ParseException { InputStream is = socket.getInputStream(); //< obfuscated handshake extension // Read the handshake from the wire byte[] data = new byte[Handshake.BASE_HANDSHAKE_LENGTH + 20]; is.read(data, 0, data.length)...
8
static String spellHundredsNumber(int num){ if(primitiveNumbers.containsKey(num)) return primitiveNumbers.get(num); String num_str = ""; if(num/100 != 0) num_str = primitiveNumbers.get(num / 100) + " Hundred "; num = num % 100; if(primitiveNumbers.containsKey(num)) num_str += primitiveNumbers.get(num); else...
6
public void mouseEntered(MouseEvent event) { }
0
public void play(String audioFilePath) { File audioFile = new File(audioFilePath); try { AudioInputStream audioStream = AudioSystem.getAudioInputStream(audioFile); AudioFormat format = audioStream.getFormat(); DataLine.Info info = new DataLine.Info(...
5
@Override public void stateChanged(ChangeEvent ce) { String classSelec = DocsPanel.CLASSES[this.panel.selector.getSelectedIndex()]; switch (classSelec) { case DocsPanel.LIBROS: { if (this.panel.lastRowSelecDocs[0] == -1) { this....
8
public String getMatricule() { return matricule; }
0
public boolean containsKey(Object k) { PositionalVector pos; if (k instanceof CoordinateEntry) pos = ((CoordinateEntry) k).asPosition(); else if (k instanceof PositionalVector) pos = (PositionalVector) k; else return false; for (int i = 0; i < data.length...
4
public AmericanFlag(int x, int y, double scale){ this.scale = scale; this.union = new Rectangle(x,(y+(int)(this.scale*10)),(int)(this.scale*99),(int)(this.scale*70), Color.blue); this.stripes = new Rectangle[13]; this.wstars = new Star[9][6]; // this.wstars = new Stars[9][6]; for (int i = 0; i < 13 ; i++...
5
void run(){ int S = 125000; int[] a = new int[S]; int s = 0; for(int i=0;i<S;i++){ a[i] = s; int L = 1000*i, R = L+999; if((L+"").length()==(R+"").length())s+=1000*(L+"").length(); else{ for(int k=L;k<=R;k++)s+=(k+"").length(); } } Scanner sc = new Scanner(System.in); for(;;){ int N ...
9
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ProdutosConsumidos other = (ProdutosConsumidos) obj; if (this.IdProdutosConsumidos != other.IdProdutosCon...
5
public PrivatePackDialog() { super(LaunchFrame.getInstance(), true); setupGui(); getRootPane().setDefaultButton(add); add.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if(DownloadUtils.staticFileExists(modpackName.getText() + ".xml") && !modpackName...
7
static 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....
4
private Value[] fillParameters(BytecodeInfo code, Object cls, Object[] params) { Value[] locals = new Value[code.getMaxLocals()]; for (int i = 0; i < locals.length; i++) locals[i] = new Value(); String myType = code.getMethodInfo().getType(); String[] myParamTypes = TypeSignature.getParameterTypes(myType...
3
protected static void readUIFile(UIFileTextVO uiFile, Path uifilepath) { assert (uiFile != null) && FileUtil.control(uifilepath); uiFile.setLineList(FileUtil.readTextFile(uifilepath)); }
1