text
stringlengths
14
410k
label
int32
0
9
@Override public void run() { for (int i = 0; i < 1000; i++) { uidb.occurence(); } }
1
public void mouseClicked(MouseEvent e) { int column = jtSaves.columnAtPoint(e.getPoint()); ArrayList <Map> unsortedList = saves; ArrayList <Map> sortedList; boolean sens = sortWay[column]; switch (column) { case 0: sortedList = Tri.sortByName(unsortedList, sens); updateTable(sortedList); ...
4
private void copyEntry(final InputStream is, final OutputStream os) throws IOException { if (outRepresentation == SINGLE_XML) { return; } byte[] buff = new byte[2048]; int i; while ((i = is.read(buff)) != -1) { os.write(buff, 0, i); } }
2
public JFrame getChooseFrame() { boolean test = false; if (test || m_test) { System.out.println("GameSelecter :: getChooseFrame() BEGIN"); } if (test || m_test) { System.out.println("GameSelecter :: getChooseFrame() END"); } return m_choose; }
4
private static ValueTypePair[][] loadGrazingSubbasinData(ValueTypePair[][] vtp, Statement inA, Statement inB, String subGrz, String grzArea) { ValueTypePair[][] vTemp = new ValueTypePair[vtp.length * 20][3]; HashSet ids = new HashSet(), subs = new HashSet(); int index = 0; for (ValueType...
7
public PreferencesModel(Preferences preferencesRoot, int numberOfIpsToStore) { _preferencesRoot = preferencesRoot; _numberOfIpsToStore = numberOfIpsToStore; // gibt es Einträge in den Preferences zu IP und Port ? Wenn nein -> Default-Werte localhost:8083 try { String[] children = _preferencesRoot.childr...
9
public BufferedImage getSprite() { if (moveX==0) return stand; return walk.sprite; }
1
public void loadBlockList() { RegenPlugin.get().getLogger().info(RegenPlugin.get().getName() + ".LoadBlockList() fileName: " + BLOCK_LIST_FILE); DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder; try { docBuilder = dbfac.newDocumentBuilder(); } ...
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
public static void main(String[] args) { long start = System.nanoTime(); String num = "7316717653...2963450"; // Edited out most of the number. The problem with the full number can be found here: int max = 1, current = 1; // http://projecteuler.net/problem=8 for(int i = 0; i + 4 < num.length(); i++){...
3
public static String getFieldName(String _name, boolean erveryBigWord) throws Exception { char[] nameChars = _name.toCharArray(); StringBuffer sb = new StringBuffer(""); for (int i = 0; i < nameChars.length; i++) { if (StringUtil.isBigChr(nameChars[i])) { if (i > 0 &&...
5
public void run(){ if(! hasStarted()){ Property<String> outputFileProp = getFirstProperty("output-file"); if((outputFileProp == null) || (outputFileProp.getValue() == null)){ die("OutputAdapter requires an output-file property."); } File outputFile = new File(outputFileProp.getValue()); String ...
7
public Pet[] createArray(int size) { Pet[] result = new Pet[size]; for(int i = 0; i < size; i++) result[i] = randomPet(); return result; }
1
public void setPasswordfieldRightshift(int shift) { if (shift < 0) { this.passwordfieldRightshift = UIShiftInits.PWAREA_RIGHT.getShift(); } else { this.passwordfieldRightshift = shift; } }
1
private int getPort() { int port = uri.getPort(); if( port == -1 ) { String scheme = uri.getScheme(); if( scheme.equals( "wss" ) ) { return WebSocket.DEFAULT_WSS_PORT; } else if( scheme.equals( "ws" ) ) { return WebSocket.DEFAULT_PORT; } else { throw new RuntimeException( "unkonow scheme" + ...
3
public String formatMessage(ChatPlayer player, String message) { String output = ""; String format = getFormat(); ProxiedPlayer p = player.getPlayer(); if (CommandUtil.hasPermission(p, NicknameCommand.PERMISSION_NODES)) { output = format.replace("%player", player.getDisplayName()); } else { output = ...
5
public static void start(final int i) { new Thread() { public void run() { try { clojure.lang.Compiler.load(new FileReader( "src/Clojure_Bindings.clj")); } catch (Exception e1) { e1.printStackTrace(); } while (true) { ServerSocket serv = null; Socket sock = null; try...
7
private float getReducedDecodingHeight(int row, int col) { ArrayList<AxisPairMetrics> amList =parameterizedDisplay.getMetricsList(); Collections.sort(amList, new SortMetrics(MetaMetrics.DistanceEntropy)); int firstQuartile = metricsList.size()/4; int thirdQuartile= (3*metricsList.size())/4; float newBoxHeig...
6
public static void main(String[] args) throws IOException { Game.AgentsCreation(); int i; int teams_count =0; System.out.println("***********************************************************"); System.out.println("Battle is about to start. All agents stats: "); for (i=0; i<Game.number_of_agen...
8
public static void downloadOrUpdateInstaller(IMonitor monitor, String host, File dest, boolean update) { String fileName = "unknow"; byte[] buffer = new byte[65536]; try { URL url = new URL(host); URLConnection urlconnection = url.openConnection(); ...
7
@Test public void testPreAuthorization() { Gateway beanstream = new Gateway("v1", 300200578, "4BaD82D9197b4cc4b70a221911eE9f70"); CardPaymentRequest paymentRequest = new CardPaymentRequest(); paymentRequest.setAmount(90.00); paymentRequest.setOrderNumber(getRandomOr...
4
public double evaluate(double x) { return Math.pow(x, _power); }
0
public void decorateChunk(WorldChunk chunk, World w, Random rand) { int randInt = 0; int theTop = 0; for(int i = 0 ; i < 16 ; i++) { randInt = rand.nextInt(10); theTop = chunk.getMaxHeight(i) + 1; if(w.getBlockAt(16 * chunk.chunkID + i, theTop).equals("air")) { if(randInt == 3) { ...
7
protected final void writePacket(final SelectionKey key, final MMOConnection<T> con) { if (!prepareWriteBuffer(con)) { key.interestOps(key.interestOps() & ~SelectionKey.OP_WRITE); return; } DIRECT_WRITE_BUFFER.flip(); final int size = DIRECT_WRITE_BUFFER.remaining(); int result = -1; tr...
6
public Systemereignis theoriestundeEintragen(int thema, Date beginn) { ArrayList<Fahrlehrerindaten> fahrlehrerin = ressourcenverwaltung.get_fahrlehrerin(); Date end = (Date) beginn.clone(); end.setMinutes(beginn.getMinutes()+90); for (int i=0;i<this.theoriestunde.size();i++) { Theoriestunde stunde = this.the...
9
public char translateFrom (final Cell other) { if (other.row - 1 == row && other.col == col) { return 'D'; } else if (other.row + 1 == row && other.col == col) { return 'U'; } else if (other.row == row && other.col - 1 == col) { return 'L'; } else ...
8
@Override public void render(Graphics g) { super.render(g); if (shouldRender) { hudManager.playerRender(g, positionX + PAPERDOLL_X, positionY + PAPERDOLL_Y, true); } }
1
public void showUsage(Command command, CommandSender sender, boolean prefix) { CommandInfo info = command.getClass().getAnnotation(CommandInfo.class); if (!plugin.has(sender, info.permission())) return; sender.sendMessage((prefix ? "Usage: " : "") + info.usage() + " " + ChatColor.YELLOW + info....
2
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
public int compareTo(BitFeld b) { /* * liefert 1, falls |this| > |b| 0, falls |this| = |b| -1, falls |this| * < |b| */ /* Arrays Bitweise vergleichen */ for (int i = this.size - 1; i >= 0; i--) { if (this.bits[i] & !(b.bits[i])) return 1; if (!(this.bits[i]) & b.bits[i]) return -1; } ...
3
public Animal getPredator(int index) { return predators.get(index); }
0
public static Object call_method(Object object, String methodName) { Object retObj = null; try { Class<?> cls = object.getClass(); Class<?> partypes[] = new Class[0]; Method meth = cls.getMethod(methodName, partypes); Object arglist[] = new Object[0]; retObj = meth.invoke(object, arglist); } catch ...
3
public boolean remove(Unit unit) { int tolerance = 20; int remaining = building.getRemainingTrainTime(); boolean buildIsDone = false; if (remaining != 0) { for (UnitType type : ableToBuild) { if (type.buildTime() - tolerance <= remaining && remaining <= type.buildTime()) { buildIsDone = true; ...
7
public void update(double[] y) { if (numPoints < N) { // Just add this point to the end - not saturated and don't have to scroll yet! for(int p = 0; p < numPlots; p++) { y_vals[p][numPoints] = y[p]; } numPoints++; } else { // Scroll all the points over by 1, and then add it for(int i = ...
8
private void skipToEndOfLine() throws IOException { while (pos < limit || fillBuffer(1)) { char c = buffer[pos++]; if (c == '\n') { lineNumber++; lineStart = pos; break; } else if (c == '\r') { break; } } }
4
static Method getDeclaredMethod(final Class clazz, final String name, final Class[] types) throws NoSuchMethodException { if (System.getSecurityManager() == null) return clazz.getDeclaredMethod(name, types); else { try { return (Method) AccessControlle...
3
@Override public void spring(MOB target) { if((target!=invoker())&&(target.location()!=null)&&(text().length()>0)) { if((doesSaveVsTraps(target)) ||(invoker().getGroupMembers(new HashSet<MOB>()).contains(target))) target.location().show(target,null,null,CMMsg.MASK_ALWAYS|CMMsg.MSG_NOISE,L("<S-NAME> avoi...
8
public void onStartPage(PdfWriter writer, Document document) { if (!this.texts.isEmpty()) { Phrase nullphrase = new Phrase(this.marginTop, "\n是\n"); try { document.add(nullphrase); } catch (DocumentException e) { e.printStackTrace(); } for (int i = 0; i < texts.size(); ++i) { float xper = (...
3
private void readTotalSpend() { try { CsvReader csvReader = new CsvReader(sourceFileTotalSpend); if(csvReader.readHeaders() == true) { while(csvReader.readRecord()==true) { //apar_id,apar_name,address,place,province,Country_code,zip_code,telephone_1,comp_reg_no,acctype // TODO : constant...
9
void add(long n) { if (arrIndx == len) { arrIndx = 0; listIndx++; list.add(new long[len]); } list.get(listIndx)[arrIndx] = n; arrIndx++; }
1
@Override protected void toASCII(StringBuilder ascii, int level) { indent(ascii, level); NSObject[] array = allObjects(); ascii.append(ASCIIPropertyListParser.ARRAY_BEGIN_TOKEN); int indexOfLastNewLine = ascii.lastIndexOf(NEWLINE); for (int i = 0; i < array.length; i++) { ...
9
private void beginGame() { Empire.SoundsOfEmpire.playIntroMusic(); final JFrame begFrame = new JFrame(); begFrame.setSize(new Dimension (20,20)); begFrame.setIconImage(Toolkit.getDefaultToolkit().getImage(RomanLegion.class.getResource("graphics/legionist_icon.png"))); begFrame.setVisible(false); ...
3
public Response serve( String uri, String method, Properties header, Properties parms, String data ) { try{ String response_string=null; if(data!=null){ System.out.println(DateFormat.getTimeInstance(DateFormat.FULL).format(Calendar.getInstance().getTime())); System.out.println("Command: " + data); ...
8
public Dimension getPreferredSize() { return new Dimension(22 * x, 22 * y); }
0
@Override public int castingQuality(MOB mob, Physical target) { if(mob!=null) { final Room R=mob.location(); if((R!=null)&&(!R.getArea().getClimateObj().canSeeTheMoon(R,null))) { if((R.getArea().getTimeObj().getTODCode()!=TimeClock.TimeOfDay.DUSK) &&(R.getArea().getTimeObj().getTODCode()!=TimeClo...
7
public static boolean pnpoly(int npol, float[] xp, float[] yp, float x, float y) { int i, j; boolean c = false; for (i = 0, j = npol-1; i < npol; j = i++) { if ((((yp[i] <= y) && (y < yp[j])) || ((yp[j] <= y) && (y < yp[i]))) && (x < (xp[j] - xp[i]) * (y - yp[i]) /...
6
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((declaration == null) ? 0 : declaration.hashCode()); result = prime * result + ((ident == null) ? 0 : ident.hashCode()); result = prime * result + ((statementSequence == null) ? 0 : statementSequenc...
3
private void ConsultaBDNaoConformidadeSelect( ){ int idNaoConformidade = 0; int idContResultado = 0; int idFuncionario = 0; String dataNaoConform = ""; String ocorrencia = ""; String medidaCorrecti = ""; String resultado = "NC"; S...
8
public int getIndex() { if (mParent != null) { return mIndex; } return -1; }
1
public static void main(String[] args) { int x, y, r, proceso; x = Integer.parseInt(JOptionPane.showInputDialog("Ingrese un Valor Entero para 'X':")); y = Integer.parseInt(JOptionPane.showInputDialog("Ingrese un Valor Entero para 'Y':")); if ((x <= 0) || (x > 255)) { ...
5
public void inicio(PalavraChave palavrachave) throws Exception { salvar = new JButton("Salvar"); id = new JTextInt(palavrachave.getId()); id.setEditable(false); id.setEnabled(false); palavra = new JTextField(palavrachave.getPalavra() == null ? "" : palavrachave.getPalavra()); JPanel pp = new JPanel();...
1
public static int getType(Neuron n){ if(n instanceof InputNeuron_Add) return 1; if(n instanceof OutputNeuron_Add) return 2; if(n instanceof Neuron_Add) return 3; if(n instanceof DistanceThresholdChecker) return 4; if(n instanceof Pi...
7
public static void SortOrbitals() { for (int x = 0; x < Ops.getOrbitalClasses().size(); x++) { switch (Ops.getOrbitalClasses(x).GetHZRating()) { case 1: HotOrbitals.add(x); break; case 2: HZOrbitals.add(x); break; case 3: ColdOrbitals.add(x); break; case 4: ...
5
public int getPerceptIndex( String percept ){ if( percept.equals(SOLVED) ){ return (getPerceptsNumber() - 1); }else{ int[] values = new int[2]; int k = 0; try { StreamTokenizer tokenizer = new StreamTokenizer(new StringReader( ...
5
public int getType() { return mType; }
0
@Override public void configure(AbstractCommand command, String[] args) { TimeBanHelpCommand helpCommand = (TimeBanHelpCommand) command; if (args.length >= 1) { helpCommand.setManPage(args[0]); } else { helpCommand.setManPage("help"); } }
1
protected void FillBuff() throws java.io.IOException { if (maxNextCharInd == available) { if (available == bufsize) { if (tokenBegin > 2048) { bufpos = maxNextCharInd = 0; available = tokenBegin; } else if (tokenBegin < 0) bufpos = maxN...
9
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof News)) return false; News news = (News) o; if (id != news.id) return false; if (!annotation.equals(news.annotation)) return false; if (!author.equals(news.author)) return false; if (!category.equals(news.category...
9
public void paint(Graphics g){ //ここに描画処理を書きます。 Color bgcol = new Color(220,220,220); setBackground(bgcol); g.setColor(Color.BLACK); g.drawLine(0, (int)dmax.get(1,0) - 100, (int)dmax.get(0, 0), (int)dmax.get(1, 0) - 100); // g.drawLine(100 , 0, 100, (int)dmax.get(1, 0)); //y軸 int zeropointx = 100; int...
4
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { int var5 = par1World.getBlockId(par2, par3 - 1, par4); return var5 == this.blockID ? true : (var5 != Block.grass.blockID && var5 != Block.dirt.blockID && var5 != Block.sand.blockID ? false : (par1World.getBlockMaterial(p...
7
public void setDataChiusura(Date dataChiusura) { this.dataChiusura = dataChiusura; }
0
public synchronized void gridletPause(int gridletId, int userId, boolean ack) { boolean status = false; // Find in EXEC List first int found = gridletInExecList_.indexOf(gridletId, userId); if (found >= 0) { // updates all the Gridlets first before pausing...
6
private void initialize(final Spel spel) throws IOException { this.spel = spel; // Haal informatie uit de controller String vraag = spel.getVraagTekst(); onderdelen = spel.getOnderdelen(); // Layout instellingen setBounds(0, 0, 1024, 768); setLayout(new MigLayout("ins 0 10px 10px 10px", "[124][grow][]",...
1
private boolean renderPistonExtension(Block par1Block, int par2, int par3, int par4, boolean par5) { int i = blockAccess.getBlockMetadata(par2, par3, par4); int j = BlockPistonExtension.getDirectionMeta(i); float f = par1Block.getBlockBrightness(blockAccess, par2, par3, par4); float ...
8
@Override public void setAsText(String text) throws IllegalArgumentException { if (text == null || text.equals("")) text = "0"; if (!StringUtils.hasText(text)) { setValue(null); } else { setValue(Integer.parseInt(text));// 这句话是最重要的,他的目的是通过传入参数的类型来匹配相应的databind } }
3
public void dstwdg(int id, Widget w) { if(w == chrlist) { destroy(); succeed(); } }
1
public TreeMenu(){ super(); menu = new JPopupMenu(); menu.setLightWeightPopupEnabled(false); addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { grabFocus(); } ...
3
public synchronized int select(int interestOps, Integer timeout) { int n; Selector selector; if ((interestOps & SelectionKey.OP_READ) != 0) { selector = readSelector; } else { selector = writeSelector; } selector.selectedKeys().clear(); try { if (timeout == null) { ...
4
public int hashCode() { return super.hashCode() ^ myLabel.hashCode(); }
0
private FrontCommand getCommand(HttpServletRequest req) throws Exception { try { return (FrontCommand) getCommandClass(req).newInstance(); } catch (Exception e) { throw new Exception(); } }
1
public void addArc(Node elem) { int nodeIndex = adjacentNodes.indexOf(elem); if (nodeIndex == -1) adjacentNodes.add(elem); }
1
private Collection<T> criaInstancias(ResultSet result) throws SQLException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchFieldException { ArrayList<T> instancias = new ArrayList<>(); result.first(); do { Constructor constr...
9
public void inserir(long idPesquisa, ArrayList<Pesquisador> pesquisadores) throws Exception { String sql = "INSERT INTO Pesquisacolaboradores (id1,id2) VALUES(?, ?)"; PreparedStatement stmt = ConnectionFactory.getConnection().prepareStatement(sql); for (Pesquisador pesquisador : pesquisadores) { stmt.set...
2
public static void listDBs() throws Exception { Class.forName(JDBC_DRIVER); Connection conn = DriverManager.getConnection(DB_URL, USER_NAME, PASSWORD); // see if a connection is established if(conn != null) { System.out.println("Connection established"); } // list all the databas...
2
public static void setZeros( int[][] m ) { // m is a two dimenstional array which represents a Matrix int rows = m.length ; int cols = m[0].length; List<Integer> rIdx = new ArrayList<>(); List<Integer> cIdx = new ArrayList<>(); // 1.iterate through the matrix to find all 0 for ( int y=0; y != rows; ++...
7
public Object invoke() throws Exception { Method m = null; Method[] tabm = classe.getMethods(); for (int i = 0; i < tabm.length; i++) { if (!tabm[i].getName().equals(method)) continue; Class[] paramTypes = tabm[i].getParameterTypes(); int param...
5
public void initOnGoing() { ScheduledThreadPoolExecutor pe = (ScheduledThreadPoolExecutor) Executors .newScheduledThreadPool(1); InitFetcherManager ccf = this.new InitFetcherManager(); long ongoingCycleDelay = Long.valueOf(ConfigManager.getInstance() .getConfigItem(IautosConstant.ONGOING_CYCLE_DELAY, 8640...
0
protected void createSource() throws JavaLayerException { Throwable t = null; try { Line line = AudioSystem.getLine(getSourceLineInfo()); if (line instanceof SourceDataLine) { source = (SourceDataLine)line; //source.open(fmt, milliseconds...
5
private String readLine(InputStream in) { // reads a line of text from an InputStream StringBuffer data = new StringBuffer(""); int c; try { // if we have nothing to read, just return null in.mark(1); if (in.read() == -1) { return null...
9
public void testUnique() throws Exception { //Return if this is not Windows OS if (!isWindows) { return; } /* * Number of timestamps to generate on each client */ int iterations = 11000; /* * Number of client threads */ ...
8
private Entry<K,V> getPrecedingEntryInclusive(K key) { Entry<K,V> p = root; if (p==null) return null; while (true) { int cmp = compare(key, p.key); if (cmp > 0) { if (p.right != null) p = p.right; else ...
8
public void run() { Fluid.log("Target: Accepting connections on port " + port); while(isConnected()) { try { // accept and do as little processing as possible if(username != null && password != null) new Client(this, clientConnection.accept(), idleTimeout, max, ruleFile, username, password); el...
4
public static void main(String[] args) throws UnsupportedLookAndFeelException { final Logger l = Logger.getLogger(Load.class.getName()); Thread cleanupThread = new Thread( new Runnable() { @Override public void run() { System.out.println("Shutdow...
3
public void calculateNumberOfBreakpoints() { int counter = 0; for (int i = 0; i < permutArray.length - 1; i++) { if (permutArray[i] - permutArray[i + 1] != -1) { counter++; } } if (permutArray[0] != 1) { counter++; } i...
4
public Object getValueAt( int row, int col ) { Object dummy = liste.get( row ) ; if (dummy != null) { ISOLanguage data = (ISOLanguage) liste.get( row ) ; switch (col) { case FULL_ENTRY: return dummy ; case 0: return data.getLanguageIso() ; case...
4
private void loadImages() { try { // Load tiles tileMap = ImageIO.read(this.getClass().getClassLoader().getResourceAsStream("Tiles.png")); // Grab the tilemap for (byte i = 0; i < tiles.length; i++) { // For every tile that there should be tiles[i] = tileMap.getSubimage(i * 32, 0, 32, 32); // Create ...
5
@Override protected void buildModel() throws Exception { for (int iter = 1; iter <= numIters; iter++) { errs = 0; loss = 0; DenseMatrix PS = new DenseMatrix(numUsers, numFactors); DenseMatrix QS = new DenseMatrix(numItems, numFactors); DenseMatrix ZS = new DenseMatrix(numUsers, numFactors); // ra...
8
@Override public void show() { stage=new Stage(); Gdx.input.setInputProcessor(stage); // retrieve the default table actor table = new Table( getSkin() ); final TextButton saveSpot1; final TextButton saveSpot2; final TextButton saveSpot3; final TextButton saveSpot4; final TextButton saveSpot5; TextButton exitButton=new...
5
public static Cons javaTranslateDefineGlobalVariableUnit(TranslationUnit unit) { { GlobalVariable global = ((GlobalVariable)(unit.theObject)); { Object old$Context$000 = Stella.$CONTEXT$.get(); Object old$Module$000 = Stella.$MODULE$.get(); try { Native.setSpecial(Stella.$CONTEXT$,...
6
public final Rectangle getBoundingRectangle() { double rotmc1x = Math.cos(rotation); double rotmc1y = Math.sin(rotation); double rotmc2x = -rotmc1y; double rotmc2y = rotmc1x; double hx = width * 0.5; double hy = height * 0.5; double leftBound = 0; double...
6
private static boolean chechAccess(AccessRight accessRight) { if(accessRight == AccessRight.MANAGER) { System.out.println("YOU ARE MANAGER !"); return true; } else if(accessRight == AccessRight.DEPARTMENT) { System.out.println("YOU ARE DEPARTMENT !"); return false; } return false; }
2
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onInventoryClick(InventoryClickEvent e) { // Only looking for anvils if (!(e.getInventory() instanceof AnvilInventory)) { return; } ItemStack item = e.getCurrentItem(); // Only looking for kits if (!item.hasItemMet...
6
@Override public void setValueAt(Object aValue, int rowIndex, int columnIndex) { if(columnIndex == 2) { if((Boolean)aValue) { super.setValueAt((!(Boolean)aValue), rowIndex, columnIndex + 1); } super.setValueAt(aValue, rowIndex, columnIndex); } else if(columnIndex == 3) { if((Boolean)aValue) { ...
4
public Socket connect() throws IOException { String[] headers = makeHeaders(); s = _getSocket(); try { oc = s.getOutputStream(); for (String header : headers) { oc.write(header.getBytes()); oc.write("\r\n".getBytes()); } ...
8
public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) { //System.out.println("Got a status deletion notice id:" + statusDeletionNotice.getStatusId()); }
0
public void setExcludeFromExportColumns(final String[] excludeFromExportColumns) { if (excludeFromExportColumns != null) { this.excludeFromExportColumns = excludeFromExportColumns.clone(); } else { this.excludeFromExportColumns = null; } }
1
private void heapify(int i){ int vasenLapsi = vasenLapsi(i); int oikeaLapsi = oikeaLapsi(i); if (oikeaLapsi < this.koko){ Siirto suurempi = null; int suurempiInd = 0; if (keko[oikeaLapsi].suurempiKuin(keko[vasenLapsi])){ suurempi = keko[oikeaLa...
5
protected long computeSVUID() throws IOException { ByteArrayOutputStream bos; DataOutputStream dos = null; long svuid = 0; try { bos = new ByteArrayOutputStream(); dos = new DataOutputStream(bos); /* * 1. The class name written using UTF encoding. */ dos.writeUTF(name.replace('/', '.')); ...
4
protected String getLabel(Node node) { String prefix = " "; String suffix = " "; if (attribute.equalsIgnoreCase(TAXON_NAMES)) { return prefix+tree.getTaxon(node).getName()+suffix; } if( tree instanceof RootedTree ) { final RootedTree rtree = (RootedTree) ...
7
@Override public void actionPerformed(ActionEvent acc) { try { if (OPEN_ACTION.equals(acc.getActionCommand())) { stateManager.openScene(); Console.println("Open Scene"); } else if (SAVE_ACTION.equals(acc.getActionCommand())) { stateManager.saveScene(false); } else if (SAVEAS_ACTION.equals(acc.ge...
9