text
stringlengths
14
410k
label
int32
0
9
private void copyDirectoryAndBackUpOldFiles(File source, File target) { for (File f : source.listFiles()) { if (f.isFile()) { try { copyFileAndBackUpOldCopy(f, new File(target, f.getName())); } catch (IOException ex) { System.ou...
4
private Point xBinarySearch(Point left, Point right) { int y = left.y; // the same for right and left Point mid; while (true) { if (abs(left.x - right.x) == 1) { if (abs(left.dF) <= abs(right.dF)) { return left; } else { ...
8
public Mob(Level level, int x, int y) { super(level, x, y); }
0
public static void quickSort2(int[] array, int[] array2, int lowIndex, int highIndex) { // this.printArray(); // System.out.println("low:high="+lowIndex+":"+highIndex); if (lowIndex >= highIndex) return; count2 += (highIndex - lowIndex); int i = lowIndex + 1; int pivot = choosePivot(array, lowIndex,...
4
@Override public void execute() { if (cadencia == Constantes.SUBIR) { if (ciclista.getCadencia() < 2) ciclista.setCadencia(ciclista.getCadencia() + 1); } else if (cadencia == Constantes.BAJAR) { if (ciclista.getCadencia() > 0) ciclista.setCadencia(ciclista.getCadencia() - 1); } else if (cadencia...
6
public boolean exists(ArrayList<Edge> edges, Node p1, Node p2){ boolean result = false; if(edges.isEmpty()) return false; for(Edge edge: edges){ if((edge.a.equals(p1) && edge.b.equals(p2)) || (edge.b.equals(p1) && edge.a.equals(p2))){ result = true; br...
6
public boolean batchAddConfig(String key, Map<String, Class> stringClassMap) { int index = key.indexOf(':'); String chain = key.substring(0, index); String cmdName = key.substring(index + 1); Command command = this.getCommandByChain(Arrays.asList(StringUtils.split(chain, ".")), cmdName)...
4
private void readLuminance() { int type = sourceImage.getType(); if (type == BufferedImage.TYPE_INT_RGB || type == BufferedImage.TYPE_INT_ARGB) { int[] pixels = (int[]) sourceImage.getData().getDataElements(0, 0, width, height, null); for (int i = 0; i < picsize; i++) { int p = pixels[i]; int r = (p &...
9
public int[] cycleLengthDistrb(){ int maxCL=0; Network A; for(int i=0; i<bucket.size(); i++){ A = library.get( bucket.get(i).getID() ); maxCL = (A.getCycleLength() > maxCL)? A.getCycleLength() : maxCL; } int[] CLDistrb = new int[maxCL+1]; for(int i=0; i<bucket.siz...
3
private boolean safeToPlace(int x, int y, Boolean[][] grid){ for(int i=0; i<grid.length; i++){ if(grid[i][y] == true){ return false; } } for(int j=0; j<grid.length; j++){ if(grid[x][j] == true){ return false; } ...
8
private void XposTFKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_XposTFKeyTyped boolean OK = false; if((evt.getKeyChar()=='-')&&(XposTF.getText().equals("")))OK = true; if((evt.getKeyChar()=='.')&&(!XposTF.getText().equals("")&&!XposTF.getText().equals("-")))OK = true; if((evt...
8
@Override public void fire(T arg) { queue.add(arg); if ( queue.size() >= 3 ) { for ( T next = queue.poll(); next != null; next = queue.poll() ) { logger.info("Event Decorator firing event for type: [{}]", arg); event.fire(next); } } }
2
public void putAll( Map<? extends Integer, ? extends Character> map ) { Iterator<? extends Entry<? extends Integer,? extends Character>> it = map.entrySet().iterator(); for ( int i = map.size(); i-- > 0; ) { Entry<? extends Integer,? extends Character> e = it.next(); ...
8
static void testValidity(Object o) throws JSONException { if (o != null) { if (o instanceof Double) { if (((Double)o).isInfinite() || ((Double)o).isNaN()) { throw new JSONException( "JSON does not allow non-finite numbers."); ...
7
public Segment getBestMatchingSegment() { boolean found=false; Segment bestMatchingSegment = new Segment(); int max=MinThreshold; if(distSegments.size()>0){ for(Segment seg : distSegments){ //can't be the segment made this prediction if(seg.sequenceSegment==false && seg.segmentActive(false, true)==fa...
8
* @param count the number of rows to be removed * @param shift whether to shift subsequent rows up to fill the empty space */ public void removeRows( int first, int count, boolean shift ) { for( int rowIdx = first; rowIdx < (first + count); rowIdx++ ) { //this.removeRowContents(rowIdx); Row row = rows...
8
public SimpleStringProperty extensionProperty() { return extension; }
0
private static String hmacDigest(String msg, String keyString, String algorithm) { String digest = null; try { SecretKeySpec key = new SecretKeySpec((keyString).getBytes("UTF-8"), algorithm); Mac mac = Mac.getInstance(algorithm); mac.init(key); byte[] byt...
5
private static long getMillisPerUnit(int unit) { long result = Long.MAX_VALUE; switch (unit) { case Calendar.DAY_OF_YEAR: case Calendar.DATE: result = MILLIS_PER_DAY; break; case Calendar.HOUR_OF_DAY: result = MILLIS_PER...
6
@Override public boolean supportsEditability() {return true;}
0
private void findCutOff(double[] pos, double[] neg){ int[] pOrder = Utils.sort(pos), nOrder = Utils.sort(neg); /* System.err.println("\n\n???Positive: "); for(int t=0; t<pOrder.length; t++) System.err.print(t+":"+Utils.doubleToString(pos[pOrder[t]],0,2)+" "); System.err.println...
9
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { Player player = null; if (sender instanceof Player) { player = (Player) sender; } if (player == null) { sender.sendMessage("This command can only be run by a player"); return true; } ...
9
public static Set executeQuery(Connection con, String sql, List predicates, int numReturnColumns, String errorMessage) { PreparedStatement ps = null; Set rows = new HashSet(); try { ps = con.prepareStatement(sql); for (int i = 0; i < predicates.size(); i++) { int index = i + 1; ps.setObje...
4
public static void main( String[] args ) { Options options = new Options(); CmdLineParser parser = new CmdLineParser( options); boolean goodCommandLine; try { parser.parseArgument(args); goodCommandLine = true; } catch (CmdLineException exc) { goodCommandLine = fal...
5
String checkSecurity(int iLevel, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request){ try { Object o1 = session.getAttribute("UserID"); Object o2 = session.getAttribute("UserRights"); boolean bRedirect = false; ...
7
private static boolean isValidInteger(String value) { final int l = value.length(); if(l > 0) { int i = 1, c = value.charAt(0); if(c == CP || c == CM || (c >= C0 && c <= C9)) { for (; i < l; i++) { c = value.charAt(i); if (c < C0 || c > C9) ...
8
private final static void init(String path) throws MasterException { if(path == null || path.equals("")) throw new MasterException("The path is not null or empty string"); if(MasterMetadata.initFlag) //If it is already initialized. return; MasterMetadata.dir= new File(path); if(MasterMetadata...
4
public static void main(String... args) { Flag flag = Flag.NO_FLAGS; if(args.length==1){ flag = Flag.HELP; } if(args.length==2){ args[0] = args[0].toLowerCase(); //Si se usa la bandera de archivo if(args[0].equals("-f")){ //Asignamos e...
7
public void refreshCustomTablist(Player player, List<String> slots) { if (this.playerCustomTablists.containsKey(player)) { List<String> tablist = new ArrayList<String>(); for (String string : slots) { tablist.add(string); } for (int i = 0; i < tablist.size(); i++) { String slot = (Stri...
9
public void drawTo(Graphics g){ if(settings.drawXAxis) drawXAxis(g); if(settings.drawYAxis) drawYAxis(g); if(settings.drawXTicks) drawXTicks(g); if(settings.drawYTicks) drawYTicks(g); for(int i = 0; i < equations.size(); i++) drawEquation(equations.get(i),g); for(int i = 0; i < points.size();...
6
public void actionPerformed(ActionEvent e) { if ("btnOK".equals(e.getActionCommand())) { int type; if (optCont.isSelected()) type = 2; else type = 1; String name = objective.getName(); objective.updateDetails(type, txtName.getText(), txtUnit.getText()); con.g...
5
public void wavePresence(){ spawnedWave.checkPresence(); if (spawnedWave.checkPresence() == spawnedWave.enemyStrength()){ bottomButtons[4].setEnabled(true); bottomButtons[5].setEnabled(false); waveActive = false; if (!fastPaced){ enemyMover.stop(); bulletTime.stop(); } else{ enemyMover...
3
public static void assertElementContainsTextPosition(MyElement myElement, String elementText, int expectedPosition, WebDriver driver) { log.info("enter to function assertElementContainsTextPosition with element '" + myElement.getName() + "'"); options.setDriver(driver); options.setMyElement(myElement); optio...
4
public static void main(String[] args) { int array[] = {1,4,9,7,3,9,4,7,2,7,3,0,1,2,9,6,5,7,8,9}; int maxIndex = 0; int count = 0; for(int i= 0;i<array.length;i++){ if(array[maxIndex] == array[i]) count++; else if(array[maxIndex] < array[i]){ maxIndex = i; count = 1; } } int len = array...
6
public void setAlertid(int alertid) { this.alertid = alertid; }
0
public boolean execute(Robot paramRobot) { if ((paramRobot.getAssembly(1) instanceof Launcher)) { Launcher localLauncher = (Launcher)paramRobot.getAssembly(1); if (!localLauncher.isEmpty()) { Vector localVector = paramRobot.getEnvironment().getObjectAt(paramRobot.getPosition().getMap...
7
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof Product) { Product other = (Product) obj; if (null == this.name) { return false; } else { return this.name.equals(other.name); } } return false; }
3
public void setBase(int b) { baseWeeklySalary=b; }
0
boolean statement() { switch (_input.peek()) { case "create": createStatement(); break; case "load": loadStatement(); break; case "exit": case "quit": exitStatement(); return false; case "*EOF*": ...
9
public Main() { frame = new JFrame("CommandsEX Builder"); if (tempDir.exists()){ if (!tempDir.isDirectory()){ JOptionPane.showMessageDialog(frame, "The file " + tempDir.getPath() + " is not a directory", "Error", JOptionPane.ERROR_MESSAGE); System.exit(1); ...
8
public int run() { reset(); boolean finished = false; while (!finished) { updateSearchBox(); listProducts(); draw(); String option = getInput(); if (option.equals("<")) { finished = true; } else if (option.startsWit...
9
public static void main(String[] args) { // TODO code application logic here boolean validar=true; int opcion; char continuar; double monto; Account oAccount=new Account(); Scanner teclado=new Scanner(System.in); while...
8
public NameTree getNameTree() { if (!namesTreeInited) { namesTreeInited = true; Object o = library.getObject(entries, "Names"); if (o != null && o instanceof Hashtable) { Hashtable dest = (Hashtable) o; Object names = library.getObject(dest, "D...
5
private void loadMap(String filename) throws IOException { // TODO Auto-generated method stub ArrayList lines = new ArrayList(); int width = 0; int height = 0; BufferedReader reader = new BufferedReader(new FileReader(filename)); while (true) { String line = reader.readLine(); // no more lines to re...
6
@Override public boolean checkPassword(String login, String password) throws ProfileExceptions { if (login == null || login.isEmpty() || password == null || password.isEmpty()) return false; currentUser = FileParser.getFileParser().loadUser(login, password); if (currentUser == null) return false; ...
5
public static void main(String[] a) { // player array, in order Player [] players; // local var for now, while we get things in order, better than it being static // get the number of players System.out.print("How many players are there? "); int numPlayers = 5; System.out.print("\n There are...
6
public org.icepdf.core.pobjects.fonts.Font getFont(String s) { org.icepdf.core.pobjects.fonts.Font font = null; if (fonts != null) { Object ob = fonts.get(s); // check to make sure the library contains a font if (ob instanceof org.icepdf.core.pobjects.fonts.Font) { ...
4
public boolean dropthing(Widget w, Coord c, Object thing) { if (w instanceof DropTarget) { if (((DropTarget) w).dropthing(c, thing)) return (true); } for (Widget wdg = w.lchild; wdg != null; wdg = wdg.prev) { Coord cc = w.xlate(wdg.c, true); if...
5
public synchronized void setMaxSize(int max_size) { this.max_size = max_size; if (getSize() > max_size) { queue.setSize(max_size); } }
1
@Override public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException { if (!shouldSkip(path)) { mHandler.processFile(path); } return FileVisitResult.CONTINUE; }
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 feel. * For details see http://download.oracle.com/javase/t...
6
private int matchAddress(Matcher matcher) { int addr = 0; for (int i = 1; i <= 4; ++i) { int n = (rangeCheck(Integer.parseInt(matcher.group(i)), -1, 255)); addr |= ((n & 0xff) << 8*(4-i)); } return addr; }
1
@Override public boolean equals(Object obj) { boolean equal = false; if(obj != null && obj instanceof SubjectID) { SubjectID right = (SubjectID) obj; if(right.contributor != null && right.value != null && this.contributor != null && this.value != null) { equal = this.contributor.equals(right.contr...
7
@Override public String getReply(String message, String pnumber) { if(state==-1){ message=convertMessageFromShortcut(message); state=0; } if(state==0){ String reply=new PIDGetter(getUserID(),pnumber,this,true,getLanguage().getLanguage()).getReply(message, pnumber); if(deleteSession==true) retu...
7
private double[][] calResponsibility(double[][] smatrix, double[][] amatrix) { double[][] rmatrix = new double[dNum][dNum]; for (int i = 0; i < dNum; i++) { for (int k = 0; k < dNum; k++) { //计算 max{A(i,j)+S(i,j)} double maxAS = -Double.MAX_VALUE; ...
6
public boolean addNode(Root node) { return branchs.add(node); }
0
private void checkBestSolution() { if (!haveBest) { haveBest = true; Ant ant = ants[0]; best.copyAnt(ant); } //currently only PROJECT_ACTUAL_DURATION int currentBest = best.getActualDuration(); int bestIndex = -1; for (int antIndex = 0; antIndex < ants.length; antIndex++) { Ant ant = ants[a...
4
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
static private int jjMoveStringLiteralDfa1_0(long active0) { try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(0, active0); return 1; } switch(curChar) { case 97: return jjMoveStringLiteralDfa2_0(active0, 0x40000000L); case...
9
@Override public double getHeight() { double height = 0; double y = getY(); double temp = 0; ModelSubset[] subs = getAnimatedModel().getSubsets(); for (int i = 0; i < subs.length; i++) { for (int j = 0; j < subs[i].getVertices().length; j++) { temp = subs[i].getVertices()[j].getY() - y; Math.abs(t...
3
public void clearMap(GameAction gameAction) { for (int i=0; i<keyActions.length; i++) { if (keyActions[i] == gameAction) { keyActions[i] = null; } } for (int i=0; i<mouseActions.length; i++) { if (mouseActions[i] == gameAction) { ...
4
public short write_msg(short severity, final String msg) { if (!is_init) { MsgDumperCmnDef.WriteErrorSyslog(__FILE__(), __LINE__(), "Library has been initialized"); return MsgDumperCmnDef.MSG_DUMPER_FAILURE_INCORRECT_OPERATION; } short ret = MsgDumperCmnDef.MSG_DUMPER_SUCCESS; // Mark the time that the ...
5
public boolean testForcedJump(){ // Boolean for whether or not it passed the test. boolean forceJumpTest = true; // Find out who has control of the board. // Should be the same as the last test. int turn = testFacade.whosTurn(); // Position the p...
6
private void randomizeBackground(Background background) { int j = 256; for (int k = 0; k < anIntArray1190.length; k++) anIntArray1190[k] = 0; for (int l = 0; l < 5000; l++) { int i1 = (int) (Math.random() * 128D * j); anIntArray1190[i1] = (int) (Math.random() * 256D); } for (int j1 = 0; j1 < 20; j1...
9
private static boolean determineVerbosity(String[] args) { if (args != null && args.length > 0) { for (int i = 0; i < args.length; i++) { if ("-c".equals(args[i])) { return false; } } } return true; }
4
public static void main(String[] args) { Receiver receiver = new Receiver(); Command command = new ConcreteCommand(receiver); Invoker invoker = new Invoker(command); invoker.action(); }
0
public int attack(NPC jM, Entity target) { int attack = Utils.getRandom(3); int hit = Utils.getRandom(600); int distanceX = target.getX() - jM.getX(); int distanceY = target.getY() - jM.getY(); NPCCombatDefinitions defs = jM.getCombatDefinitions(); int size = jM.getSize(); if (distanceX < -1 || distanceY ...
6
@Override public void run() { try { this.previous = this.getSelectedText(User32.INSTANCE, CustomUser32.INSTANCE); } catch (Exception e) { this.previous = null; } while (this.turnedOn) { String selectedText = null; if (this.isThereAnySubs()) { try { selectedText = thi...
7
public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); String temp = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; for (int t = 1; t <= n; t++) { String s = sc.next(); int[] arr = new int[62]; ...
9
@Override public double itemSimilarity(long arg0, long arg1) throws TasteException { // TODO Auto-generated method stub Movie movie1 = movieMap.get(arg0); if(movie1 == null){ return 0;//TODO throw exception } Movie movie2 = movieMap.get(arg1); if(movie2 == null){ return 0;//TODO throw exception ...
5
@Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof StatusAtendimento)) { return false; } StatusAtendimento other = (StatusAtendimento) object; if ((this.codstatus...
5
public boolean During (interval index, long minStart, long maxStart, long minEnd, long maxEnd) { if ((index.Start.before(CurrentInterval.Start) || index.Start.equals(CurrentInterval.Start)) && abs(CurrentInterval.Start.getTime() - index.Start.getTime()) >= minStart ...
8
public void initializeParameters() { File myFile = new File("src/data.xml"); if (!myFile.exists()) { System.out.println(); System.out.println("File with parameters is NOT found!!!"); } if (!myFile.canRead() || !myFile.canWrite()) { System.out.println(...
7
public static void computePuz() { for(int i = 0; i < DataInfo.numUsers; i++) { int numrate = DataInfo.userInfo[i].length; double[] temp = new double[DataInfo.hidVariables]; for(int k = 0; k < DataInfo.hidVariables; k++) temp[k] = 0; for(int j = 0; j < numrate; j++) { int item = DataInf...
9
@Override protected void download() throws Exception { ChartInputDto chartInput = this.getInput(); Util.print("Fetching %s&%s=%s&%s=%s&%s=%s", Constant.SEARCH_URL, Constant.CHART_PREFIX, chartInput.getChartPrefix(), Constant.CHART_NUMBER, chartInput.getChartNumber(), Constant.CHART_SUFFIX, chartInput.getCha...
9
public void getLabel(StringBuffer s) throws Exception { //for now just return identity //StringBuffer s = new StringBuffer(); FastVector tmp = (FastVector)m_ranges.elementAt(0); if (m_classObject != null && m_training.classAttribute().isNominal()) { s.append("Classified by\...
9
public synchronized void queueStatus(HTSMsg msg, int clientId){ Subscription s = getSubscription((Long) msg.get("subscriptionId"), clientId); HTSPServerConnection c = monitor.getServerConnection(s.serverConnectionId); msg.put("subscriptionId", s.serverSubscriptionId); try { c.send(msg); } catch (IOExceptio...
2
private void getToEdgeBeeper() { while (beepersPresent() && frontIsClear()) { move(); } turnAround(); if (noBeepersPresent()) { move(); } }
3
private void Add_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Add_ButtonActionPerformed Panel_Ajouter panajout = new Panel_Ajouter(); Deal deal = new Deal(); int result = JOptionPane.showConfirmDialog(null, panajout, "Test", JOption...
8
private float getRelativeAngle() { int y = -((int) player.getY() - (int) enemy.getY()); int x = (int) player.getX() - (int) enemy.getX(); float hyp = (float) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); if (hyp == 0) { return 0; } if (y == 0) { if (...
9
@Override public synchronized Object[][] getBooks(UnaryOperator filter) { List<Object[]> title_books = new ArrayList(); int i=0; for(TTitle_book next2:mTitle_books) for(TBook next:next2.getmBooks()) { if(filter!=null && !filter.call(next.getmTitle_book...
7
public void saveMoveToUndo(ArrayList<DrawableItem> selected) { ArrayList<UndoableItem> toAdd = new ArrayList<>(); for (DrawableItem selection : selected) { UndoableItem ud = new UndoableItem(selection, 2); Panel temp = (Panel) selection; int dx = ((Panel) selection).g...
1
public void CHI(HashMap<String, _stat> featureStat, int[] classMemberNo){ m_selectedFeatures.clear(); int classNo = classMemberNo.length; int N = Utils.sumOfArray(classMemberNo), sumDF; double[] X2tc = new double [classNo]; double X2avg = 0; for(String f: featureStat.keySet()){ //Filter the feature...
4
public int[] getGoodStuff(LevelEntity[][] level){ int[] goodArray = new int[level.length]; Arrays.fill(goodArray, Integer.MAX_VALUE); int distanceFromGround = level.length; for (int xx = 0; xx < level.length; xx++){ for (int yy = 0; yy < level[0].length; yy++){ if (level[xx][yy] == LevelEntity.Coin || l...
7
private static void checkOpenGlCaps() { log(""); log(getVersion()); log("" + new Date()); log("OS: " + System.getProperty("os.name") + " (" + System.getProperty("os.arch") + ") version " + System.getProperty("os.version")); log("Java: " + System.getProperty("java.version") + ", "...
3
private void addBarcodes(final Document document, PdfWriter writer) { /** * Mögliche Barcodes: * BarcodeEAN, BarcodeEANSUPP, Barcode128, BarcodeInter25, * BarcodePostnet, Barcode39, BarcodeCodabar * BarcodePDF417, BarcodeDatamatrix, BarcodeQRCode */ final CMY...
3
static void drawGui() { fixedGraphics.setColor(Color.BLACK); fixedGraphics.fillRect(10 - OUTLINE_WIDTH, 10 - OUTLINE_WIDTH, 100 + OUTLINE_WIDTH * 2, 10 + OUTLINE_WIDTH * 2); if (Player.health > 0) { fixedGraphics.setColor(Color.CYAN); fixedGraphics.fillRect(10, 10, Player...
2
public String getPlayerAvalableAction(int playerIndex) { Player currentPlayer = playerList.get(playerIndex); //player's state is fold or all-in or lose if(currentPlayer.getState().equals(Player.States.ALL_IN) || currentPlayer.getState().equals(Player.States.FOLD) || currentPlayer.getState().equals(Player...
8
public int getLastDay() { return lastDay; }
0
@Override public void mouseClicked(MouseEvent e) { //System.out.println("DND Mouse Clicked: " + e.paramString()); }
0
public void create(PypAdmControlProfesionales pypAdmControlProfesionales) { if (pypAdmControlProfesionales.getPypAdmAsistConList() == null) { pypAdmControlProfesionales.setPypAdmAsistConList(new ArrayList<PypAdmAsistCon>()); } EntityManager em = null; try { em = g...
7
String checkSecurity(int iLevel, javax.servlet.http.HttpSession session, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request){ try { Object o1 = session.getAttribute("UserID"); Object o2 = session.getAttribute("UserRights"); boolean bRedirect = false; ...
7
private void checkButtonState(DefaultListModel listModel, JButton botonAdd, JButton botonRemove) { //Habilita o deshabilita el boton ADD o Remove if (listModel.isEmpty()) { botonAdd.setEnabled(false); botonRemove.setEnabled(true); } else if (!botonRemove.isEnabled()) { ...
2
public void dumpInstruction(TabbedPrintWriter writer) throws java.io.IOException { if (label != null) { writer.untab(); writer.println(label + ":"); writer.tab(); } writer.print("switch ("); instr.dumpExpression(writer.EXPL_PAREN, writer); writer.print(")"); writer.openBrace(); for (int i = 0;...
2
public void loadParentDoc(String fileName) { if (fileName == null || fileName.isEmpty()) return; JSONObject json = LoadJSON(fileName); String title = Utils.getJSONValue(json, "title"); String content = Utils.getJSONValue(json, "content"); String name = Utils.getJSONValue(json, "name"); String[] sentence...
5
public void visitConstant(Attribute.Constant _value) { Object value = _value.value; switch (_value.type.tag) { case BYTE: databuf.appendByte('B'); break; case CHAR: databuf.appendByte('C'); break; ...
9
public void onUpdate() { if (isEntityAlive()) { lastActiveTime = timeSinceIgnited; int i = getCreeperState(); if (i > 0 && timeSinceIgnited == 0) { worldObj.playSoundAtEntity(this, "random.fuse", 1.0F, 0.5F); } ...
7
public void keyReleased(KeyEvent e) { // aktion auswahl bildschirm beim drücken von e ein/ausblenden if (e.getKeyChar() == 'e') { showActionSelect = !showActionSelect; } // nur status ändern wenn Gotchi nicht beschäftig ist! if (showActionSelect && gotchi.getState() == GotchiState.DEFAULT) { switch (e...
6
public List<String> getCommandList() { return accesscommands; }
0
public String getExecCommand() { return execCommand; }
0