text
stringlengths
14
410k
label
int32
0
9
private static void startContest() { String name = contestName; log("Loading \"" + name + "\" contest configurations..\n"); Server_Loader.contestFolder = new File("contests/" + name); log("Contest directory: " + Server_Loader.contestFolder.getAbsolutePath().toString() + "\n"); tr...
5
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
@Override public boolean equals(Object obj) { if (obj == null || obj.getClass() != this.getClass()) { return false; } if (this == obj) { return true; } State state2 = (State) obj; if (this.isFinal ^ state2.isFinal() || this.ge...
8
public void handleResize() { winSize = cv.getCanvasSize(); if (winSize.width == 0) { return; } dbimage = new BufferedImage(winSize.width, winSize.height, BufferedImage.TYPE_4BYTE_ABGR); int h = winSize.height / 5; /*if (h < 128 && winSize.height > 300) ...
6
public void action(String stringRecup) { if (stringRecup.equals("")) { practice.addWrong(iterateur - 1); } else { switch (e.getType()) { case "calculation": actionIfCalculation(stringRecup); break; case "frac...
6
private void setMobs() { switch (lvl) { case 1: mobsStack = new ArrayList<GenericMinion>(); for (int i = 0; i < 30; i++) mobsStack.add(new Minion1Ground(new Vector2d(50, 50))); break; case 2: mobsStack = new ArrayList<GenericMinion>(); for (int i = 0; i < 30; i++) mobsStack.add(new Minion1G...
4
private static String htmlFilter(String message){ if(message == null) return null; int len = message.length(); StringBuffer result = new StringBuffer(len + 20); char aChar; for(int i =0; i< len; i++){ aChar = message.charAt(i); switch (aChar) { case '<': result.append("&lt;"); break; ...
8
public void login(HttpServletRequest httpRequest, HttpServletResponse httpResponse) { log.info("Starting DrupalAuth authentication"); HttpSession session = httpRequest.getSession(); session.setAttribute("drupalauth.authCookieName", authCookieName); session.setAttribute("drupalauth.authValidation...
2
private static void sortByX(ArrayList<Point> xArray) { Collections.sort(xArray, new Comparator<Point>() { @Override public int compare(Point p1, Point p2) { if (p1.getX() > p2.getX()) { return 1; } else if (p1.getX() < p2.getX()) { ...
6
protected void init() { this.setTitle(descriptor.getWindowTitle()); //add default action listeners for this descriptor if there aren't any yet if(descriptor.getActionListeners().isEmpty()) { defaultActionListener = new ConfirmDialogActionListener(); descriptor.add...
8
public void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { String arkID; arkID = null; try { arkID = request.getParameter( "ark" ); } catch ( Exception e ) { e.printStackTrace(); } if ( ...
4
public String getTranscriptId() { // Try transcript ID String trId = get("transcript_id"); if (trId != null) return trId; // Try 'protein'... trId = get("protein_id"); if (trId != null) return trId; // Try 'locus'... trId = get("locus_tag"); if (trId != null) return trId; // Try 'db_xref'... tr...
5
public boolean isDominatorSet(VarVersionNode node, HashSet<VarVersionNode> domnodes) { if (domnodes.size() == 1) { return engine.isDominator(node, domnodes.iterator().next()); } else { HashSet<VarVersionNode> marked = new HashSet<>(); if (domnodes.contains(node)) { return true; ...
8
private void closeThisWindow() { final String[] options = new String[]{"Save", "Discard", "Cancel"}; int ret = JOptionPane.showOptionDialog(theFrame, "You have unsaved changes", "Warning", 0, 0, null, options, options[0]); switch(ret) { case -1: case 2: // -1 is cancel, +2 is Cancel return; case 0:...
6
public void preAssignedCoupon() { String querySELECTMSISDN = "select coupon_id from definingpreassigned_coupons"; String querySELECTSISDN1 = "select deviceid,dreg_date from device order by dreg_date"; log.info(querySELECTMSISDN); log.info(querySELECTSISDN1); try { ...
8
@SuppressWarnings("unused") private ParkingPlace getItem() { ParkingPlace place = null; LOCK.lock(); try { for (int i = 0; i < SIZE; i++) { place = PLACES.get(i); if (!place.isUsed()) { place.togleUsed(); } return place; } } finally { LOCK.unlock(); } return place; }
2
public boolean pollout (int index) { if (index < 0 || index >= this.next) return false; return items [index].isWritable (); }
2
private void resize(int capacity) { LinearProbingHashST<Key, Value> temp = new LinearProbingHashST<Key, Value>(capacity); for (int i = 0; i < M; i++) { if (keys[i] != null) { temp.put(keys[i], vals[i]); } } keys = temp.keys; vals = temp.val...
2
@Test public void test() { for(int k = 1; k < n; k++){ expValues.add(Integer.valueOf(k)); } Map<Integer, List<Double>> messwerteNormal = new HashMap<>(); Map<Integer, List<Double>> messwerteFast = new HashMap<>(); GeneratorModule gm = new GeneratorModule(n, n, 0.01); // p = 0.01 gm.generateRandomMa...
7
public void step(Graphics2D graphics) { drawTitle(graphics); graphics.setColor(Color.WHITE); for (Star star : stars) { star.update(); star.draw(graphics); } for (Button button : buttons) button.draw(graphics); for (HoverBox hoverbox : h...
3
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Object result = null; // Clear the results from the previous invocation. results.clear(); // For each listener currently in this notifier... for (T listener : this) { // Catch errors thrown by listeners t...
3
public List<Integer> inorderTraversal(TreeNode root){ List<Integer> list = new ArrayList<Integer>(); if(root == null) return list; inorderRec(list,root); return list; }
1
public ArrayList<Bid> getBids() { ArrayList<Bid> history = new ArrayList<>(20); for (Bid b : bids) { if (b.bid > 0) history.add(b); } return history; }
2
public boolean equals(Object other) { if (!(other instanceof Location)) return false; Location otherLoc = (Location) other; return getRow() == otherLoc.getRow() && getCol() == otherLoc.getCol(); }
2
@Override public void move(Direction direction) { while (getGrid().canMoveElement(this, direction)) { getGrid().moveElement(this, direction); decrementLifetime(); } }
1
public Grid() { start(); }
0
private boolean isDropPlaneIntersected(char direction, int index) { if (index < 0 || index >= modelManager.frame.atomCount) return false; Atom at = modelManager.frame.atoms[index]; Point3f center = dropPlane.getCenter(); float radius = at.getVanderwaalsRadiusFloat(); switch (direction) { case 'x': if ...
8
public void mouseDragged(MouseEvent arg0) { //super.mouseDragged(arg0); System.out.println(arg0.getPoint()); if (pressed) { if (superInstance.getDisplayedToolIndex() == 1) { superInstance.setStartPoint(arg0.getPoint()); cover.setStartPoint(arg0.getPoint()); // superInstance.updateDisplay(); } els...
3
public void setTable(List<TableColumnDesc> table) { this.table = table; }
0
private void antTurn() { // Queen Ants takes her turn first QueenTurn.takeTurn(turn); ListIterator<Ant> itr = activeAnts.listIterator(0); // Iterates through the activeAnts Linked List letting each ant in the list take a turn while (itr.hasNext()) { ant = (Ant) itr.next(); if (ant.isAlive() =...
6
public void testConstructor_ObjectStringEx4() throws Throwable { try { new LocalDate("T10:20:30.040"); fail(); } catch (IllegalArgumentException ex) {} }
1
public static void main (String[] args) { // Parse args if (args.length < 3) { System.out.println("Usage \"droid-arena-java BOT_CLASS_NAME CSRF_USER CSRF_TOKEN\""); return; } CSRF_USER = args[1]; CSRF_TOKEN = args[2]; // Init bot String b...
6
public static void setPrograms() { getPrograms().clear(); try { String line, name = ""; String[] str = null; Process p = Runtime.getRuntime().exec(System.getenv("windir") +"\\system32\\"+"tasklist.exe /v /fo csv"); BufferedReader input = new BufferedReader(new InputStreamReader...
7
public void render(Graphics g) { switch(state) { case INTRO: try { g.setColor(Color.GREEN); g.fillRect(0, 0, getWidth(), getHeight()); int width = 400, height = 200; g.drawImag...
5
public void sendToTimeToSolve(long timeInSec) { OSCMessage message1 = new OSCMessage("/ch/timetosolve"); message1.addArgument((float)timeInSec); send(message1); }
0
public CheckResultMessage checkSum3(int i, int j) { int r1 = get(10, 2); int c1 = get(11, 2); int tr1 = get(20, 5); int tc1 = get(21, 5); BigDecimal sum = new BigDecimal(0); if (checkVersion(file).equals("2003")) { for (File f : Main1.files1) { try { in = new FileInputStream(f); hWorkbook =...
9
public void redoLastMove() { if (!this.redoList.empty()) { Move lastMove = this.redoList.pop(); // this.executeMove(lastMove); // Will clear the redo list !!!OBS!!! lastMove.execute(); Player oppositePlayer = this.getOppositePlayer(lastMove.player); this.setTurn(oppositePlayer); // Change turn to opposi...
2
private void parseQuantifier(Node node) { if (offset < input.length()) { char c = input.charAt(offset); if (c == '{') { offset++; int end = input.indexOf('}', offset); String[] temp = input.substring(offset, end).split(","); if (temp.length == 2) { node.setBounds(Integer.parseInt(temp[...
6
public static ArrayList<Question> getQuestionsByQuizID(int quizID) { ArrayList<Question> questionList = new ArrayList<Question>(); try { String statement = new String("SELECT * FROM " + DBTable + " WHERE quizid = ?"); PreparedStatement stmt = DBConnection.con.prepareStatement(statement); stmt.setInt(1, qui...
2
public void endDocument() throws IOException { // End all open elements. while (!openElements.isEmpty()) { endElement(); } w.flush(); //writers do not always flush automatically... }
1
public static int closestPoint(ArrayList<Point> points) { Point min = new Point(Integer.MAX_VALUE, Integer.MAX_VALUE); int index = 0; for (Point point : points) { if (point.getY() < min.getY()) { min = point; index = points.indexOf(point); ...
4
public String getPermutation(int n, int k) { boolean[] output = new boolean[n]; StringBuilder buf = new StringBuilder(""); int[] res = new int[n]; res[0] = 1; for (int i = 1; i < n; i++) res[i] = res[i - 1] * i; for (int i = n - 1; i >= 0; i--) { int s = 1; while (k > res[i]) { s++; ...
6
protected Type getSuperClass(final Type t) { if (currentClass != null && t.equals(currentClass)) { return currentSuperClass; } Class c = getClass(t).getSuperclass(); return c == null ? null : Type.getType(c); }
3
public void buildMLD (MPDComponent mpdComponent, MLDCommand mld) { String text, info; MPDEntite ent, oldEnt ; int cmp, nbId; boolean isFirst; mld.clear(); text = "# Modèle créé le : " + new java.util.Date() + " ;"; mld.addRequest(text); oldEnt...
5
public static boolean isSameTree(TreeNode p, TreeNode q) { if (null == p && null == q) return true; if (p == q) return true; if (null == p || null == q) return false; return p.val == q.val && isSameTree(p.left, q.left) && isSameTree(p.right, q.right); }
7
public Constraint(final Builder builder) { this.builder = builder; }
0
private void FillLists(){ try{ ResultSet AssetResults = null; ResultSet ElementResults = null; Statement GetAssets; Statement GetElements; ...
3
public void sortArray() { this.arrayAccess = 0; this.comparisions = 0; heap.buildMaxHeap(); for (int i = this.array.length - 1; i >= 0; i--) { try { this.array[i] = this.heap.pop(); this.arrayAccess++; } catch (EmptyCollectionExc...
2
public JButton getBoutons(int numBout) { return boutons[numBout]; }
0
@Override public void run() { System.out.println("thread started from "+start+" to "+stop ); for (int i = start;i<stop;i++){ text+=list.get(i); } GeoJsonReader.str[no]=text; System.out.println("thread "+no+" done"); }
1
void copyHeadersExceptEncoding(HttpRequest request, HttpURLConnection conn) { Map<String, List<String>> clientHeaders = request.getHeaders(); if (clientHeaders != null) { for (String header : clientHeaders.keySet()) { if (header.equalsIgnoreCase("accept-encoding")) { ...
4
private Catalogue readCatalogue(ByteArrayInputStream inputStream) throws XmlException, IOException { final Catalogue catalogue = new Catalogue(); try { SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser(); saxParser.parse(inputStream, new DefaultHandler() { ...
4
public static void copyStream(InputStream fin, OutputStream fout) throws IOException { int bufsize = 4096; for (int i = 0; i < 8; ++i) { byte[] buf = new byte[bufsize]; int size = 0; int len = 0; do { len = fin.read(buf, size, b...
3
public EigenvalueDecomposition (Matrix Arg) { double[][] A = Arg.getArray(); n = Arg.getColumnDimension(); V = new double[n][n]; d = new double[n]; e = new double[n]; issymmetric = true; for (int j = 0; (j < n) & issymmetric; j++) { for (int i = 0; (i < n) & issymmetr...
7
public void newConversation(String receiver) { if(mMessageWindows.get(receiver) == null) { MessageWindow window = new MessageWindow(receiver, this); window.setVisible(true); mMessageWindows.put(receiver, window); } else mMessageWindows.get(receiver).setVisible(true); }
1
public HashMap<String, TreeSet<String>> parse(BufferedReader br) { // functionMapIntra (function, caller set) is initialed HashMap<String, TreeSet<String>> functionMapIntra = new HashMap<String, TreeSet<String>>(); String currentLine = null; String currentNode = null; // update String key = ""; boolea...
8
synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); } ...
3
public static void directionsYouCanGo() { Locale northDirection = map.currentLocale; Locale southDirection = map.currentLocale; Locale eastDirection = map.currentLocale; Locale westDirection = map.currentLocale; Locale downDirection = map.currentLocale; Locale upDirection = map.currentLocale; System.out...
6
public void readFile() { JSONParser jsonParser = new JSONParser(); try { FileReader json = new FileReader("src/config.json"); Object obj = jsonParser.parse(json); JSONObject jsonObject = (JSONObject) obj; // Getting json values for SQL variables and DB ...
4
@Override public ResultSet query(String query) { //Connection connection = null; Statement statement = null; ResultSet result = null; try { this.connection = this.getConnection(); statement = this.connection.createStatement(); switch (this.getSta...
4
public void setPlotBuilder(PlotBuilder plotBuilder) { this.plotBuilder = plotBuilder; addModel(plotBuilder); }
0
@Override public String dismountString(Rider R) { switch(rideBasis) { case Rideable.RIDEABLE_AIR: case Rideable.RIDEABLE_LAND: case Rideable.RIDEABLE_WATER: return "disembark(s) from"; case Rideable.RIDEABLE_TABLE: return "get(s) up from"; case Rideable.RIDEABLE_SIT: case Rideable.RIDEABLE_SLEEP...
9
@Override public void evaluateLabels(Map<String, Integer> labelValues, int position) throws TokenCompileError { if(valueA.getData() != null) valueA.getData().evaluateLabels(labelValues, position); if(opcode.isBasic() && valueB.getData() != null) valueB.getData().evalu...
3
public void testPrinterParserMethods() { Period p = new Period(1, 2, 3, 4, 5, 6, 7, 8); PeriodFormatter f2 = new PeriodFormatter(f.getPrinter(), f.getParser()); assertEquals(f.getPrinter(), f2.getPrinter()); assertEquals(f.getParser(), f2.getParser()); assertEquals(true, f2.isPri...
2
public String found() { switch (ttype) { case TT_WORD: return sval; case TT_NUMBER: return Double.toString(nval); case TT_EOL: return "end-of-line"; case TT_EOF: return "end-of-file"; default: return (new Character((char) ttype)).toString(); } }
4
protected Behaviour getNextStep() { I.sayAbout(actor, "Getting next audit step... "+this.hashCode()) ; I.sayAbout(actor, "Stage was: "+stage) ; if (stage == STAGE_EVAL) { if (audited == null && Rand.num() > (Math.abs(balance) / 1000f)) { audited = nextToAuditFor(actor) ; } if ...
8
public static void main(String args[]) throws IOException { Pqueue pq = new Pqueue(); int ch; do{ System.out.println("1.ENCODE\n2.Display Table\n3.Exit"); System.out.print("Enter your choice: "); Scanner in = new Scanner(System.in); ch=in.nextInt()...
4
@Override public String getMobile() { return super.getMobile(); }
0
private boolean ant_is_alive(int id, Colour col){ boolean found = false; int x = 0; int y = 0; while(x < world.getRows() && !found){ while(y < world.getColumns() && !found){ Cell c = world.getCell(x,y); if(c.isAnt()){ if(c.getAnt().getId()==id && c.getAnt().getColour()==col){ found = true;...
7
public boolean importData(TransferHandler.TransferSupport info) { GlobalLogger.getLogger().logp(Level.INFO, this.getClass().getName(), "importData", "importData called."); if (!info.isDrop()) { return false; } // Get the task that is being dropped. Transferable t = info.getTransferable(); Task t...
6
public static HashSet<String> getRegulatorTypedNamesByGenericProcessID(String gpid, PathCaseRepository repository) { HashSet<String> set = new HashSet<String>(); ArrayList<ProcessToMoleculesTable.ProcessToMoleculesTableEntry> rows = repository.genericProcessToMoleculesTable.getRows(gpid); if (r...
8
@Override public void init(GameContainer gc, StateBasedGame sbg) throws SlickException { // font40 = new AngelCodeFont("res/fonts/04b03.fnt", new Image("res/fonts/04b03_0.png")); font24 = new AngelCodeFont("res/fonts/font24.fnt", new Image("res/fonts/font24_0.png")); font16 = new AngelCodeFont("res/fonts/font16.f...
2
@Override public Prototype copy() { Prototype prototype = null; try { prototype = (Prototype) this.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } return prototype; }
1
public void startParseInput(String string, UserParser newParser){ if(string.equals("")) return; if (newParser == null) { try { myParser = UserParser.get(grammar, string); } catch (IllegalArgumentException e) { JOptionPane.showMessageDialog(this, e.getMessage(), "Bad Input", JOptionPane.ERR...
3
public int checkadmins() { try { BufferedReader in = new BufferedReader(new FileReader("./data/administrators.txt")); String data = null; while ((data = in.readLine()) != null) { if (playerName.equalsIgnoreCase(data)) { return 5; } } } catch (IOException e) { System.out.pri...
3
public void plotPropagationCurves() { double[] eRange = getEnergyRange(); PlotFrame frame = new PlotFrame("Energy", "Propagation", "QW Propagation Curves"); for (int i = 1; i < intervals.size() - 1; i++) { if (intervals.get(i).getY() < intervals.get(i - 1).getY() && intervals.get(i)....
4
boolean isArithmetic(int[] arr) { int d = arr[1] - arr[0]; for (int i = 2; i < arr.length; i++) { if (arr[i] - arr[i - 1] != d) { return false; } } return true; }
2
public Collection<RoomEntity> getRooms() { return rooms; }
0
public ArrayList<Move> generateAllPossibleMoves(boolean color) { ArrayList<Move> moves = new ArrayList<Move>(); final List<Piece> listPiece; // Sélectionne la liste des pièces selon la couleur if (Helper.isColorWhite(color)) { listPiece = whites; } else { listPiece = blacks; } // Parcours les pièc...
7
@Override public String toString() { StringBuilder sb = new StringBuilder("\n"); for(int loop=0;loop<NUMBER_OF_OCCURRENCES_TO_BE_CONSIDERED_AS_BOT;loop++) { sb.append(loop).append(":").append(slots[loop]).append(loop==oldestSlot ? "<-- oldest " :"").append(loop==lastEntry ? "<--...
3
public void buscarDirectorio(String rutainicio, String mascara, boolean buscar, boolean pase) { File directorioroot = new File(rutainicio); File[] directorio = directorioroot.listFiles(); for (int i = 0; i < directorio.length; i++) { if (directorio[i].isDirectory() && buscar == true)...
7
public Station find(int id) { Station station = new Station(); try { ResultSet result = this.connect.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY).executeQuery("SELECT * FROM eleve W...
2
public void printParentheses(int l, int r, char ch[], int count) { if(l==0 && r==0) System.out.println(ch); if( l<0 || r<1) return; else { if(l>0) { ch[count] = '('; printParentheses(l-1, r, ch, count+1); } if(r>l) { ch[count]=')'; printParentheses(l, r-1, ch, count+1); } } }
6
public Connection(InetSocketAddress address){ try { this.selector = Selector.open(); } catch (IOException e) { LOGGER.severe("Could not open Selector! " + e.getMessage()); System.exit(1); } try { this.channel = SocketChannel.open(address); ...
3
public void atualizar(Curso curso) throws Exception { String sql = "UPDATE curso SET nome = ? WHERE id = ?"; try { PreparedStatement stmt = ConnectionFactory.getConnection().prepareStatement(sql); stmt.setString(1, curso.getNome()); stmt.setLong(2, curso.getId()); stmt.executeUpdate(); } catch (...
1
public boolean load(final ILoad load) { switch ( this.options.getType( ) ) { case FILE: final File file = new File((String) this.options.getArgument("target")); if ( !file.exists( ) ) try { if ( !file.createNewFile( ) ) throw new IOException( ); } catch ( final IOException e ) { return...
5
public void startServer() { System.out.println("Starting server..."); try { startServer(9876); System.out.println("Server started!"); } catch (CouldNotStartServerException e) { System.out.println("Server could not be started: " + e.getMessage()); } }
1
@Override public ElectionResult getElectionResult() { if (published && electionResult == null) switch (type) { case SIMPLEPLURALITY: electionResult = new DnDSimplePluralityResult(this); break; case ALTERNATE: electionResult = new DnDAlternativeVoteResult(votes, getCandidates()); break; ca...
5
@Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { Physical target=mob; if((auto)&&(givenTarget!=null)) target=givenTarget; if(target.fetchEffect(this.ID())!=null) { mob.tell(mob,target,null,L("<T-NAME> <T-IS-ARE> already affected by @x1.",...
7
public boolean equals(Object _other) { if (_other == null) { return false; } if (_other == this) { return true; } if (!(_other instanceof Group)) { return false; } final Group _cast = (Group) _other; if (id != _cast.id) { return false; } if (idModified != _cast.idModified) {...
8
private void txtPrixKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtPrixKeyTyped if (!Character.isDigit(evt.getKeyChar()) && evt.getKeyChar()!='.' && evt.getKeyChar()!=KeyEvent.VK_BACK_SPACE ) { getToolkit().beep(); JOptionPane.showMessageDialog(null, "Veuillez entrez ...
5
@Override public void actionPerformed(ActionEvent e) { //If the modSelection JComboBox is used, record the user selected modifier if ("modSelected".equals(e.getActionCommand())){ selectedModIndex = modSelection.getSelectedIndex(); } //If the clear button is pressed, empty the JTextAreas and set totalMod to ...
3
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } TreeNode<?> other = (TreeNode<?>) obj; if (data =...
8
public static JSONObject toJSONObject(String string) throws JSONException { JSONObject jo = new JSONObject(); HTTPTokener x = new HTTPTokener(string); String token; token = x.nextToken(); if (token.toUpperCase().startsWith("HTTP")) { // Response jo.p...
2
@Override public String makeMobName(char gender, int age) { switch (age) { case Race.AGE_INFANT: case Race.AGE_TODDLER: return name().toLowerCase() + " pinkie"; case Race.AGE_CHILD: switch (gender) { case 'M': case 'm': return "boy " + name().toLowerCase() + " pup"; case 'F': case '...
7
public void stepSim(long timeStep) { long endTime = this.curTime + timeStep; try { Connection con = EpiSimUtil.dbConnect(); PreparedStatement getInfected = con.prepareStatement( "SELECT infectedID FROM "+EpiSimUtil.dendroConTbl+" WHERE victimID = ?"); Statement getTransEvents = con.createStatement(); ...
7
public void destroy() { setAction(null); MouseListener[] ml = getMouseListeners(); if (ml != null) { for (MouseListener i : ml) removeMouseListener(i); } ActionListener[] al = getActionListeners(); if (al != null) { for (ActionListener i : al) removeActionListener(i); } ItemListener[] il =...
8
@Override public List<? extends DefaultModel> getObj(String campo) { if (campo.equals("Produtos")) { return Produto.service.findAll(); } return null; }
2
public LetThereBeLandCommand(String label, Panel p) throws HeadlessException { super(label); this.p = p; }
0
public void mouseClicked(MouseEvent event) { if (event.getModifiers() == event.BUTTON1_MASK) { if (event.getClickCount() == 1 && controller.isVertex(event.getPoint())) { controller.renameVertex(event.getPoint()); } else if (event.getClickCount() == 1 && controller.isEdge(event.getPoint())) { c...
5