text
stringlengths
14
410k
label
int32
0
9
public static void main(String[] args) throws Exception { SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); File schemaLocation = new File("schema/data/data-savedGame.xsd"); Schema schema = factory.newSchema(schemaLocation); Validator saveGameValidat...
8
public void createLife() { Random rand = new Random(); Animals tempA; Plants tempP; // if(ratioOfPredatorToAll==0) { for(int i=0;i<AmountAn;i++) {// tempA = new Animals(rand.nextDouble()*998, rand.nextDouble()*799); if(tempA.species==1) anP.add(tempA); else anH.add(tempA);...
6
@Override public void init(GameContainer gc, StateBasedGame arg1) throws SlickException { //changing resolution //AppGameContainer apgc = (AppGameContainer)gc; //apgc.setDisplayMode(482, 600, false); inGameMenu = new Image("res/inGameMenu.png"); Image [] movementWarrior = {new Image("res/warrior.png"),new...
6
private Object[] mergeSort(Object[] array) { if (array.length > 1) { int elementsInA1 = array.length/2; int elementsInA2 = elementsInA1; if((array.length % 2) == 1) elementsInA2++; ...
9
public void populateSkillMap() { Connection connection = new DbConnection().getConnection(); ResultSet resultSet = null; Statement statement = null; try { statement = connection.createStatement(); resultSet = statement.executeQuery(SELECT_ALL_SKILLS); while (resultSet.next()) { int skillId = resul...
6
private void go()throws InterruptedException{ int i=1; float dpercent = 0f; String cc = c[0]; app.setEnabled(false); JFrame.setDefaultLookAndFeelDecorated(true); JFrame fFrame = new JFrame("Please wait while updating."); ...
5
private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed if(null != jListExcluir.getSelectedValue()){ if(JOptionPane.showConfirmDialog(null, "Tem certeza que deseja excluir: "+jListExcluir.getSelectedValue()) == 0){ FachadaSistem...
3
public static void discretizeNumericAttributesProcessClass(ArrayList<LearningObject> learningSet, ArrayList<Attribute> attributes){ for(int i=0; i<attributes.size();i++){ Attribute attr = attributes.get(i); if(attr.type == Attribute.NUMERIC){ //apply discretization process TreeMap<Inte...
8
Space[] won() { int n = numToWin - 1; if (lastSpaceMoved == null) return null; int[] pos = lastSpaceMoved.getPos(); for (int i = 0, rowInd = pos[0]; i <= n; i++, rowInd = pos[0] - i) for (int j = 0, colInd = pos[1]; j <= n; j++, colInd = pos[1] - j) { boolean outOfBounds = rowInd < 0 || colInd < 0 ...
9
@Override public double calculateFractalWithoutPeriodicity(Complex pixel) { iterations = 0; Complex tempz = new Complex(pertur_val.getPixel(init_val.getPixel(pixel))); Complex[] complex = new Complex[2]; complex[0] = tempz;//z complex[1] = new Complex(pixel);//c C...
8
public void connectGeneral(TreeLinkNode root){ LinkedList<TreeLinkNode> queue = new LinkedList<TreeLinkNode>(); if(root==null) return; queue.offer(root); while(!queue.isEmpty()){ int size = queue.size(); for(int i=0;i<size;i++){ TreeLinkNode curre...
6
private static Icon getTexture(int textureType) { Icon texture = null; switch (textureType) { case WINDOW_TEXTURE_TYPE: texture = windowTexture; break; case BACKGROUND_TEXTURE_TYPE: texture = backgroundTexture; break; case ALTER_BACKGROUND_TEXTURE_TYPE: texture = alte...
8
public GraphProblem(String fileName, int numNodes, int s_Index) throws IOException { totalNumNodes = numNodes; startV = s_Index; originalGraph = new HashMap<Integer, HashMap<Integer, Integer>>(); exploredNodes = new ArrayList<Integer>(totalNumNodes); unexploredNodes = new ArrayList<Integer>(totalNumNodes);...
1
public static void main(String[] args) throws IOException{ formulas = new ArrayList<Vector<Object>>(); System.out.println("Welcome to Formulaic !"); boolean running = true; br = new BufferedReader(new InputStreamReader(System.in)); String instruction = new String(); while(running){ instruction =...
8
@Override public Object transformMessage(MuleMessage muleMessage, String s) throws TransformerException { try { System.out.println(muleMessage.getPayloadAsString()); String payload = muleMessage.getPayloadAsString(); StringTokenizer tokenizer = new StringTokenizer(payl...
2
final Class39_Sub2 method1069(byte byte0) { if (anIntArray1881 == null) { return null; } Class39_Sub2 aclass39_sub2[] = new Class39_Sub2[anIntArray1881.length]; for (int i = 0; ~i > ~anIntArray1881.length; i++) { aclass39_sub2[i] = Class39_Sub2.method439(Traversal...
7
public static void main(String... args) throws IOException { MyScanner sc = new MyScanner(); int n = sc.nextInt(); Group[] g = new Group[n]; for (int i = 0; i < n; i++) { g[i] = new Group(sc.nextInt(), sc.nextInt(), i + 1); } Arrays.sort(g, (a, b) -> b.m - a.m...
7
@Test public void test_DefaultConstructor() { Grid g = new Grid(); // TEST FOR SIZE (SQUARE) boolean ok = true; if(g.getBoard().length != 5) { ok = false; } int badSize =5; int i = 0; while(ok && (i<g.getBoard().length)) { if(g.getBoard()[i].length != 5) { badSize = g.getBoard()[i].length; ...
9
public String toString(){ String text = "Consulta de " + getPaciente() + " as " + getData_inicio(); if(getData_fim() != null) text += " ate " + getData_fim(); if(medicamentos != null){ int size = medicamentos.size(); if(size > 0){ if(size == 1){ text += " com o medicamento: " + medicamento...
5
@Override public void windowClosing(WindowEvent event) { if (!hasOwnedWindowsShowing(this)) { List<Saveable> saveables = new ArrayList<>(); collectSaveables(this, saveables); if (SaveCommand.attemptSave(saveables)) { dispose(); } } }
2
public static void printMap(){ //Makes HashMap Alphabetical TreeMap<String, String> printMap= new TreeMap(); printMap.putAll(invertedIndex); try { PrintWriter writer = new PrintWriter("output.txt", "UTF-8"); // Used To Print Out map Iterator it = printMap.keySet().iterator(); Object printS; ...
3
@Override public List<Map<String, ?>> lirtar_trabajor_Navidad(String mes) { List<Map<String, ?>> Lista = new ArrayList<Map<String, ?>>(); try { this.conn = FactoryConnectionDB.open(FactoryConnectionDB.ORACLE); String sql = "SELECT * from RHVD_FILTRO_NAVIDAD "; sql...
8
public void buildClassifier(Instances data) throws Exception { // can classifier handle the data? getCapabilities().testWithFail(data); // remove instances with missing class data = new Instances(data); data.deleteWithMissingClass(); if (!(m_Classifier instanceof weka.classifiers.meta...
7
public void changeCursor(char lettre) { switch (lettre) { case 'D': this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); break; case 'H': this.setCursor(new Cursor(Cursor.HAND_CURSOR)); break; } }//fin de la m�thod...
2
@Override public String getDesc() { return "Default"; }
0
@Override public boolean deleteSkin(Path skinPath) { if (!FileUtil.control(skinPath)) { IllegalArgumentException iae = new IllegalArgumentException("The skin is not existing!"); Main.handleUnhandableProblem(iae); } boolean ret = FileUtil.deleteFile(skinPath); ...
2
private void extractCircle(XMLEventReader xrd) throws XMLStreamException { XMLEvent xev = xrd.nextTag(); if (xev.isStartElement() && xev.asStartElement().getName().getLocalPart().toLowerCase().contains("pos")) { // skip attributes,comments and whitespace do { xev ...
9
public int compare(String o1, String o2) { String s1 = (String)o1; String s2 = (String)o2; int thisMarker = 0; int thatMarker = 0; int s1Length = s1.length(); int s2Length = s2.length(); while (thisMarker < s1Length && thatMarker < s2Length) { ...
8
@Override public boolean onCommand(CommandSender sender, org.bukkit.command.Command cmd, String[] args) { if (!Commands.isPlayer(sender)) return false; //String arg2 = (args.length > 1 ? args[1] : null); //String arg3 = (args.length > 2 ? args[2] : null); Player p = (Player) sender; ConfigurationSectio...
3
private int[][] createPattern() { int[][] squares = new int[NCELLS][NCELLS]; int n = RAND.nextInt(NCELLS); if (RAND.nextBoolean()){ //make a column of ones for (int i = 0; i < squares.length; i++) { squares[i][n] = 1; } } else { //make a row of ones for (int i = 0; i < squares.length; i++) { ...
3
@Override public void update(GameContainer container, StateBasedGame sbg, int delta) throws SlickException { xpos = container.getInput().getMouseX(); ypos = container.getInput().getMouseY(); if(mousePress){ enterGameState(sbg); } }
1
* @return Proposition */ public static Proposition callDefproposition(Cons arguments) { { Cons definition = Cons.cons(Logic.SYM_LOGIC_DEFPROPOSITION, arguments.concatenate(Stella.NIL, Stella.NIL)); Symbol name = null; Cons options = Stella.NIL; Stella_Object conception = null; Propositi...
6
public static final int typeIDObject(Object o) { if (o instanceof java.lang.Boolean) return 0; if (o instanceof java.lang.Byte) return 1; if (o instanceof java.lang.Character) return 2; if (o instanceof java.lang.Short) return 3; if (o instanceof java.lang.Integer) return 4; if (o instanceof jav...
9
public void tick() { if (isPressed) { for (ButtonListener listener : listeners) { System.out.println("Handling press"); listener.buttonPressed(); isPressed = false; } } }
2
public GameLayout(String locationsFile, String connectionsFile, String actionsFile) throws Exception, FileNotFoundException, IOException{ //Locations************************************************************************************************* BufferedReader reader = new BufferedReader(new FileReader(locations...
8
public static boolean decodeFileToFile( String infile, String outfile ) { boolean success = false; java.io.InputStream in = null; java.io.OutputStream out = null; try{ in = new Base64.InputStream( new java.io.BufferedInputStream( ...
6
public static boolean isEmpty(Board board){ boolean result = true; for(List<Token> row : board.tokens()){ for(Token t : row){ if(t.isAvailable())result = false; } } return result; }
3
public int calculateAttackValue() { int actualAttackValue = attackValue; if (Strength > 10) { actualAttackValue += Strength - 10; } if (Agility > 10) { actualAttackValue += Agility - 10; } if (Dexterity > 10) { actualAttackValue += Dex...
4
public List<Claim> getCounterClaimList(String oppositeFileName, String teamType) { List<Claim> claimList = new ArrayList<Claim>(); Element claimE; Claim claim = null, claimFlag = null; ClaimDao parentClaim = new ClaimDao(oppositeFileName); List<Claim> parentClaimList = parentClaim.getClaimAndSubclaimList(team...
4
protected void updateStatsForClassifier(double [] predictedDistribution, Instance instance) throws Exception { int actualClass = (int)instance.classValue(); if (!instance.classIsMissing()) { updateMargins(predictedDistribution, actualClass, instance.weight()); // Determine the predicted c...
8
public static void applyDamagePacks(Actor target, ArrayList<DamagePackage> packs) { for (int c = 0; c < packs.size(); c++) { DamagePackage pack = packs.get(c); applyDamage(target, pack.damage, pack.type); } }
1
public void drawRespawnMenu(GL2 gl) { this.gl = gl; if(isRespawnOpen()) { start2D(); if(selection == 0) { respawnMenu = Texture.findOrCreateByName(FIGHTER); if(respawnMenu != null) { respawnMenu.bind(gl); gl....
7
public int getNumberPredators() { return numberPredators; }
0
public HealthPill() { super((Math.random()*Board.getWIDTH()+1), (Math.random()*Board.getHEIGHT()+1), 0.0f); switch(Board.getTheme()){ case "Desert": ii = new ImageIcon(this.getClass().getResource("/resources/images/scenarios/desertPill.png")); br...
4
private void addHidden(int startIndex) { // Find out what kind of pieces can move in this delta int pieceType = ATTACK_ARRAY[move_to - startIndex + 128]; // If rook is one of types, call addSlider with the right delta and rook // as piece type // same if bishop is one of the types switch (pieceType) { ca...
5
public static void main(String[] args) throws IOException { // Create a selector to multiplex listening sockets and connections Selector selector = Selector.open(); // Create listening socket channel for PORT and register selector ServerSocketChannel listnChannel = ServerSocketChannel.open(); listnChannel.so...
9
@Override public void mutate() { Population offspring = new Population(); for (int i = 0; i < population.getSize(); ++i){ double r; synchronized (rng){ r = rng.nextDouble(); } if (r < PROBABILITY){ HiffIndividual mutant ...
6
public static String keyBasedData(String addy, String[] keys) { for (int i = 0; i < 10; i++) {// try 10 times to get html or else return if (i > 0) System.out.println("\nConnection Failure. Trying again: " + i); String httpdata = getHtml(addy); String yhdata = ""; String str = httpdata; if (str.con...
9
private void addPosition(KrakenState state, ArrayList<KrakenMove> list, XYLocation location, XYLocation kingLocation, XYLocation finalLocation) { if (state.checkRange(finalLocation)){ if (state.distance(kingLocation, location, finalLocation)){ if (state.isEmpty(finalLocation)) list.add(new KrakenMov...
6
public void paintComponent(Graphics g){ super.paintComponent(g); // fill bottom g.setColor(new Color(238,238,238)); g.fillRect(0, 550, 1000, 150); //draw state control g.setColor(Color.black); g.drawRect(350, 50, 300, 80); g.setFont(...
6
public static void main(String[] args) { // TODO Auto-generated method stub String id; String pass; String type = "student"; user_dao = DaoFactory.getInstance().getUserDAO(); while (true) { System.out.print("Registration(r) / Login(l) / ChangePassword(c) / clearDb(clear) : "); String mode = sc.nextLin...
5
static final void method1212(int i, int i_13_, int i_14_, int i_15_) { anInt2059++; i = ((Class348_Sub51) BitmapTable.aClass348_Sub51_3959) .aClass239_Sub26_7260.method1838(-32350) * i >> -1161142392; if (i_14_ == i_13_ && !EntityPacket.aBoolean1236) Class104.method960(1); else if (i_13_ != -1 && (i_13_ !...
8
@Path("/database") @GET @Produces(MediaType.TEXT_HTML) public String returnDatabaseStatus() throws Exception { PreparedStatement query = null; String myString = null; String returnString = null; Connection conn = null; StringBuffer sb = new StringBuffer(); try { conn = DB_Conn.getConnection(); //...
4
private void loadOptions() { try { this.musicVolume = this.parseFloat(this.getProperty("music", "1.0")); this.soundVolume = this.parseFloat(this.getProperty("sound", "1.0")); this.mouseSensitivity = this.parseFloat(this.getProperty("mouseSensitivity", "0.5")); thi...
3
private static synchronized Mixer mixer( boolean action, Mixer m ) { if( action == SET ) { if( m == null ) return myMixer; MixerRanking mixerRanker = new MixerRanking(); try { mixerRanker.rank( m.getMixerInfo() ); ...
6
@Override public void run() { while(true){ synchronized (this) { while(orderList.isEmpty()){ try { wait(); } catch (InterruptedException e) { e.printStackTrace(); } } try { obOut.writeObject(orderList.remove(0)); obOut.flush(); } catch (IOException e) { e....
6
public void paintComponent(Graphics graphics) { try { if (isMouseOver == false) { graphics.drawImage(realVersion.image, 4, 4, (this.getWidth() - 6), (this.getHeight() - 6), this); } else { graphics.drawImage(scrapperVersion.image, 4, 4, (this.getWidth() - ...
2
public int minimumTotal(List<List<Integer>> triangle) { if(triangle==null || triangle.isEmpty()){ return 0; } int maxLength = triangle.get(triangle.size()-1).size(); int[][] f = new int[triangle.size()][maxLength]; f[0][0]=triangle.get(0).get(0); for(int i=1; ...
8
public double getAngle() { if (leftNeighbour == null || rightNeighbour == null) return -1024; double leftAngle = getDirection(leftNeighbour); double rightAngle = getDirection(rightNeighbour); if (rightAngle < leftAngle) rightAngle += Math.PI * 2; return rightAngle...
3
private ByteMatcher createRandomByteMatcher() { int matcherType = random.nextInt(9); boolean inverted = random.nextBoolean(); switch (matcherType) { case 0: return AnyByteMatcher.ANY_BYTE_MATCHER; case 1: return OneByteMatcher.valueOf((byte...
9
public void setCheckBox(JCheckBox checkbox) { this.checkbox = checkbox; }
0
private synchronized int nextId() { return ++next_id; }
0
public static <T> Set<T> hashSet(T... params) { Set<T> result = new HashSet<T>(); for (T t : params) { result.add(t); } return result; }
1
@Override public void update(Observable arg0, Object arg1) { if (!(arg0 instanceof Timer)) return; Timer timer = (Timer) arg0; int s = timer.getTime(); if (s < 5) lblTime.setForeground(Color.red); lblTime.setText(s + ""); validate(); repaint(); }
2
public RegularGrammar convertToRegularGrammar(Automaton automaton) { /** check if automaton is fsa. */ if (!(automaton instanceof FiniteStateAutomaton)) { System.err.println("ATTEMPTING TO CONVERT NON FSA TO " + "REGULAR GRAMMAR"); return null; } RegularGrammar grammar = new RegularGrammar(); /** ...
3
static private boolean jj_3R_9() { Token xsp; while (true) { xsp = jj_scanpos; if (jj_3R_23()) { jj_scanpos = xsp; break; } } if (jj_scan_token(ID)) return true; if (jj_scan_token(LP)) return true; if (jj_3R_21()) return true; if (jj_scan_token(RP)) return true; if (jj_3R_22(...
7
public String toString() { String input = ""+getBias(); for(Neuron key : dendrites.keySet()) { if(key != this) { if(dendrites.get(key) >= 0) input += "+"; input += dendrites.get(key) + "*" + key.toString(); } } return _function.toString(input); }
3
public boolean type(char key, java.awt.event.KeyEvent ev) { if(key == 27) { clbk.result(false); close(); } return(super.type(key, ev)); }
1
@Override public void run() { try { while (true) { @SuppressWarnings("resource") Socket socket = mServerSocket.accept(); try { Client client = new Client(this, socket); client.setDaemon(true); client.start(); synchronized (mClients) { mClients.add(client); } } catch ...
4
@SuppressWarnings("unchecked") public synchronized List<NodeOsm> getNodes(String key, List<Long> ids){ List<NodeOsm> nodes = new ArrayList<NodeOsm>(); for (Long l: ids) nodes.add(((NodeOsm) getKeyFromValue((Map< String, Map <Object, Long>>) ((Object)totalNodes), key, l))); nodes.remove(null); return node...
1
public int getSequenceID() { return this.sequenceID; }
0
private boolean r_mark_suffix_with_optional_U_vowel() { int v_1; int v_2; int v_3; int v_4; int v_5; int v_6; int v_7; // (, line 159 // or, line 161 lab0: do { ...
9
public User loadUser(String userid) { File f = new File(users, userid + ".sav"); try { ObjectInputStream in = new ObjectInputStream(new FileInputStream(f)); Object o = in.readObject(); if (o instanceof User) { return ((User) o); } in.close(); } catch (Exception ex) { ex.printStackTrace(); ...
2
public static void main(String[] args) throws IOException { if (args.length < 1) { System.err.println("ERROR: Missing input file argument."); System.exit(0); } // INPUT VARS FileReader inputStream = null; CharBuffer cbuf = CharBuffer.allocate(100000); InputStream inputSentenceModel = null; InputStr...
9
public void startMovingToTarget(float maxVelocity) { // LET ITS POSITIONG GET UPDATED movingToTarget = true; // CALCULATE THE ANGLE OF THE TRAJECTORY TO THE TARGET float diffX = targetX - x; float diffY = targetY - y; float tanResult = diffY/diffX; ...
8
public void setTexture(String texturePath){ try { texture = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream(texturePath)); } catch (IOException e) { e.printStackTrace(); } }
1
public boolean isDone() { int toDo = pToT.size() - alreadyDone.size(); String message = toDo == 0 ? "The conversion is finished!" : toDo + " more transition" + (toDo == 1 ? "" : "s") + " must be added."; javax.swing.JOptionPane.showMessageDialog(parent, message); return toDo == 0; }
2
public void usePotion(){ System.out.println("What type of potion would you like?"); System.out.println("Type 'mana potion' to use a mana potion"); System.out.println("Type 'health potion' to use a health potion"); String potionType = input.nextLine(); if(potionType.compareTo("mana potion") == 0){ if(this.g...
4
public void readMsg() { if (nUpdateRectsLeft == 0) { int type = is.readU8(); switch (type) { case MsgTypes.framebufferUpdate: readFramebufferUpdate(); break; case MsgTypes.setColourMapEntries: readSetColourMapEntries(); break; case MsgTypes.bell: readBell(); break; ...
8
public double getLongitude() { return longitude; }
0
public void execute() { while(running){ try{ int idx = getProgramCounter(); String opcode = "0x" + Integer.toHexString(code.getOpcode(idx)).toUpperCase(); boolean imm = code.getImmediate(idx); boolean ind = code.getIndirect(idx); int arg = code.getArg(idx); INSTRUCTION_MAP.get(opcode).execu...
6
public void setType(String type){ this.type = type; }
0
public void configure( JobConf job ) { confJsonStr = job.get( "confJsonStr" ); if( confJsonStr == null ) { LOG.warn( "confJsonStr is null" ); return; } LOG.debug( confJsonStr ); confMap = JSON.decode( confJsonStr ); try { if( confMap.containsKey( "rrd" ) ) { Map rrdMap = ( Map )confMap.get( "rrd" ); if( rr...
5
public int compareTo(Object o) { if (o instanceof User) { User other = (User) o; return other._lowerNick.compareTo(_lowerNick); } return -1; }
1
public void friendsPortalEnter(Player player){ String invitedWorld = plugin.worldInvitation.get(player); if (invitedWorld != null){ String worldN = plugin.getIfMainWorld(invitedWorld); String invitingPlayerName; if (worldN != null){ invitingPlayerName = invitedWorld.substring(worldN.length() + ...
4
public Board(BoardBuilder boardBuilder) { width = boardBuilder.getWidth(); height = boardBuilder.getHeight(); cells = new Cell[getCellCount()]; cellsListView = Collections.unmodifiableList(Arrays.asList(cells)); int numberSum = 0; final int maxNum = 0; for (int x = 0; x < width; ++x) { ...
9
private final String getChunk(String s, int slength, int marker) { StringBuilder chunk = new StringBuilder(); char c = s.charAt(marker); chunk.append(c); marker++; if (isDigit(c)) { while (marker < slength) { c = s.charAt(marker...
5
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; User other = (User) obj; if (id != other.id) return false; return true; }
4
public static void main(String[] args) { System.out.println(keyboard.length()); final GuitarString[] strings = new GuitarString[37]; for(int i = 0; i < strings.length; i++){ strings[i] = new GuitarString(440.0 * Math.pow(2.0, (i - 24.0) / 12.0)); // System.out.println(440.0 * Math.pow(2.0, (i - 24.0) / 12....
5
public void run() { jTextArea.append("Starting Server Side Socket On Port 27331: "); try{ sslserverSocket = (SSLServerSocket) javax.net.ssl.SSLServerSocketFactory.getDefault().createServerSocket(port); //sslserverSocket.setEnabledCipherSuites(sslserverSocket.getEnabledCipherSuites()); } catch (IOException ...
9
public boolean equals(Object other) { if(other == null) return false; if(other == this) return true; if(!(other instanceof Parameter)) return false; Parameter otherParam = (Parameter) other; return otherParam.key.equals(key) && otherParam.value.equals(value); }
4
public static void main(String[] args) throws IOException { logger = Logger.getLogger("MCListener"); logger.setUseParentHandlers(false); Handler handler = new ConsoleHandler(); handler.setFormatter(new LogFormatter()); logger.addHandler(handler); try { loadConfig(); } catch(IOException e) { ...
6
public char readChar() throws java.io.IOException { if (inBuf > 0) { --inBuf; if (++bufpos == bufsize) bufpos = 0; return buffer[bufpos]; } if (++bufpos >= maxNextCharInd) FillBuff(); char c = buffer[bufpos]; UpdateLineColumn(c); return c; }
3
@SuppressWarnings("static-access") @Override public void run(String[] args) { Options options = new Options(); options.addOption(OptionBuilder .withLongOpt("train") .isRequired() .withArgName("filename") .hasArg() .withDescription( "Filename prefix with training dataset. It must " ...
9
public void test4() { if (b) ; else if (b || (new Integer(i)).toString().contains("Whatever") && new Double(d).compareTo(new Double(5.0)) > 55 || !(i >> 2 > 0) && (new String()) instanceof Object) ; else ; }
6
public MessUndefined(int date, int id, int taille) { super(date, id, taille); }
0
private void handleUpdate() { // We can simplify this when we move more methods into the Preference Interface. if (pref instanceof PreferenceInt) { PreferenceInt prefInt = (PreferenceInt) pref; prefInt.setTmp(field.getText()); field.setText(String.valueOf(prefInt.tmp)); } else if (pref instanceof Prefere...
2
private void resize(int capacity) { Key[] temp = (Key[]) new Comparable[capacity]; for (int i = 0; i <= N; i++) { temp[i] = pq[i]; } this.pq = temp; }
1
public boolean isCellEditable(int row, int col) { //Note that the data/cell address is constant, //no matter where the cell appears onscreen. if ((col > 0) && tableData[row][col]!=null && row < tableRows-1) { return true; } else if(tableData[row][col] == null &...
6
@Override public void tick() { ticks++; x += r.nextInt(2); y += r.nextInt(2); if (x < -0 || y < 0 || x >= game.getScaledWidth() || y >= game.getScaledHeight()) { x = r.nextInt(game.getScaledWidth()); y = 0; } }
4