text
stringlengths
14
410k
label
int32
0
9
public Binding getTypeOrPackage(char[] name, int mask) { Binding typeBinding = getBinding0(name, mask); // if (typeBinding != null && typeBinding != LookupEnvironment.TheNotFoundType) { // typeBinding = BinaryTypeBinding.resolveType(typeBinding, environment, false); // no raw conversion for now // if (typeBinding.is...
7
private void mapChangesAndTheirStats() { overallMarketChange = (int) (100 * ((Database.SUM_MARKET_PRICE_DATA .lastEntry().getValue()[6]) - Database.SUM_MARKET_PRICE_DATA .ceilingEntry(15800f).getValue()[6]) / (Database.SUM_MARKET_PRICE_DATA .ceilingEntry(15800f).getValue()[6])); for (Entry<String, Tree...
1
@Override public void changedMostRecentDocumentTouched(DocumentRepositoryEvent e) { if (e.getDocument() == null) { setEnabled(false); } else { setEnabled(true); } }
1
protected void addOwnUnits() { reportPanel.add(localizedLabel(StringTemplate.template("report.military.forces") .addStringTemplate("%nation%", player.getNationName())), "newline, span, split 2"); reportPanel.add(new JSeparator(JSeparator.HOR...
7
private clsPersona asignarValoresContacto(){ clsPersona p = new clsPersona(); p.setCodigo(Integer.parseInt(txtCodigo.getText())); p.setNombre(txtNombre.getText()); p.setTelefonoFijo(txtTelefonoFijo.getText()); p.setCelular(txtCelular.getText()); p.setEmail(txtEmail.getText()); ...
2
public String getCiudad() { return ciudad; }
0
public boolean compEntity(EntityType entity, Player play, String sAction, ArrayList<PaymentCache> aPayer) { HashMap<String, ArrayList<EntityType>> hType = _jobsdata.getEntHash(); if(hType.isEmpty()) return false; for (Map.Entry<String, ArrayList<EntityType>> e : hType.entrySet...
5
private boolean determineCommand(String line) { try { if ((line == null) || (line.trim().equals(""))) { return false; } if (line.startsWith("[SPLINTER_IMPLANT]")) { this.myIMPLANT_ID = 2; try { this.myImplantName = Driver.ARR_IMPLANT_NAME[this.myIMPLANT_I...
8
private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed // TODO add your handling code here: // get a file path from the user programmerThread.stop(); hidePanels(lastPane); JFileChooser fileChooser = new JFileChooser(); ...
4
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { Player player = null; if (sender instanceof Player) { player = (Player) sender; } if (args.length == 0) { if (player == null) { sender.sendMessage(ChatColor.RED+"This command can o...
9
private boolean Invalid(char h){ /*update the record*/ boolean invalid=false; // System.out.println("This pkg type is: "+h); if((Character.getNumericValue(h)-1)<1 || (Character.getNumericValue(h)-1)>5){ invalid =true; }else{ statusCodeRecord[Character.getNumericValue(h)-1]++; if(h=='1' || h=='4' || h=...
5
public void paintComponent(Graphics g){ super.paintComponent(g); if(client.shouldQuit()) quit(); if(game.hasStarted() && !quit){ preview.setShouldPaint(false); if(game.shouldRepaint()) game.paint(background.createGraphics()); g.drawImage(background, 0, 0, getWidth(), height, null); new SwingDe...
6
private String[] getRelatedSetting(String tagName) { String[] vals = null; try { NodeList nodeList = m_root.getElementsByTagName( "Related" ); if ( nodeList == null ) { return null; } int len = nodeList.getLength(); vals = new String[len]; for ( int i = 0; i < len; i++ ) { Element child = ...
6
public Marquee() { setDefaultCloseOperation(EXIT_ON_CLOSE); setPreferredSize(new Dimension(350, 200)); setSize(new Dimension(350, 200)); getContentPane().setBackground(Color.black); scroller = new MyScroller(); getContentPane().add(scroller); pack(); set...
0
public void run() { while( true ) { System.out.println(TetrisTimer.abc); TetrisTimer.abc++; try { sleep(1000); } catch (InterruptedException e) { System.out.println(getName() + " interrupted."); } } }
2
private OutputStream getCorrectOutputStream(int optionalPresizing) throws IOException { if (isCached) { // create the tmp file if not initiated. if (tempFile == null) { createTempFile(); } // create the new file stream if (fileOutputStr...
4
private static boolean method518(char c) { return c < 'a' || c > 'z' || c == 'v' || c == 'x' || c == 'j' || c == 'q' || c == 'z'; }
6
private void readRemaining(int flag, int bits) throws EncodingException, NotImplementedException { // For forwards compatibility, read in any other flagged objects to // preserve the integrity of the input stream... if ((flag >> bits) != 0) { for (int o = bits; o < 6; o++) { if (((flag >> o) & 1) != ...
3
public void startPower() { System.out.println("模板共性,开启电源"); }
0
public static double sinh(double x) { boolean negate = false; if (x != x) { return x; } if (x > 20.0) { return exp(x)/2.0; } if (x < -20) { return -exp(-x)/2.0; } if (x == 0) { return x; } if (x < 0.0) { x ...
7
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 feel. * For details see http://down...
6
@Test public void testPersistencyHandler() { PersistenceHandler ph = PersistenceHandler.getInstance(); ph.loadDb(); try { ph.write(new MusicPersisted("/home/andreluiz/a.mp3")); ph.write(new MusicPersisted("/home/andreluiz/b.mp3")); ph.write(new UserPersisted("andrelgsl@gmail.com", "1234", 24, ...
5
@Override public boolean updateItem(Item item) { String itemID = item.getID(); String title = item.getTitle(); String publisher = item.getPublisher(); Calendar date = item.getDate(); Date sqlDate = new Date(date.getTimeInMillis()); Statement stmt = null; try { stmt = con.createStatement(); ...
5
public void initialize(InputStream stream) { try { ais = AudioSystem.getAudioInputStream(stream); format = ais.getFormat(); if (format.getChannels() == 1) { if (format.getSampleSizeInBits() == 8) { chanelFormat = EnumChanelFormat.MONO_CHANE...
8
public void startGame() { ResourceMapping gameMapping = new ResourceMapping(); for (Player player : freeColClient.getGame().getPlayers()) { addPlayerResources(player.getNationID(), gameMapping); } // Unknown nation is not in getPlayers() list. addPlayerResources(Natio...
8
public CheckResultMessage checkTF07(int day) { int r1 = get(20, 2); int c1 = get(21, 2); int r2 = get(23, 2); int c2 = get(24, 2); if (checkVersion(file).equals("2003")) { try { in = new FileInputStream(file); hWorkbook = new HSSFWorkbook(in); if (0 != getValue(r1 + 6, c1 + day, 2).abs().compar...
5
protected String calcBPB_FilSysType() throws UnsupportedEncodingException { byte[] bTemp = new byte[8]; for (int i = 82;i < 90; i++) { bTemp[i-82] = imageBytes[i]; } BPB_FilSysType = new String(bTemp, "UTF-8"); System.out.println(BPB_FilSysType); return BPB_Fi...
1
public boolean validarConexion (String n_url, String n_port, boolean seg_int, String n_usu, String n_cla){ boolean valida = false; if (! n_port.equals("")){ port = n_port; } else{ port = "1433"; } String urlConexion = jdbc+n_u...
6
public void loadResults(){ FileInputStream fi = null; BufferedReader br = null; try { fi = new FileInputStream(new File(this.resultsDataFilePath)); br = new BufferedReader(new InputStreamReader(fi)); String line = br.readLine(); while(line != null)...
6
public void selectGameTypeCheck(int select) { input.setText(inputStart); if (select >= gameTypeChecks.length) select = 0; for (int j = 0; j < gameTypeChecks.length; j++) gameTypeChecks[j].setSelected(select == j); if (select == 1) { this.selectDictChec...
8
public void testToStandardDuration_months() { Period test = Period.months(1); try { test.toStandardDuration(); fail(); } catch (UnsupportedOperationException ex) {} test = Period.months(-1); try { test.toStandardDuration(); ...
2
private boolean attCanWithdraw(Territory territory){ if(battle.defTerritory.getNeighbors().contains(territory)){ if(battle.defTerritory instanceof Water){ return (territory instanceof Water) && (territory.getFamily()==null || territory.getFamily()==oppFamily); }else{ return (territory instanceof Land) &...
6
private void chooseWorldActionPerformed(java.awt.event.ActionEvent evt) throws Exception { World w = new World(); w.readInWorld(chooseWorld.getSelectedFile().getName()); worlds.add(w); }
0
static public void addLocation(Location newLocation) { Charset charset = Charset.forName("UTF-8"); final File file = new File("VMlocations.ini"); if (!file.exists()) try { file.createNewFile(); } catch (IOException ex) { Logger.getLogger(LocationsManager.class.getN...
3
static void executeBatch(Batch batch) throws ProcessException { for (int i = 0; i < batch.cmdCmds.size(); i++) { List<String> command = new ArrayList<String>(); command.add(batch.cmdCmds.get(i).path); //Add the arguments for(String argi: batch.cmdCmds.get(i).cmdArgs) { command.add(argi); } ...
9
@Override public BuildResult call() throws Exception { // set the name of this thread to the package // name for debugging Thread.currentThread().setName(pkg.getName()); // write the POM to the base dir pkg.writePom(); BuildResult result = new BuildResult(); result.setPackage...
8
protected int recurse_multiple(MDDManager ddmanager, int[] nodes, int leafcount, MDDVariable bestVar) { if (bestVar.nbval == 2) { int lchild, rchild; int[] lnodes = new int[nodes.length], rnodes = new int[nodes.length]; for (int i=0 ; i<leafcount ; i++) { lnodes[i] = rnodes[i] = nodes[i]; } for (in...
7
@EventHandler public void onPlayerRespawn(PlayerRespawnEvent event) { Arena arena = this.gm.findArenaByPlayer(event.getPlayer()); if (arena == null) return; PlayerInfo p = arena.findPlayer(event.getPlayer()); if (p == null) return; event.setRespawnLocation((Location)arena.mainArea.Sp...
4
public AbstractResource getResourceByName(String resourceName) { for (ResConfig rc : this.configurations) for (AbstractResource res : rc.getResources()) if (res.getResourceName().equals(resourceName)) return res; return null; }
3
public void log4dstm2(Object version) { if (version == null) return; Field[] fields = version.getClass().getDeclaredFields(); for (int j = 0; j < fields.length; j++) { fields[j].setAccessible(true); System.out.print(fields[j].getName() + ","); if (fields[j].getType().getName() .equals(java.la...
9
@Override public boolean onCommand(CommandSender arg0, Command arg1, String arg2, String[] arg3) { if (arg0.hasPermission("CreeperWarning.reload")) { plugin.getServer().getPluginManager().disablePlugin(plugin); plugin.getServer().getPluginManager().enablePlugin(plugin); arg0.sendMessage(plugin.NAME + "Reloa...
1
private void showBasicDialogs(String message) { messageLabel.setText(message); instance.showDialog(); }
0
public static int[][] rotateImage(int[][] image){ int n=image.length; /*The first step*/ for(int i=0;i<n;i++){ for(int j=0;j<n/2;j++){ image[i][j]=image[i][j]+image[i][n-j-1]; image[i][n-j-1]=image[i][j]-image[i][n-j-1]; image[i][j]=image[i][j]-image[i][n-j-1]; } } /*The second step*/ for(int...
4
public void setColor(Vector4f color) { this.color = (color != null ? color : new Vector4f(1f,1f,1f,1f)); }
1
@Override public void run() { try{ while(true){ Thread.sleep(waitTime); int newScore = 0; if(MarketUtils.IsMarketOpen){ for(Stock stock : watched){ stock.update(); newScore = 0; for(Strategy strategy : strategyProfile){ newScore += strategy.evaluate(stock); } ...
9
private void makeImgToBase64(HtmlPage page) throws FailingHttpStatusCodeException, MalformedURLException, IOException { @SuppressWarnings("unchecked") List<HtmlImage> imageList = (List<HtmlImage>) page.getByXPath("//img"); for (HtmlImage image : imageList) { InputStream ins = webClient.getPage("http://ec...
2
private void placerPostes(Graphics2D g){ g.setStroke(new BasicStroke()) ; for(Poste poste : modele){ g.setColor(Color.gray) ; int xPoste = Parametres.posteX(poste.getPosition().getTravee(),poste.getOrientation()) ; int yPoste = Parametres.posteY(poste.getPosition().getRangee(),poste.getOrientation()) ...
4
public static void main(String [] args){ try { System.out.println("reading wav file..."); //String dir = "C:/Users/Jeudy7/Desktop/Doc_ITC_teaching_250913/sphinx_4_project/reco/resource/tmp_file_dir/"; String dir = "./resource/tmp_file_dir/"; File directory = new File(dir); //ge...
4
public JSONObject details(int id, boolean isUser, boolean isForum, boolean isThread) { JSONObject result = new JSONObject(); JSONObject response = null; ResultSet resultSet; try { PreparedStatement stmt = con.prepareStatement("SELECT message, date, likes, dislikes, points, i...
6
private static void displayAddInventory(BufferedReader reader, VideoStore videoStore) { try { System.out.println("Please enter the title of the video you would like to add inventory to:"); String isbn = getISBNFromTitle(reader, videoStore, reader.readLine()); System.out.print...
5
public void escribirCarpetas() throws ReporteJasperException { try { index=0; String separador = System.getProperty("file.separator"); for (int i = 0; i < this.lista.size(); i++) { ReporteJasperVO reporteJasperVO = (ReporteJasperVO) thi...
6
public ReportGenerator(boolean advancedMode, File baseDir, final GenerationProgress gp) { super(); Logger.getLogger(ReportGenerator.class.getName()).entering(ReportGenerator.class.getName(), "ReportGenerator", new Object[] {advancedMode, baseDir, gp}); try { this.advancedMode = advan...
4
public Double getMaxPrize(String type) { Map<Integer, Reward> rewards = getRewards(type); Double max = 0.0; for(Map.Entry<Integer, Reward> entry : rewards.entrySet()) { Reward reward = entry.getValue(); Double money = reward.getMoney(); if(money > max) { max = money; } } return max; }
2
private int getFrameForReplacement(){ int frameID = -1; for (int i=0; i<this.frames.length && frameID == -1; i++){ if( this.pinCount[i] == 0 ) frameID = i; } // System.out.println( "Replacement frame is " + frameID ); if( frameID != -1 && dirty[frameID] ){ writeBlock(frameID); } ...
5
public int getId() { return id; }
0
private void extractArguments(String[] args) { String testArgsString = Config.getString("AutoGrader.testArgs"); if (testArgsString == null) { testArgsString = ""; } for (int i=0; i<args.length; ) { String arg = args[i++]; if (arg.length() > 0 && arg.charAt(0) == '-') { if (arg.equals("-#")) { ...
6
@Override public String format(Date fromObject) { try{ return forFormatting.format(fromObject); } catch(Exception e){ } return null; }
1
public String getApplicationName() { return this.applicationName; }
0
public boolean spaceHasOpponent(Position p, int opponentColor) { try { if (opponentColor == Board.white) { if (this.board[p.rank][p.file] > 0) { return true; } } else { if (this.board[p.rank][p.file] < 0) { return true; } } return false; } catch (Exception e) { return false;...
4
public static final void method544(int i, int j, int k, int l, GameObject gameObject, long l1, GameObject gameObject_1, GameObject gameObject_2) { Class46 class46 = new Class46(); class46.aGameObject_787 = gameObject; class46.anInt791 = j * 128 + 64; class46.anInt794 = k * 128 + 64; ...
6
@Override public void run() { Map<String, Ban> bans = plugin.getController().getBans(); // empty ban list print info and stop if (bans.isEmpty()) { if (!silent) { String message = MessagesUtil.formatMessage("run_no_bans", null); log.log(Level.INFO...
6
private void finalizeCNFMap(HashMap <Production, Production> map) { for (Production p : myCNFMap.keySet()) { ArrayList <Production> temp=new ArrayList <Production>(); for (Production pp : myCNFMap.get(p)) { temp.add(map.get(pp)); } myCNFMap.put(p, temp); } }
2
@Override public String getColumnName(int columnIndex) { if (columnIndex == DELIVERY_PACKET_ID) { return "№"; } else if (columnIndex == MEMBER_NAME) { return "Кому выдано"; } else if (columnIndex == EVENT) { return "Мероприятие"; } else if (columnI...
5
public static <T> void ForEach(Iterable<T> parameters, final LoopBody<T> loopBody) { ExecutorService executor = Executors.newFixedThreadPool(iCPU); List<Future<?>> futures = new LinkedList<>(); for (final T param : parameters) { Future<?> future = executor.submit(new Runnable() { ...
7
public MarginKernelPerceptron(String kernelType) { if (kernelType.equals("perceptron_linear_kernel")) { kernel = new LinearKernel(); } else if (kernelType.equals("perceptron_polynomial_kernel")) { int polynomial_kernel_exponent = 2; if (CommandLineUtilities.hasArg("polynomial_kernel_exponent")) { pol...
4
public void updateSubTypes() { if (parent != null && (GlobalOptions.debuggingFlags & GlobalOptions.DEBUG_TYPES) != 0) GlobalOptions.err.println("local type changed in: " + parent); local.setType(type); }
2
public void setForceImageLocation(String forceName) { switch (forceName) { case "曹操": forceImageLocation = "/resources/caocaoForceColour.png"; break; case "刘备": forceImageLocation = "/resources/liubeiForceColour.png"; break; ...
4
@Override public void onMessage(String strmsg) { //System.out.println(strmsg); // pos updates try { JSONObject jsmsg = new JSONObject(strmsg); JSONObject data = jsmsg.getJSONObject("Data"); switch(jsmsg.getInt("Type")) { case 1: //disconnection String discoUserName = data.getString("n"); thi...
9
private void setChunk() { for (int x = 0; x < chunks.length; x++) { chunks[x] = new Chunk(3); } }
1
public Direction hitObj(GameObj other) { if (this.willIntersect(other)) { double dx = other.pos_x + other.width /2 - (pos_x + width /2); double dy = other.pos_y + other.height/2 - (pos_y + height/2); double theta = Math.atan2(dy, dx); double diagTheta = Math.atan2(height, width); if ( -diagTheta <= ...
7
public Date getHireDay() { return hireDay; }
0
@Override public double drawString(String str, SpriteSheet font, double x, double y, double scale, Color color, double wrapX) { double aspect = font.getSpriteAspect(); double maxLength = (wrapX - x) / (scale * aspect); if (wrapX <= x || wrapX <= -1 || str.length() < maxLength) { drawStringLine(str, font, x...
5
public NameGenerator(){ Scanner scanner; random = new Random(); try{ scanner = new Scanner(this.getClass().getResourceAsStream("/res/vowels.txt")); }catch(Exception e){ e.printStackTrace(); return; } if(!scanner.nextLine().equals("vowels:")){ System.out.println("wrong file!"); return; ...
5
private void handleKeyboardInput() { while(Keyboard.next()) { if (Keyboard.getEventKeyState()) { if(Keyboard.getEventKey() == Keyboard.KEY_ESCAPE) { System.exit(0); } if(Keyboard.getEventKey() == Keyboard.KEY_RETURN) { mouseActive = !mouseActive; } } } moveDir.set(0.0f,0.0f,0.0f...
8
private final void method2525(int[] is, Node_Sub10 node_sub10, int i, int i_7_, int i_8_, int i_9_) { if (i_9_ != 12073) { DECODE_MASKS_PLAYERS_COUNT = 44; } if ((0x4 & aNode_Sub9_Sub1_9734.anIntArray9680[node_sub10.anInt7080] ^ 0xffffffff) != -1 && node_sub10.anInt7100 < 0) { int i_10_ = aNode_Sub9_Sub1_97...
9
private boolean isDragOk( final java.io.PrintStream out, final java.awt.dnd.DropTargetDragEvent evt ) { boolean ok = false; // Get data flavors being dragged java.awt.datatransfer.DataFlavor[] flavors = evt.getCurrentDataFlavors(); // See if any of the flavors are a file ...
7
@Override public void close() { if (this.connection != null) try { this.connection.close(); } catch (SQLException ex) { this.writeError("Error on Connection close: " + ex, true); } }
2
public void storePerson(Person person) throws NameClashException, UpdatingNonexistantPersonException { Person foundDbPerson = null; int personId = person.getId(); if (personId != -1) { foundDbPerson = findPersonWithId(personId); if (foundDbPerson == null) { ...
9
public static String askPath(String msg) { String res = null; while (res == null || !Draft.isPath(res) ) { res = ask(msg); if ( !Draft.isPath(res) ) System.out.println("\n!!! No such file !!!"); } return res; }
3
public static int calculeHyperperiode(List<Tache> taches) { int nb = 0; List<Integer> Pi = new ArrayList<Integer>(); for(Tache tache : taches) { if (tache instanceof TachePeriodique) { Pi.add(((TachePeriodique) tache).getPi()); nb++; } } Integer[] periodes = new Integer[nb]; Pi.toArray(peri...
6
private int insert0(int pos, byte[] code, boolean exclusive) throws BadBytecode { int len = code.length; if (len <= 0) return pos; // currentPos will change. pos = insertGapAt(pos, len, exclusive).position; int p = pos; for (int j = 0; j < len; +...
2
public static void main(String args[]) { String url = "jdbc:oracle:thin:@192.168.1.105:1521:timran11g"; // HOST:192.168.1.105;PORT:1521;SID_NAME:timran11g String strSql = "SELECT * FROM t1"; // 将sql中将;去掉 String strSql1 = "SELECT * FROM MYTEST"; String createTable1 = "Create table MYTEST (ID INT,NAME V...
3
static public int get(int itemLevel) { /*if (itemLevel < 1) { throw new IllegalArgumentException("Invalid Item Level: " + itemLevel); } else*/if (itemLevel < 18) { return 0; } else if (itemLevel < 30) { return 1; } else if (itemLevel < 42) { ...
6
public BinaryDataType createBinaryDataType() { return new BinaryDataType(); }
0
public void handle(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException { //System.out.println(request.getHeader("data")); //System.out.println(System.currentTimeMillis()); baseRequest.setHandled(true); ...
6
TimeMarker[] getTimeMarkers( long start, long stop ) { start *= 1000; // Discard milliseconds stop *= 1000; Calendar cMaj = Calendar.getInstance(); Calendar cMin = Calendar.getInstance(); // Set the start calculation point for the grids setStartPoint(cMaj, majGridTimeUnit, start); setStartPoi...
8
@Override public void actionPerformed(ActionEvent arg0) { Iterator<JRadioButton> it = buttonlist.iterator(); while ( it.hasNext() ) { JRadioButton thisButton = it.next(); if ( thisButton.isSelected() ) { if ( callbackHandler != null ) { callbackHandler.selectInterface(thisButton.getText());...
3
public void setParent(View parent) { super.setParent(parent); fContainer = parent!=null ?getContainer() :null; if( parent==null && fComponent!=null ) { fComponent.getParent().remove(fComponent); fComponent = null; } }
3
public void visit_lreturn(final Instruction inst) { stackHeight -= 2; if (stackHeight < minStackHeight) { minStackHeight = stackHeight; } }
1
private boolean guardarFichero (String salida) { boolean guardado = false; JFileChooser chooser = new JFileChooser(); int retrival = chooser.showSaveDialog(MainVentana.this); if (retrival == JFileChooser.APPROVE_OPTION) { try (FileWriter fw = new F...
3
protected void checkMovement() { if(figUp && !figDown) figY -= speed; if(figDown && !figUp) figY += speed; if(figRight && !figLeft) figX += speed; if(figLeft && !figRight) figX -= speed; l.setFigureCoordinates(figX, figY); g.setFigureCoordinates(figX, figY); }
8
public void setCoordinates(List<T> coordinates) { this.coordinates = coordinates; }
0
public void start(BundleContext context) throws Exception { super.start(context); IWorkspace workspace = ResourcesPlugin.getWorkspace(); IResourceChangeListener listener = new IResourceChangeListener() { @Override public void resourceChanged(IResourceChangeEvent event) { // blocking do...
5
@Override public List<Integer> sort(List<Integer> list) { // checking input parameter for null if (list == null) { throw new IllegalArgumentException("ArrayList not specified!"); } // building heap for (int child = 1; child < list.size(); child++) { ...
4
public Lid getLid() { return lid; }
0
public void startNewGame() { // Create Deck createTime = new Date(); int count = 0; for (ItalianDeckSuit suit : ItalianDeckCard.ItalianDeckSuit.values()) { for (ItalianDeckRank rank : ItalianDeckCard.ItalianDeckRank .values()) { deck[count++] = new ItalianDeckCard(suit, rank); } } // Shuffle...
5
int[] ContaTudo() { FileWriter wr; PrintWriter pw; wr = null; pw = null; try{ wr = new FileWriter("resultado.csv", true); pw = new PrintWriter(wr, true); } catch(Exception e) { } if(!h) { pw.printf("Tempo, Presa, Predador, Reciclador, Defunto, Vazio\n"); h = true; tmp = 0; } ...
8
private IFn findAndCacheBestMethod(Object dispatchVal) throws Exception{ Map.Entry bestEntry = null; for(Object o : getMethodTable()) { Map.Entry e = (Map.Entry) o; if(isA(dispatchVal, e.getKey())) { if(bestEntry == null || dominates(e.getKey(), bestEntry.getKey())) bestEntry = e; if(!dominates(bes...
7
public void update() throws MaltChainedException { final AddressValue a = addressFunction.getAddressValue(); if (a.getAddress() == null) { if (getSymbolTable() != null) { featureValue.setIndexCode(getSymbolTable().getNullValueCode(NullValueId.NO_NODE)); featureValue.setSymbol(getSymbolTable().getNull...
7
public SimpleStringProperty countryProperty() { return country; }
0