text
stringlengths
14
410k
label
int32
0
9
public boolean startTurn(int day) { Iterator<Castle> i = castles.iterator(); while (i.hasNext()) { Castle c = i.next(); if (c.getColor() != color) { i.remove(); } } return false; }
2
public EasyDate endOf(int field) { switch (field) { case Calendar.YEAR: calendar.set(Calendar.MONTH, 11); case Calendar.MONTH: calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH)); case Calendar.DAY_OF_MONTH: calendar.set(Calendar.HOUR_OF_DAY, 23); case Calendar.HOUR_...
6
public static void main(String[] args){ String kod = null; int[][] tabla = new int[8][3]; sc = new Scanner( System.in ); while( true ) { System.out.println("Játék indítasa : 1"); System.out.println("Játék szabály : 2"); System.out.println("Kilépés : 3"); logger.info( "Játék indul, választás ...
4
@Override public boolean accept(File dir, String name) { try{ if (name.substring(name.lastIndexOf(".")).equalsIgnoreCase(".dat")) return true; } catch (Exception e){ System.err.println("Exception caught: " + e); } return false; }
2
public void close(){ try{ if(in!=null)in.close(); if(out!=null)out.close(); if(socket!=null)socket.close(); } catch(Exception e){ } in=null; out=null; socket=null; }
4
private static void updateTexturePacks () { for (int i = 0; i < texturePackPanels.size(); i++) { if (selectedTexturePack == i) { String packs = ""; if (TexturePack.getTexturePack(getIndex()).getCompatible() != null) { packs += "<p>This texture pack...
5
private boolean suitMoveIsValid(Card.Suit from, Card.Suit to) { switch (to) { case HEARTS: return from != Card.Suit.DIAMONDS; case DIAMONDS: return from != Card.Suit.HEARTS; case CLUBS: return from != Card.Suit.SPADES; ...
4
@Override public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if(cmd.getName().equalsIgnoreCase("killall")){ if(sender instanceof Player){ Player p = (Player) sender; if(p.isOp() || p.hasPermission("scmds.killall")){ for(Entity entity : p.getNearbyEntities(2000,...
9
private void check (int [ ] array1, int [ ] array2) { assertTrue (array1.length == array2.length); for (int k=0; k<array1.length; k++) { assertTrue (array1[k] == array2[k]); } }
1
public void deleteActor(long id) { if(actors.get(id) != null) { actors.get(id).destroy(); actors.remove(id); } }
1
protected JComponent makeTextPanel(String text) { JPanel panel; if(text.equals("Open tickets")){ panel = new TicketOverview(); } else if(text.equals("Solutions")){ //panel = new QAThesaurusView(); panel = new JPanel(false); JLabel filler = new JLabel(text); ...
2
public static void main( String[] args ) throws IOException { JFrame frame = new JFrame(); frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); frame.setBounds( 20, 20, 800, 600 ); final UmlDiagramRepository repository = UmlDiagramRepository.createDefaultRepository(); repository.getConfiguration().getCo...
1
public Dimension getPreferredSize() { if (image != null) { return new Dimension(image.getWidth(), image.getHeight()); } return super.getPreferredSize(); }
1
public void getStarGraph(mxAnalysisGraph aGraph, int numVertices) { if (numVertices < 4) { throw new IllegalArgumentException(); } mxGraph graph = aGraph.getGraph(); Object parent = graph.getDefaultParent(); Object[] vertices = new Object[numVertices]; for (int i = 0; i < numVertices; i++) { ...
3
public double magnitudeSquared() { double doubleA = a.doubleValue(); double doubleB = b.doubleValue(); return doubleA * doubleA + doubleB * doubleB; }
0
public List<Token> tokenize(final InputStream stream) throws IOException { LineColumnReader reader = new LineColumnReader(new InputStreamReader(stream)); List<Token> tokens = new LinkedList<Token>(); try { while (reader.ready()) { int c = reader.read(); if (Character.isWhitespace(c)) { ...
7
public void testConstructorEx5_TypeArray_intArray() throws Throwable { try { new Partial(new DateTimeFieldType[] {DateTimeFieldType.dayOfYear()}, new int[2]); fail(); } catch (IllegalArgumentException ex) { assertMessageContains(ex, "same length"); } }
1
private void readPinNames(HDLTokenizer input, int partNumber, String partName) throws HDLException { boolean endOfPins = false; // read pin names while (!endOfPins) { // read left pin name input.advance(); if (!(input.getTokenType() == HDLTokenizer.TYPE_...
9
protected static void exportOutlinerDocument(OutlinerDocument document, FileProtocol protocol) { // We need to swap in a new documentSettings object so that the changes don't carry over // to the open document, but are conveyed to the export. We'll put the real object back // when we're done. DocumentSettings o...
4
public LinkedList<FaultsStore> getFaults(){ LinkedList<FaultsStore> psl = new LinkedList<FaultsStore>(); Connection Conn; FaultsStore ps = null; ResultSet rs = null; try { Conn = _ds.getConnection(); } catch (Exception et) { System.out.println("No Connection in Faults Model"); return null; } ...
7
public void update(){ if(active){ curTime++; if(curTime>duration){ active = false; curTime = 0; curCooldown = cooldown; } } if(curCooldown>0){ curCooldown--; } }
3
public Object parseValue(String value) throws NumberFormatException, ParseException { switch(type){ case("int"): return Integer.valueOf(value); case("string"): return value; case("float"): return Float.valueOf(value); case("date"): return dateFormatter.parse(value); default: return null; } }
4
public void connect() { if (connection != null) { throw new IllegalStateException("Already connected!"); } try { Class.forName("com.mysql.jdbc.Driver"); connection = DriverManager.getConnection("jdbc:mysql://" + host + "/" + database + "?useUnicode=true&characterEncoding=utf-8", user, password); ...
3
@Override public void run() { while (true) { Packet packet = null; try { packet = queue.take(); } catch (InterruptedException e) { e.printStackTrace(); } if ( packet.isFormat() ) { while (queue.size() < 100 ) try { Thread.sleep(1); } catch (InterruptedException e) { ...
9
@Override public double evaluate(int[][] board) { int r = 0; for (int i = 0; i < board.length; i++) { for (int j = 0; j < board[i].length; j++) { if (board[i][j] != 0) { if (blocked(i, j, board)) { r++; } ...
4
public YamlPermissionBase(String n, ConfigurationSection config) { name = n; yamlConfiguration = config; }
0
private void send() { int maxAttemps = 5, cnt = 0; while (cnt < maxAttemps) { Node nextNode = null; boolean initiator = false; try { nextNode = RoutingManager.nextNode(packet); if (isNodeInitiator(nextNode)) { initi...
5
public static ContactLocation convertLocationToType(String loc) { if (loc.equalsIgnoreCase("DC")) return ContactLocation.DIALLED_CALLS; else if (loc.equalsIgnoreCase("MC")) return ContactLocation.MISSED_CALLS; else if (loc.equalsIgnoreCase("ME")) return ContactLocation.PHONE_ENTRIES; else if (loc.equalsIgnoreC...
5
public static String toCamel(final String... string) { StringBuilder builder = new StringBuilder(100); if ((string != null) && (string.length > 0)) { for (int i = 0; i < string.length; i++) { String part = string[i]; if (!isEmpty(part)) { part = part.trim().toLowerCase(); builder.append(part.su...
5
final NPCComposite method1149() { int j = -1; if (anInt2099 == -1) { if (anInt2077 != -1) { j = Class21.settings[anInt2077]; } } else { j = Class142_Sub27_Sub14.method1892(anInt2099); } if (~j > -1 || j >= -1 + anIntArray2085.le...
6
private String startSetToString() { StringBuffer FString = new StringBuffer(); boolean didPrint; if (m_starting == null) { return getStartSet(); } for (int i = 0; i < m_starting.length; i++) { didPrint = false; if ((m_hasClass == false) || (m_hasClass == true && i ...
7
public void testConstructor_ObjectStringEx4() throws Throwable { try { new TimeOfDay("1970-04-06T10:20:30.040+14:00"); fail(); } catch (IllegalArgumentException ex) {} }
1
public void fusionWithDarkenFullAlpha(CPLayer fusion, CPRect rc) { CPRect rect = new CPRect(0, 0, width, height); rect.clip(rc); for (int j = rect.top; j < rect.bottom; j++) { int off = rect.left + j * width; for (int i = rect.left; i < rect.right; i++, off++) { int color1 = data[off]; int alpha1 =...
6
private void btnImprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirActionPerformed // Codigo de imprimir int a = panelGeneral.getSelectedIndex(); Imprimir imp; try { if (a == 0) { imp = new Imprimir(this); } else ...
3
@Override public int getBrewButtonStatus() { return brewButtonStatus; }
0
public void setPrice(String price) { this.price = price; }
0
public static void main(String[] args) { // Methods in Comparator List<Person> people = new ArrayList<>(); people.sort( Comparator.comparing(Person::getLastName) .thenComparing(Person::getFirstName) .thenComparing( ...
1
public void insert_aswrange(final Swizzler indswz) { final Iterator iter = CFG.preds(indswz.phi_block()).iterator(); while (iter.hasNext()) { final Block blk = (Block) iter.next(); if (!indswz.phi_block().dominates(blk)) { final SRStmt aswrange = new SRStmt((Expr) indswz.array() .clone(), (Expr) ind...
3
private void render() { BufferStrategy bs = this.getBufferStrategy(); if (bs == null) { this.createBufferStrategy(3); return; } Graphics g = bs.getDrawGraphics(); Graphics2D g2d = (Graphics2D) g; if (state == STATE.MENU) { menu.render(...
8
void setLayoutData () { Control [] children = layoutComposite.getChildren (); TableItem [] items = table.getItems (); GridData data; int hSpan, vSpan, hIndent, vIndent; String vAlign, hAlign, vGrab, hGrab, exclude; for (int i = 0; i < children.length; i++) { data = new GridData (); /* Set widthHint an...
7
@Override public List<Edge<N>> edgesFrom(N... fromList) { LinkedList<Edge<N>> list = new LinkedList<Edge<N>>(); if(fromList.length == 1) { N from = fromList[0]; if(containsNode(from)) { list.addAll(nodes.get(from)); } } else if(fromList.length > 1) { for(int i = 0; i < fromList.length; i++) { ...
4
public char read() throws IOException { if (isPriorEndLine) { lineno++; position = -1; nextLine = source.readLine(); if(nextLine!= null) sourceText.add(nextLine); // debug statement /* if (nextLine != null) { Sys...
5
public String getNewick(boolean bl) { StringBuffer ret = new StringBuffer(""); for (int i = 0; i < this.getChildCount(); i++) { if (i == 0) { ret.append("("); } ret.append(this.getChild(i).getNewick(bl)); if (bl) { double branchLength = this.getChild(i).getBL(); if (branchLength == 0) ...
6
public Builder mergeImage(protocols.ChatProtocol.Image value) { if (imageBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && image_ != protocols.ChatProtocol.Image.getDefaultInstance()) { image_ = protocols.ChatProtocol.Image.newBuilder(image_)....
3
public final synchronized byte readByte(){ this.inputType = true; String word=""; byte bb=0; if(!this.testFullLineT) this.enterLine(); word = nextWord(); if(!eof)bb = Byte.parseByte(word.trim()); return...
2
@Override public void sort(T[] a, int lo, int hi) { // Sort a[] into increasing order. boolean sorted = false; for (int i = lo ; i <= hi && !sorted; i++) {// Bubble the i'th smallest element up if the array is still unsorted sorted = true; for (int j = hi ; j > i; j--) if (less(a[j], a[j - 1])...
4
@Override public void adjust() { CloseHandler handler = getTarget(CloseHandler.class); setEnabled(handler != null ? handler.mayAttemptClose() : false); }
1
private List<List<String>> splice(String text) { List<List<String>> lines = new ArrayList<List<String>>(); List<String> line = new ArrayList<String>(); int len = 0; StringTokenizer st = new StringTokenizer(text, " "); while (st.hasMoreTokens()) { String word = st.nextToken(); if ((len...
7
private void addGuestToBookingButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addGuestToBookingButtonActionPerformed boolean addGuestSuccess; Booking currentBooking = ctr.getCurrentBooking(); if (currentBooking != null && guestJList2.getSelectedValue() != null) { ...
5
public int getBid(Letter bidLetter, ArrayList<PlayerBids> playerBidList, ArrayList<String> playerList, SecretState secretState) { // Keep track of how many players have exactly 6 letters int sixLetterCount = 0; // Defense factor is to prevent other players from bidding high // but getting letters cheaply ...
7
public void init() { // remplir une première fois la grille while (game.fillGrid()); // enlever les alignements existants while (removeAlignments()) { while (game.fillGrid()); } }
3
private boolean isPlayerKingInCheckFromPieceHorizontallyLeft() { for (int j=playerKingPiece.pieceColumn - 1; j>=1; j--){ BoardSquare boardSquare = chessBoard.getBoardSquare(playerKingPiece.pieceLine, j); if (boardSquare.containsBoardPiece()){ if (j==playerKingPiece.pieceColumn-1){ if (boardSquare.conta...
5
private void deleteRequest(HttpExchange he) throws IOException { try { InputStreamReader isr = new InputStreamReader(he.getRequestBody(), "UTF-8"); BufferedReader br = new BufferedReader(isr); String jsonInput = br.readLine(); String path = he.getRequestURI().get...
2
private void initKeys() { inputManager.addMapping("down", new KeyTrigger(KeyInput.KEY_W)); inputManager.addMapping("up", new KeyTrigger(KeyInput.KEY_S)); inputManager.addMapping("left", new KeyTrigger(KeyInput.KEY_A)); inputManager.addMapping("right", new KeyTrigger(KeyInput.KEY_D)); inputManager.addMapping(...
2
public double getFMeasure(int idx) { if (idx == 0){ return statistic[idxIDrefsFMeasure]; }else if (idx == 1){ return statistic[idxFEsFMeasure]; }else if (idx == 2){ return statistic[idxIDrefsNIFMeasure]; }else{ return -1.0; } }
3
private void evalArrayLoad(Type expectedComponent, Frame frame) throws BadBytecode { Type index = frame.pop(); Type array = frame.pop(); // Special case, an array defined by aconst_null // TODO - we might need to be more inteligent about this if (array == Type.UNINIT) { ...
3
public static void start() { /* 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 feel. * For details see http://download.ora...
6
public void init(generated.Cards XMLcards) { if (XMLcards == null) throw new NullPointerException("XMLcards is null"); // init "go to" cards generated.Gotos XMLgotos; if (_type == SURPRISE) { XMLgotos = XMLcards.getSurprises().getGotos(); ...
7
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ThumbsUpPK that = (ThumbsUpPK) o; if (accountId != that.accountId) return false; if (replyId != that.replyId) return false; return tru...
5
public Object get(String key) { return symbols.get(key).getValue(); }
0
@Override public boolean isInCombat() { if (victim == null) return false; try { final Room vicR = victim.location(); if ((vicR == null) || (location() == null) || (vicR != location()) || (victim.amDead())) { if ((victim instanceof StdMOB) && (((StdMOB) victim).victim == this)) victim.setVic...
8
public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); n = Integer.parseInt(st.nextToken()); m = Integer.parseInt(st.nextToken()); s = new String[n...
9
public void update() { for (int x = 0; x < Standards.CHUNK_SIZE; x++){ for (int y = 0; y < Standards.CHUNK_SIZE; y++){ contents[x][y].update(); } } }
2
@Override public Complex product(final Complex factor) { if (factor == null) throw new NullPointerException("The factor is not properly specified."); if (Complex.isNaN(factor) || Complex.isNaN(this)) return Complex.NaN; if ((Complex.isInfinite(factor) && Complex.isOri...
9
public ExponentialDialog(final Panel panel) { setTitle("Exponential"); setBounds(1, 1, 400, 150); Dimension size = getToolkit().getScreenSize(); setLocation(size.width/3 - getWidth()/3, size.height/3 - getHeight()/3); this.setResizable(false); setLayout(null); JPanel paramPanel = new JPanel(); paramPan...
3
public static int lenghtUnitStringToIndex(String unit) { switch (unit) { case "m": return 0; case "ft": return 1; case "mm": return 2; case "cm": return 3; case "km": retu...
7
public void click(Point point, Object source) { if (ca.getMode() == EditorMode.NODE) { Point p = new Point(point); p.x += getX(); p.y += getY(); if (pathContainer_.contains(p) || path_.contains(p)) { father_.deselectAll(); requestFocus(); selected_ = true; repaint(); return; } else ...
6
@Override public String toString() { //return "TDS{" + "listeBloc=" + listeBloc + ", num_bloc=" + num_bloc + ", num_imbrication=" + num_imbrication + ", actuelle=" + region_actuelle + '}'; String str=""; Region r; Entree e; Symbole s; for(Entry ent : listeBloc.entrySe...
2
@Override public void unInvoke() { // undo the affects of this spell if(!(affected instanceof MOB)) return; final MOB mob=(MOB)affected; super.unInvoke(); if(canBeUninvoked()) if((mob.location()!=null)&&(!mob.amDead())) { final Room R=mob.location(); if((R.domainType()==Room.DOMAIN_INDOORS...
8
private boolean isWithinAccLimit(String ipaddress) { int limit = plugin.getConfig().getInt("registration.account-limit"); if (limit < 1 || xPermissions.has(player.getPlayer(), "xauth.bypass.acclimit")) return true; int count = 0; Connection conn = plugin.getDbCtrl().getConnection(); PreparedStatement ps =...
4
public boolean equals(Object x) { if(!(x instanceof Entry)) return(false); T[] a = arr.get(); if(a == null) return(false); Entry<?> e = (Entry<?>)x; Object[] ea = e.arr.get(); if(ea == null) return(false); if(ea.length != a.length) return(false); for(int i = 0; i < ...
8
public Gui() { setBackground(new Color(0,50,100)); addMouseMotionListener(this); addMouseListener(this); addKeyListener(this); for(int eks=0; eks<list.length; eks++) if(eks%2==0) //if it's 0 or 2 x[eks] = (w/3)+(w/18); else if(eks==1) x[eks] = 2*(w/3)+(w/18); else //if (eks==3) ...
9
public void output() { ListElement current = head; while (current != tail.next()) { System.out.print(current.getValue() + " "); current = current.next(); } System.out.println(); }
1
public List<vassalInfo> getPlayerVassals(String playerName) { List<vassalInfo> vassals = new ArrayList<vassalInfo>(); String SQL = "SELECT *" + " FROM " + tblAllegiance + " WHERE `patron` LIKE ?" + " ORDER BY XP DESC;"; try { Connection con = getSQLConnection(); PreparedStatement statement = con.prepareSt...
2
public SpriteSheet(String relativePath) { URL u = this.getClass().getResource(relativePath); try { spriteSheet = ImageIO.read(u); } catch (IOException e) { e.printStackTrace(); } }
1
@Override public Component getListCellRendererComponent(JList<? extends TripComponent> list, TripComponent value, int index, boolean isSelected, boolean cellHasFocus) { riverNameLabel.setText("Gr " + (index+1) + ": " + value.getRiverName()); wwTopLevelLabel.setText ("\u02AC" + value.getWwTopLevel()); tripF...
3
public boolean isCeilingTouched(BlockMap bmap) { for(int i = 0; i < bmap.entities.size(); i++) { Block tile = (Block)bmap.entities.get(i); if(ceilingPoly.intersects(tile.poly)) { return true; } } return false; }
2
private void calcRotation(double timeMod) { if (turningRight && turningLeft) { //Do nothing } else if (turningRight) { faceAngle += turnSpeed*timeMod; } else if (turningLeft) { faceAngle -= turnSpeed*timeMod; } //Make sure faceAngle st...
6
public static void main(String[] args) throws Exception { int swValue = 0; System.out.println("============================================================================"); System.out.println("| MENU SELECTION DEMO |"); System.out....
6
private synchronized void dequeue(PacketScheduler sched) { Packet np = sched.deque(); // process ping() packet if (np instanceof InfoPacket) { ((InfoPacket) np).addExitTime( GridSim.clock() ); } if (super.reportWriter_ != null) { super.write("dequeui...
4
public RandomBitFilter(final ConnectionProcessor proc, final Properties props) { super(proc, props); requireConfigKey(probability_key); probability = Float.parseFloat(props.getProperty(probability_key)); for (int i = 0 ; i < table.length ; ++i) { for (int j = 24 ; j < 32 ; ++...
2
public CmdRemoveExecutor(SimpleQueues plugin) { this.plugin = plugin; }
0
public static boolean canMove(Tile[][] board, Tile tile) { boolean canMove = false; switch (tile.getSpecialPosition()) { case TOP_LEFT: canMove = checkNeighborsFromTopLeft(board, tile); break; case TOP_RIGHT: canMove = checkNeighbor...
9
@Test public void getNumberOfDaysBillIsOlderThanPaul() throws Exception { Assert.assertEquals(addressBook.getDaysOlder("Bill McKnight", "Paul Robinson"), 2862); }
0
@Override public void dragExit(DropTargetEvent event) { TreePanel panel = getPanel(); if (panel.getColumns().equals(mOriginal)) { panel.repaintColumn(mColumn); } else { panel.restoreColumns(mOriginal); } }
1
@Override public void mouseDragged(MouseEvent event) { JFrame frame = Game.get().display.getFrame(); float zoomX = (frame.getWidth()-frame.getInsets().left-frame.getInsets().right)/800f; float zoomY = (frame.getHeight()-frame.getInsets().top-frame.getInsets().bottom)/800f; int mouseX = (int) (event.getX()/z...
6
@Override public void mousePressed(MouseEvent arg0) { // TODO Auto-generated method stub if(arg0.getSource() == exit) { controller.mainWindowClosing(); System.exit(0); } if(arg0.getSource() == static_Open || arg0.getSource() == addSong) { JFileChooser chooser = new JFileChooser(); File...
9
public int getCharge() { if(isIon()) { int pos = 0; for(int i = 0; i < ions.length; i++) { if(this.equals(new MiniCompound(ions[i]))) { pos = i; break; } } return ionCharges[pos]; // System.err.println("getCharge - this is an ion, but there isn't a corresponding charge"); }...
4
int readCorner3(int numRows, int numColumns) { int currentByte = 0; if (readModule(numRows - 1, 0, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (readModule(numRows - 1, numColumns - 1, numRows, numColumns)) { currentByte |= 1; } currentByte <<= 1; if (rea...
8
protected void Fetch(String DBloc) throws IOException, JSONException { String found = ""; JSONObject obj; if(Key == null && Qualifier == null) { File file = new File(DBloc+"/"+Table+"/"+ColumnFamily+"/"); read(file); } else if(Key == null) { FileInputStream fistream = new FileInputStre...
6
public Grid createGrid(){ Grid grid = null; if(fileCanCreateGrid()){ grid = new Grid(this.vehicleMap, this.gridSize, new ArrayList<Grid>()); grid.previousGrids.add(grid); } return grid; }
1
private boolean isWhitespace(int c) { return Character.isWhitespace((char) c) && (c != strategy.getDelimiter()); }
1
private void readConfigFile(String filename) { // Chargement du fichier Properties prop = new Properties(); try { prop.load(new FileReader(filename)); } catch (Exception e) { e.printStackTrace(); } // Traitement des données chargées String[] pluginsToLoad = prop.getProperty("loadAtStart").split("...
9
public static void main(String[] args) throws Exception { TesterMainGUIMode testerMainGUI = new TesterMainGUIMode(); testerMainGUI.showChartFrame(); }
0
public static void main(String[] args) { printWelcome(); // Attempting authentication with server try { sock = new ServerConnection().getNewConnection(); new LoginHandler().handleIt(sock, currentUser); } catch (Exception e) { e.printStackTrace(); } System.out.println("Type \'h\' for a list of c...
6
public int getInt() throws InvalidBEncodingException { return this.getNumber().intValue(); }
0
public CheckResultMessage checkF(int day) { BigDecimal f = new BigDecimal(0); int row = get(10, 2); int clums = get(11, 2); int total = get(13, 2); if (version.equals("2003")) { try { in = new FileInputStream(file); hWorkbook = new HSSFWorkbook(in); for (int i = row; i < total; i++) { f = ...
7
private String keyTranslate(String pkgType){ String key = null; if(pkgType.equals("download")){ key = "Hash"; }else if(pkgType.equals("upload")){ key = "URL"; }else if(pkgType.equals("uploadType")){ key = "Upload Type"; }else if(pkgType.equals("downloadType")){ key = "Download Type"; }else{ k...
4
private void match1PlusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_match1PlusActionPerformed if (!heureChoice.getSelectedItem().equals("Tous") && !courtChoice.getSelectedItem().equals("Tous")) { try { int terrain = courtChoice.getSelectedIndex(); ...
6
public IHeuristic getHeuristic() { IHeuristic ret = null; switch (HeuristicType) { case '1': ret = new Heuristic1(); break; case '2': ret = new Heuristic2(); break; case '3': ret = new Heuristic3(); break; case 'c': ret = new Classifier(); break; case 'n': ret = new...
5