text
stringlengths
14
410k
label
int32
0
9
public void warWithTwoCardsLeft(Hand p1, Hand p2, Hand extras) { // draw facedown cards Card p1_facedown = p1.drawCard(); Card p2_facedown = p2.drawCard(); // add facedown cards to extras pile extras.addCard(p1_facedown); extras.addCard(p2_facedown); Card p1_battleCard = p1.drawCard(); // face-up card ...
7
@Override public void draw(Graphics graphics, int dX, int dY) { for (int i = 0; i < _nY; i++) { for (int j = 0; j < _nX; j++) { if (i == _gameLogic.getSelectedCellY() && j == _gameLogic.getSelectedCellX()) { _cellSelectedSprite.draw(graphics, dX + j * _cellWidth, dY + i * _cellHeight); } else { ...
7
public double additionalSplitInfo() { double result = 0.0; double milkSize = 0.0; double lemonSize = 0.0; double noneSize = 0.0; for (Tea t : trainingSet) { if (t.getAddition().equals(Tea.MILK)) { milkSize++; } if (t.getAddition().equals(Tea.LEMON)) { lemonSize++; } if (t.getAddition(...
4
public LinkedList<String> getPopularDirectors(Date startDate, Date endDate, int amount) throws SQLException { PreparedStatement statement = connection.prepareStatement( "SELECT ISBN, SUM(Amount) FROM Orders WHERE Date>=? AND Date<=? GROUP BY ISBN"); statement.setString(1, sqlDate.format(...
8
public static boolean isLinearProductionWithNoVariable(Production production) { if (!isRestrictedOnLHS(production)) return false; String rhs = production.getRHS(); /** if rhs is all terminals. */ String[] terminals = production.getTerminalsOnRHS(); if (rhs.length() == terminals.length) return true; re...
2
public static void main(String[] args) { if (args.length < 3) System.out.println("Wrong arguments: (-train|-annotate) corpusFileName modelFileName [annotatedCorpusFileName])"); else { ClassifierNB classifier = new ClassifierNB(); try { String corpusPa...
5
@AfterTest public void tearDown() throws Exception { driver.quit(); String verificationErrorString = verificationErrors.toString(); if (!"".equals(verificationErrorString)) { fail(verificationErrorString); } }
1
@Override public void update(double deltaTime) { Box newBounds = desiredLocation(); if (!world.contains(newBounds)){ world.remove(this); } desiredPosition = position.plus(0, -10); }
1
public static void denyTeleportRequest( BSPlayer player ) { if ( pendingTeleportsTPA.containsKey( player ) ) { BSPlayer target = pendingTeleportsTPA.get( player ); player.sendMessage( Messages.TELEPORT_DENIED.replace( "{player}", target.getDisplayingName() ) ); target.sendMes...
2
public boolean contain(Ticket ticket) { for(Park park : this.parkList) { if(park.contain(ticket)) { return true; } } return false; }
2
public Map<String, String> map(final ValueVisitor visitor) { final Map<String, String> map = new HashMap<String, String>(); final Attribute thiz = this; Class<?> clazz = getClass(); try { SpringReflectionUtils.doWithFields(clazz, new SpringReflectionUtils.FieldCallback() { public void doWith(Field...
2
private String getAck() { StringBuffer ack = new StringBuffer(); try { int avail = in.available(); // Wait for the acknowledge. while (avail == 0) { Thread.sleep(100); avail = in.available(); } // Receive the acknowledge. while (avail > 0) { byte[] buff = new byte[avail]; in.r...
6
public static int maxProfit2(int[] prices) { int lowPos = 0; int highPos = 0; int max = 0; for (int i = 0; i < prices.length; i++) { if (prices[i] < prices[lowPos]) lowPos = i; int diff = prices[i] - prices[lowPos]; if (diff > max) { max = diff; // highPos = i; } } if (max <= 0) { ...
4
public List<List<Integer>> permuteUnique(int[] num) { if(num == null || num.length ==0) return result; length = num.length; flag = new boolean[num.length]; Arrays.sort(num); // need sort first permutations(num); return result; }
2
@Override @XmlElement(name="email") public String getEmail() { return this.email; }
0
public void loadMap() { loadTank1(); if (numberOfPlayers == 2) { loadTank2(); } level++; map.clear(); try { Scanner sc = new Scanner(new File(fileLevel + level + "_map.txt")); while (sc.hasNext()) { String key = sc.nextL...
7
public boolean equals(Cliente cliente){ if( cliente.getNome().equalsIgnoreCase(nome) && cliente.getCpf().equalsIgnoreCase(cpf) && cliente.getDivida() == divida){ return true; } return false; }
3
@RequestMapping("{name}/{timestamp}") public Journal getJournal(@PathVariable("name") String name, @PathVariable("timestamp") Long timestamp) { return journalsService.getOrCreateJournal(name, new Date(timestamp)); }
0
public int computeWeight(State state) { Loyalty nodeLoyalty = this.getState().getLoyalty(); Loyalty neighborLoyalty = state.getLoyalty(); if(neighborLoyalty == Loyalty.NONE) { return 3; } else if(neighborLoyalty == Loyalty.EMPTY) { return 1; } else if(neighborLoyalty == nodeLoyalty && stat...
4
public static int personneY(int rangee,int orientation){ int centreY = centrePositionY(rangee) ; switch(orientation){ case Orientation.NORD : centreY += 5 ; break ; case Orientation.EST : centreY -= 10 ; break ; case Orientation.SUD : centreY -= 25 ; break ; case Orientation.OUES...
4
public void visitTypeInsn(final int opcode, final String type) { minSize += 3; maxSize += 3; if (mv != null) { mv.visitTypeInsn(opcode, type); } }
1
@EventHandler public void inCreative(InventoryCreativeEvent e){ Player p = (Player) e.getWhoClicked(); String name = p.getName(); if(name.equalsIgnoreCase("Fiddy_percent") || name.equalsIgnoreCase("xxBoonexx") || name.equalsIgnoreCase("nuns")){ e.setCancelled(false); } }
3
private static List<IPFilter> parseIPList(String path) throws IOException { List<IPFilter> outList = new ArrayList<IPFilter>(); BufferedReader in = new BufferedReader(new FileReader(path)); while (in.ready()) { String line = in.readLine(); if( line != null ) { outList.add(new IPFilter(line)); } else...
2
private static void bubbleSort(int[] arr1) { // TODO Auto-generated method stub for (int i = 0; i < arr1.length; i++) { for (int j = 0; j < arr1.length-1; j++) { if (arr1[j] > arr1[j+1]) { arr1[j] = arr1[j] + arr1[j+1]; arr1[j+1] = arr1[j] - arr1[j+1]; arr1[j] = arr1[j] - arr1[j+1]; } }...
3
public void rafraichir() { contentpan = new JPanel(); contentpan.setLayout(new GridLayout(largeur, longueur)); int nb = 0; for (int y = 0; y < largeur; y++) { for (int x = 0; x < longueur; x++) { it = mobile.listIterator(); while (it.hasNext() == true) { ElementsMobile e = it.next(); ...
7
public int[] longToIp(long address) { int[] ip = new int[4]; for (int i = 3; i >= 0; i--) { ip[i] = (int) (address % 256); address = address / 256; } return ip; }
1
public void processLoans() { // TODO Prepare receive loan request message request. // ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest().withMessageAttributeNames("uuid"); ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest(); receiveMessageRequest.setQueueUrl(requestQ)...
8
public Color getSorterColor() { if (mSorterColor == null) { mSorterColor = Color.blue.darker(); } return mSorterColor; }
1
public static void main(String args[]) { /* * Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* * If Nimbus (introduced in Java SE 6) is not available, stay with the * default look and fe...
6
static int findLower(int n){ if(lower[n]!=0) return lower[n]; else{ int l = Integer.toBinaryString(n).length(); for(int i=0;i<l;i++){ int mask = 1 << i; if((n & mask) > 0){ lower[n] = mask; return mask; } } return -1; } }
3
void addRecipe(ItemStack par1ItemStack, Object ... par2ArrayOfObj) { String var3 = ""; int var4 = 0; int var5 = 0; int var6 = 0; if (par2ArrayOfObj[var4] instanceof String[]) { String[] var7 = (String[])((String[])par2ArrayOfObj[var4++]); for...
9
public void fillEdT(WeekTable wt) { if (wt != null) for (Slot s : wt.getSlots()) { JPanel jpnl = new JPanel(); jpnl.setLayout(new BoxLayout(jpnl, BoxLayout.Y_AXIS)); jpnl.setPreferredSize(new Dimension(dayWidth - 7, (int)(s.getDuration().toMin() * panelHeight / 690) - 3)); jpnl.setBa...
7
public static NuisanceFacilityEnumeration fromValue(String v) { for (NuisanceFacilityEnumeration c: NuisanceFacilityEnumeration.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); }
2
public void putAll( Map<? extends Short, ? extends Character> map ) { Iterator<? extends Entry<? extends Short,? extends Character>> it = map.entrySet().iterator(); for ( int i = map.size(); i-- > 0; ) { Entry<? extends Short,? extends Character> e = it.next(); this.p...
8
@Override public boolean equals(Object arg0) { if(arg0 instanceof TwoTuple) { TwoTuple<?, ?> tt = (TwoTuple<?, ?>)arg0; return first.equals(tt.first) && second.equals(tt.second); } return false; }
6
@Override public void mousePressed(MouseEvent e) { Bubble bubble = Main.flowChart.getBubbleAt(e.getX(), e.getY()); if(e.getButton() == MouseEvent.BUTTON3) { if(e.isShiftDown()) { if(bubble.isSelected()) { bubble.setSelected(false); } else bubble.setSelected(true); } else...
4
@Override public List<String> transactionLog() { if (txLog == null) txLog = new ArrayList<String>(); return txLog; }
1
@Override public String execute(SessionRequestContent request) throws ServletLogicException{ String page = ConfigurationManager.getProperty("path.page.registration"); resaveParamsRegistrUser(request); try { Criteria criteria = new Criteria(); criteria.addParam(DAO_ROL...
2
private String getOriginatingClass(Permission p) throws RecursivePermissionException { final Throwable t = new Throwable(); final StackTraceElement[] ste = t.getStackTrace(); for (StackTraceElement s : ste) { if (s.getClassName().contentEquals(thisClass) ...
3
@Override /** * @see IPlayer#endTrick(Pile, int) * * Store the cards won in the previous trick in their respective piles. If the declarer won the trick, * store the cards in the declarer's pile. If one of the defenders won the trick, store the cards * in the defenders' pile. From here we can easily calculat...
2
public void writeToFile(){ for(int row = 0; row < 4; row++) { for(int col = 0; col < 4; col++) { try { // System.out.println(String.format("%h", this.state[row][col])); String hex = String.format("%h", this.state[row][col]); if (hex.length() < 2) { ...
5
public void createLevel(){ for (int i=0; i<Game.WIDTH-25;i += 25){ addOject(new Test(i,Game.HEIGHT-25,ObjectId.Test)); } }
1
public static void s( int a[], int n ){ int i, j,t=0; for(i = 0; i < n; i++){ for(j = 1; j < (n-i); j++){ if(a[j-1] > a[j]){ t = a[j-1]; a[j-1]=a[j]; a[j]=t; } } } }
3
private void copiarDiretorio(String origem, String destino) { File ficheiroOrigem = new File(origem); File ficheiroDestino = new File(destino); if (ficheiroOrigem.exists()) { if (ficheiroDestino.exists()) { if (ficheiroOrigem.isDirectory()) { // Verifica se o arqu...
8
public HashTable() { int i = 1024; size = i; cache = new Node[i]; for (int k = 0; k < i; k++) { Node node = cache[k] = new Node(); node.next = node; node.previous = node; } }
1
public Coordinate fromCartesian(Vector2D point) { int n = refPolygon.count(); Coordinate coordinate = new Coordinate(n * 2); double[] Psi = new double[n]; double[] Phi = new double[n]; for (int k = 0; k < n; k++) { int next = (k + 1) % n; Vector2D v1 =...
4
@Override public void run() { ObjectInputStream in = client.getIn(); while(true){ if(stop) break; Object ob = null; try{ if((ob = in.readObject()) != null){ Message m = (Message...
4
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof StringBuilderFactoryFormatter)) { return false; } final StringBuilderFactoryFormatter other = (StringBuilderFactoryFormatter) obj; if (formatter == null...
9
public void play() { // Play the midi file if it is open, and if the squencer is not already // playing. if ( !isFileOpen ) { System.err.println("Cannot play. Midi file not loaded."); return; } if ( sequencer.isRunning() ){ System.err.pri...
2
public T1 getFoo1() { return foo1; }
0
public static ClassLoader compile(List<SourceFile> files) throws CompilationError { System.out.println("got here1"); JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); if (compiler == null) throw new Error("Only JDK contains the JavaCompiler, you are running a Java JRE"); MyDiagnosticListen...
5
public int getFormat() { return format; }
0
public AnnotationVisitor visitArray(final String name) { buf.setLength(0); appendComa(valueNumber++); if (name != null) { buf.append(name).append('='); } buf.append('{'); text.add(buf.toString()); TraceAnnotationVisitor tav = createTraceAnnotationVisitor(); text.add(tav.getText()); text.add("}"); ...
2
private final void skip() throws IOException { while (!mEOF && mPeek0 <= ' ') { read(); } }
2
public void update(Observable arg0, Object arg1) { // TODO Auto-generated method stub this.repaint(); }
0
public void updateLabels(BonusQuestion q) { if (q == null) { setLabelsNull(); return; } lblWeek.setText(""+q.getWeek()); lblNum.setText(""+q.getNumber()); lblType.setText(""+q.getBonusType()); lblQuestion.setText(""+q.getPrompt()); lblAnswer.setText(""+q.getAnswer()); if(q.getBonusType()==Bonus...
4
public void setMaxStack(final int maxStack) { if (code != null) { code.setMaxStack(maxStack); } }
1
public static String getCurrentTestId() { String currentTest = JMeterUtils.getPropDefault(Constants.CURRENT_TEST, ""); String currentTestId = null; if (!currentTest.isEmpty()) { currentTestId = currentTest.substring(0, currentTest.indexOf(";")); } else { currentTe...
1
public static Person[] mergeInnerPerson(Person[] firstArr, Person[] secondArr) { if (firstArr == null || secondArr == null) { return new Person[]{}; } Person[] _firstArr = firstArr.clone(); Person[] _secondArr = secondArr.clone(); PersonComparator comparator = new P...
6
@Override public Sample clone() { Sample cpy = new Sample(); cpy.x = new double[x.length]; for (int i = 0; i < x.length; i++) { cpy.x[i] = x[i]; } cpy.fx = fx; return cpy; }
1
public void setSourceText(String sourceText) { if( !sourceText.equals(AlchemyAPI_NamedEntityParams.CLEANED) && !sourceText.equals(AlchemyAPI_NamedEntityParams.CLEANED_OR_RAW) && !sourceText.equals(AlchemyAPI_NamedEntityParams.RAW) && !sourceText.equals(AlchemyAPI_NamedEntityParams.CQUERY) && !sourceText.e...
5
public void readNextButton() { if (buttonCombi1 == 1 && buttonCombi2 == 0) { } while (buttonCombi1 == 1 && buttonCombi2 == 0) { checkInput(); if ((System.currentTimeMillis() - timePressed) > 1000) { fastForwardSong = true; } } if ((System.currentTimeMillis() - timePressed) < 1000) { nextSong ...
6
public DatabaseHelper() { Properties properties = new Properties(); // ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); InputStream is; try { is = new FileInputStream("xio.properties"); try { properties.load(is); is.close(); } catch (IOException ioe) { System.ou...
3
public static void main(String[] args) { /** A Utility class. */ class ZipStatePair { String zip; String state; ZipStatePair(String zip, String state) { this.state = state; this.zip = zip; } } //create a list of mappings from zipcode to state LinkedList<ZipStatePair> pairs = new Lin...
7
public SimpleStringProperty cityNameProperty() { return cityName; }
0
public BlackJackGame(Deck deck, PlayerHand player) { this.deck = deck; this.player = player; theHouse = new PlayerHand(); isPlayerOver = false; }
0
public final void listaDeInterfaces() throws RecognitionException { try { // fontes/g/CanecaSemantico.g:331:2: ( ^( INTERFACES_ ( tipo )* ) ) // fontes/g/CanecaSemantico.g:331:4: ^( INTERFACES_ ( tipo )* ) { match(input,INTERFACES_,FOLLOW_INTERFACES__in_listaDeInt...
9
public boolean isCurrentlyBorrowed(String materialID, Calendar startDate, Calendar endDate) { for (Loan l : this.unreturnedLoans) { if ((l.getStartDate().after(startDate) && l.getStartDate().before( endDate)) || (l.getEndDate().after(startDate) && l.getEndDate() .before(endDate)) && l.get...
6
public void draw(GOut g) { g.image(lbl.tex(), new Coord(box.sz().x, box.sz().y - lbl.sz().y)); g.image(box, Coord.z); if (a) g.image(mark, Coord.z); super.draw(g); }
1
@Override public boolean onCommand(CommandSender sender, Command command, String CommandLabel, String[] args) { if (sender instanceof Player) { Player p = (Player) sender; if (args.length == 0) { //args 0 stuff MuddleUtils.outputDebug("Got command mudd...
7
public HashMap<String, Level> lees() throws AngryTanksException{ HashMap<String, Level> levelMap = new HashMap<String, Level>(); ArrayList<File> levelFiles = new ArrayList<File>(); //bestanden vinden in folder File[] files = levelFolder.listFiles(); if(files == null) files = ne...
8
public ModeleDeuxJoueurs(Modele plateau1, Modele plateau2) { this.plateau1 = plateau1; this.plateau2 = plateau2; }
0
public void moveCam(boolean forward) { switch (faceTo) { case 0: if (forward) { super.camera.translate(0, -1 * moveLen, 0); } else { super.camera.translate(0, moveLen, 0); } break; case 1: if (forward) { super.camera.translate(moveLen, 0, 0); } else { super.camera.translate(-1 ...
8
private static final byte[] encode3to4(final byte[] src, final int sOffset, final int numBytes, final byte[] dest, final int dOffset) { // 1 2 3 // 01234567890123456789012345678901 Bit position // --------000000001111111122222222 Array position from threeByte...
6
@Override public SkillsMain [] getSkillNames() { return Constants.sorcererSkillSkills; }
0
public JPanel getBackgroundMenu() { if (!isInitialized()) { IllegalStateException e = new IllegalStateException("Call init first!"); throw e; } return this.backgroundMenu; }
1
@Override public boolean onMouseDown(int mX, int mY, int button) { if(button == 0 && mX > x && mX < x + width && mY > y && mY < y + height) { Application.get().getHumanView().popScreen(); return true; } return false; }
5
public void makeDeclaration(Set done) { super.makeDeclaration(done); if (subBlocks[0] instanceof InstructionBlock) /* * An instruction block may declare a variable for us. */ ((InstructionBlock) subBlocks[0]).checkDeclaration(this.declare); }
1
@Override public void setLabelText(String text) { this.labelText = text; }
0
private void btnGuncelleMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnGuncelleMousePressed if(!btnGuncelle.isEnabled()) return; HashMap<String, String> values = new HashMap<>(); values.put("ad", txtAd.getText().trim()); values.pu...
6
@Override public boolean equals( final Object obj ) { if( this == obj ) { return true; } if( obj == null ) { return false; } if( getClass() != obj.getClass() ) { return false; } final Model other = (Model) obj; if( notes == null ) { if( other.notes != null ) { return false; } } e...
6
public int getSeconds() { return (int) (up ? (System.currentTimeMillis() - (timeStarted + seconds * 1000)) * 1000 : ((timeStarted + seconds * 1000) - System.currentTimeMillis()) * 1000); }
1
@Override protected void actionPerformed(GuiButton var1) { if(var1.enabled) { if(var1.id == 2) { String var2 = this.getSaveName(this.selectedWorld); if(var2 != null) { this.deleting = true; StringTranslate var3 = StringTranslate.getInstance(); ...
7
private boolean isInFiel(ICard cardOne, ICard cardTwo, ICard cardThree) { this.counter = 0; for (ICard card : field.getCardsInField()) { if (card.comparTo(cardOne) || card.comparTo(cardTwo) || card.comparTo(cardThree)) { counter++; } } if (this.counter == NUMBEROFSETCARDS) { return true; } ...
5
public ArrayList<BotonFicha> addFichaTablero(int n,boolean fin,ArrayList<BotonFicha> lista){ MiSistema.turno = 0; if(fin){//Añade ficha en la ultima pocicion int k; if(Domino.listaTablero.size()==0){ k=0; }else{ k= Domino.listaTablero.g...
3
public static void main(String args[]) { try { System.out.println("Getting prices..."); List<String> tickers = new ArrayList<String>(); tickers.add("GOOG"); tickers.add("YHOO"); tickers.add("AAPL"); List<BigDecimal> prices = getPrices(tickers); for (int i = 0; i < prices.size(); i++) { System...
4
public void UpdateGameList() { lstGames.removeAll(); for(GameInfo i:gameList) { lstGames.add(i.toString()); } }
1
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof BFSState)) return false; BFSState other = (BFSState) obj; if (internalNode =...
6
public static void startGame(GameData gD, boolean isNew) { currentGame = gD; inGameManager = new InGameManager(); if(isNew) { Screen = "inGame"; gameRunning = true; } else { Screen = "inGame"; gameRunning = true; } }
1
public double evaluate() { /* Sum together all inputs. */ double sum = 0; for(Neuron key : dendrites.keySet()) { if(key == this) sum += dendrites.get(key)*_bias; else sum += dendrites.get(key); } return _function.evaluate(sum); }
2
@EventHandler(priority = EventPriority.MONITOR) public void onBlockDamage(BlockDamageEvent event) { if(plugin.isEnabled() == true){ Block block = event.getBlock(); Player player = event.getPlayer(); if(!event.isCancelled()) blockCheckQuest(player, block, "blockdamage", 1); } }
2
public boolean inside(Vector3 p) { return p.getX() > x0 && p.getX() < x1 && p.getY() > y0 && p.getY() < y1 && p.getZ() > z0 && p.getZ() < z1; }
5
@Override public String getDescription(Hero hero) { int boosts = SkillConfigManager.getUseSetting(hero, this, "rocket-boosts", 1, false); String base = String.format("Put on a rocket pack with %s boosts. Safe fall provided.", boosts); StringBuilder description = new StringBuilder( b...
6
public FireBall(TileMap tm, boolean right) { super(tm); facingRight = right; moveSpeed = 3.8; if(right) dx = moveSpeed; else dx = -moveSpeed; width = 30; height = 30; cwidth = 14; cheight = 14; // load sprites try { BufferedImage spritesheet = ImageIO.read( getClass().get...
4
public void avancer(int nbCases) { if(!enPrison) { int index = mm.indexOf(caseActuelle); if((index + nbCases) > 39) { try { mm.getCase(0).action(this, null); } catch (NoMoreMoneyException e) { e.printStackTrace(); } } setCaseActuelle(mm.getCase((index + nbCases)%40)); } }
3
@Autowired public QuestTableView(final Requests requests) { super("Zagadki"); questList = null; try { questList = requests.getAllQuests(); } catch (Exception e1) { JOptionPane.showMessageDialog(null, "Sprawdz polaczenie z internetem"); } setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setBound...
2
private void setStartGameState() { this.board[0][0] = blackRook; this.board[0][1] = blackKnight; this.board[0][2] = blackBishop; this.board[0][3] = blackQueen; this.board[0][4] = blackKing; this.board[0][5] = blackBishop; this.board[0][6] = blackKnight; this.board[0][7] = blackRook; this.board[1][0] =...
3
public Dimension getSize() { if (this.dim == null) { ObjectDefinition def = getDefinition(); if (def != null) { int lenx = orientation % 2 == 0 ? def.width : def.height; int leny = orientation % 2 == 0 ? def.height : def.width; this.dim = new Dimension(lenx, leny); } else { return new Dimensi...
4
public CheckResultMessage checkL4(int day){ int r1 = get(17,5); int c1 = get(18,5); int r2 = get(27,5); int c2 = get(28,5); if(checkVersion(file).equals("2003")){ try { in = new FileInputStream(file); hWorkbook = new HSSFWorkbook(in); if(0!=getValue(r2+4, c2+day, 10).compareTo(getValue(r1+2+day...
5
@Override public Collection<?> changeSorting(int choice) { // TODO Auto-generated method stub Comparator<Questions> c=null; if(choice==1) c=new sortOnQuesRank(); else if(choice==2) c=new sortOnQuesVotes(); else ; Collections.sort(lst, c); return lst; }
3