text
stringlengths
14
410k
label
int32
0
9
private static boolean supportsDnD() { // Static Boolean if (supportsDnD == null) { boolean support = false; try { Class arbitraryDndClass = Class .forName("java.awt.dnd.DnDConstants"); support = true; } // end try catch (Exception e) { support = false; } // end catch supportsDnD =...
2
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page ...
5
public void onEnable() { instance = this; Configuration.reloadConfiguration(); dbcore = new DatabaseCore(this); clisten = new CoreEvents(this); plisten = new PlayerEvents(this); elisten = new EntityEvents(this); getServer().getPluginManager().registerEvents(clisten, this); getServer().getPluginManager()...
6
public List<String> getMedium() { if (medium == null) { medium = new ArrayList<String>(); } return this.medium; }
1
public static ArrayList<Excel> move(int a, int b, int c, ArrayList<Excel> toScale) { ArrayList<Excel> result = new ArrayList<Excel>(); double matrix[][] = { {1, 0,0,0}, {0, 1,0,0}, {0, 0,1,0}, {a, b,c,1} }; Matrix scaleMatrix = new Matrix(4,4); scaleMatrix.setM...
1
public void saveReport(){ final Dictation self = this; if(report == null) { //New report if(ddlPatient.getSelectedIndex() > 0) { SwingWorker<Boolean,Void> createWorker = new SwingWorker<Boolean,Void>(){ @Override protected Boolean doInBackground() throws Exception { return controller.cr...
7
public void render() { BufferStrategy bs = getBufferStrategy(); if (bs == null) { createBufferStrategy(3); return; } if (game != null) game.render(); if (menu != null) menu.render(art, this); for (int y = 0; y < art.getHeight(); y++) { for (int x = 0; x < art.getWidth(); x++) { ...
5
protected void fireTreeNodesChanged(Object source, Object[] path, int[] childIndices, Object[] children) { // Guaranteed to return a non-null array Object[] listeners = this.listenerList.getListenerList(); TreeModelEvent e = null; // Process the listeners last to first, notifying // those that are interested ...
3
public void removeKey(String var) { Boolean changed = false; if (this.props.containsKey(var)) { this.props.remove(var); changed = true; } // Use an iterator to prevent ConcurrentModification exceptions Iterator<String> it = this.lines.listIterator(); ...
7
private <E extends AnnotatedElement> AnnotatedHandlerBuilder<E> handleElement( final Class<E> annotatedElementType ) { return new AnnotatedHandlerBuilder<E>() { public <A extends Annotation> LinkedHandlingBuilder<E, A> annotatedWith( final Class<A> annotationType ) { ...
2
public Object [][] getDatos(){ Object[][] data = new String[getCantidadElementos()][colum_names.length]; //realizamos la consulta sql y llenamos los datos en "Object" try{ if (colum_names.length>=0){ r_con.Connection(); String c...
5
private boolean testFilterProperty_Size(SpecialFile other) { String byteType = this.filter.getMetricSize(); BigInteger sourceSize = new BigInteger(String.valueOf(this.SIZE)); BigInteger targetSize = new BigInteger(String.valueOf(other.SIZE)); String num = ""; switch (byteType) { default: case "BYTE": n...
7
private boolean init() { for (Object i : graph.getEdgeMap().values()) { Integer integer = (Integer) i; // wenn es nagative Werte gibt, gib eine Warnung aus if (Math.abs(integer) != integer) { JOptionPane.showMessageDialog(null, "Dijkstra kann auf diesen Graph nicht angewendet ...
4
private Zone checkActiveZone(Point eventLocation) { //Zone that event location is currently being checked against Zone currentZone = null; //Concise form of the event location int x = eventLocation.x; int y = eventLocation.y; //Flag which is set if event is found to be within a zone Boolean withinZone ...
6
private void putComment (Graphics2D g2d, String t, int i) { Integer fWidth = MainWindow.setupData.getPrintElementSetupList().getPrintElementSetup (i).getFieldWidth(); Font font = MainWindow.setupData.getPrintElementSetupList().getPrintElementSetup (i).getPrintFont(); Integer fontSize = font.getSize(); Integer ...
5
public boolean opEquals(Operator o) { if (o instanceof ConstOperator) { Object otherValue = ((ConstOperator) o).value; return value == null ? otherValue == null : value .equals(otherValue); } return false; }
2
public static Configuration getLauncherConfiguration() { final Configuration config = new Configuration(); // Load JavaConfig class. try { Class<?> clazz = configClass; if (clazz == null) { clazz = Configuration.class.getCl...
4
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String forwardTo = ""; String message = ""; String action = request.getParameter("action"); HttpSession session = request.getSession(); if...
7
public static boolean visibleFromP(Context viewedcontext, Context fromcontext) { { boolean testValue000 = false; if (viewedcontext == fromcontext) { testValue000 = true; } else { if (fromcontext.allSuperContexts.membP(viewedcontext)) { testValue000 = true; } ...
6
public void start() { if(!Run) { this.StartTimeStamp = System.currentTimeMillis(); this.Run = true; } else { try { throw new Exception("the stopwatch are running"); } catch (Exception e) { e.prin...
2
public void start() { if (timerOn) timer.startTimer(); }
1
public void writeHistory(DataOutput output) { try { output.writeInt(VERSION); int stringCount = stringCombo.getItemCount(); Vector strings = new Vector(); for (int i = 0; i < stringCount; ++i) { String next= (String) stringCombo.getItemAt(i); ...
4
@Override public void process(Object[] input) { this.mowers=new ArrayList<Mower>(); if(this.readFile((String)input[1])&&lawn!=null&&mowers!=null&&mowers.size()>0) { for(Mower m:mowers) { lawn.addMower(m); } lawn.startMowers(); for(Mower m:lawn.getMowers()) { System.out.print(m...
8
private void jButton1ActionPerformed() { if(Desktop.isDesktopSupported()){ try { Desktop.getDesktop().browse(new URI("http://www.twitch.tv/" + TwitchStream.getStreamID(jList1.getModel().getElementAt(jList1.getSelectedIndex()).toString().replace(" (ONLINE)", "")))); } catc...
2
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub response.setContentType("text/html"); PrintWriter out = response.getWriter(); //out.println("<html><body>"); // Retrieving Data from the Ajax Post ...
9
public OtpErlangTuple receiveMessage() { System.out.println("Controller:receiveMessage() is working"); try { OtpErlangObject erlangObject = mbox.receive(); msg = (OtpErlangTuple) erlangObject; System.out.println(msg); // if (erlangObject != null ){ // ...
2
public void cleanNotChangedToDama(){ boolean ctd = false; //Controllo se c'è una mossa che mi fa vincere for(int i=0;i<desmosse.length;i++) if(desmosse[i]!=null) if(desmosse[i].isChangedToDama()){ ctd = true; break; } System.out.println("Variabile che controlla se ci sono mossa ch...
7
public ArrayList<CharImage> extractCharImages(BufferedImage source){ //labeling image to this.labeledImage labeling(source); int width = labeledImage[0].length; int height = labeledImage.length; HashMap<Integer,CharRange> map = new HashMap<Integer,CharRange>(); ArrayList<CharImage> result = n...
5
private boolean ctrlFields() { if (ztAdresse.getText().isEmpty() || ztNom.getText().isEmpty() || ztPrenom.getText().isEmpty() || ztNumeroNational.getText().isEmpty() || ztTel.getText().isEmpty() || dpDateNaissance.getDate() == null ...
7
private String getUsers(String data) throws Exception{ users = null; users = new ArrayList<String>(); String userlist = ""; String begin = "<!--unameb-->"; String end = "<!--unamee-->"; String _tmp = data; while (_tmp.indexOf(begin) != -1) { int i = _tmp.indexOf(begin)+begin.length(); int k = _tm...
3
public String getSessionId() { return sessionId; }
0
public static void main(String[] args) { // Testing FileSet factory FileSet aFileSet, bFileSet, cFileSet; String testFile = "C:\\temp\\SerializedFileSet.sfs"; String testDirectory = "S:\\"; aFileSet = null; bFileSet = null; if(args.length < 2){ System.out.println("Please, specify valid parameters."...
6
private void initSimplexe(Matrice ciDansB, Matrice iDansB) { int colN = 0; int colB = 0; int nbN = 0; for(int i = 0; i<this.X.getNbColumns(); i++) { if(this.X.getValueAt(0, i) == 0) { nbN++; } } ...
4
public void paintComponent(Graphics canvas) { canvas.setColor(Color.WHITE); //Make sure the outside of the board is white. canvas.fillRect(0, 0, this.cols * X_DIM + 2*X_OFFSET, this.rows * Y_DIM + 2*Y_OFFSET); /*Placing the squares on the board*/ for(int i=0; i<this.rows; i++) { for(int j=0;...
8
public String getBookChapter(int book, int chapter) { String strBook = String.format("B%02d", book); String strChapter = String.format("C%03d", chapter); return strBook + strChapter; }
0
public List<TaxaNode[]> completeHierarchyPerTaxon(){ List<TaxaNode[]> completeHierarchy = new ArrayList<TaxaNode[]>(); TaxaNode t = null; TaxaNode[] th = null; for(String key: this.nodeList.keySet()){ t = this.nodeList.get(key); if(TaxonRank.SPECIES == t.getTaxonRank() || Taxon...
3
private JPanel getPanSaisieCle() { if (panSaisieCle == null) { GridBagConstraints gridBagConstraints8 = new GridBagConstraints(); gridBagConstraints8.gridx = 4; gridBagConstraints8.gridy = 6; GridBagConstraints gridBagConstraints61 = new GridBagConstraints(); gridBagConstraints61.gridx = 5; gridBagC...
4
public void imprimirRelatorioSQLNoRelatorio(Map parametros, String diretorio) { Connection conn = null; try { // Carrega conexão via JDBC Class.forName("com.mysql.jdbc.Driver"); conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/smdados", "root", "mutkch"...
5
public void loadServers(Bot bot, ResultSet rs) { // If something goes wrong... if (rs == null) { logMessage(LOGLEVEL_CRITICAL, "Unable to load servers from MySQL!"); return; } // Go through each server and initialize them accordingly int database_id = -1; try { Server server; while (rs.next()) ...
4
@Override public Set<String> getUserNames() { Set<String> users = new HashSet<String>(); PreparedStatement pStmt = null; ResultSet rs = null; try { pStmt = conn.prepareStatement("SELECT * FROM USER ORDER BY surname;"); rs = pStmt.executeQuery(); while (rs.next()) { users.add(rs.ge...
2
@Override public Scalar getScalar(String key) { if ("%localData".equals(key)) { return SleepUtils.getHashWrapper(data); } Scalar temp = (Scalar) data.get(key); if (temp == null && parmsValue != null && (Character.isDigit(key.charAt(1)) || key.charAt(1) == '-')) { StringParser parser; int begin, end;...
9
public DatatypeProperty getDatatypeProperty(OntModel model) { return model.createDatatypeProperty(getUri()); }
0
public void init() { boolean debug = CommandLine.booleanVariable("debug"); if (debug) { // Enable debug logging Logger logger = Logger.getLogger("com.reuters.rfa"); logger.setLevel(Level.FINE); Handler[] handlers = logger.getHandlers(); ...
6
static WeiboMessage parseInfo(Node infoNode) throws UnsupportedEncodingException { WeiboMessage msg = new WeiboMessage(); Span spanNode = (Span) Util.getFirstChildByTagName(infoNode, "span"); SimpleNodeIterator aNodeIter = Util.getChildrenByTagName(spanNode, "a") .elements(); while (aNodeIter.hasMoreNodes(...
8
public CachedRowSetImpl getRanking(){ try { Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); String url = "jdbc:derby:" + DBName; Connection connection = DriverManager.getConnection(url); Statement statement = connection.createStatement(); String getRanking = "SELECT jnick AS Jamertag, Level,...
1
private boolean isValidInput(final String s) { return s.matches("[0-9]{4}[-][0-9]{1,2}"); }
0
public static ArrayList<User> getAllUsers() { String url = "jdbc:mysql://localhost:3306/ouaamou_com"; String username = "root"; String password = ""; try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException e) { e.printStackTrace(); } ArrayList<User> users = new Arra...
9
public static String compileToHSAIL(String openCLSource, String baseName, String batchScript) { // return compileToHSAILJNI(openCLSource); try { final String oclFileName = baseName + ".ocl"; final String binFileName = baseName + ".bin"; final String hsailFileName = ba...
3
public MCQ getModel(int Question_ID) { MCQ mcquestion = new MCQ(); try { StringBuffer sql = new StringBuffer(""); sql.append("SELECT Question_ID,QType_ID,Question_Text"); sql.append(" FROM `MCQ`"); sql.append(" where Question_ID=" + Question_ID); ...
2
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8"); String view = "/WEB-INF/view/receiver/"; ReceiverCommand rcommand = null; if (request.getParameter...
9
@SuppressWarnings("unchecked") private static ArrayList<String> getCategoryCodes( HashMap<String, Object> map) { ArrayList<String> list = new ArrayList<String>(); Map<String, Object> attrs = (Map<String, Object>) map.get("attributes"); for (Object m : (ArrayList<Object>) attrs.get("subjects")) { String nam...
3
public static long task3(long x) { long a = 2; while (x > 1) { if ((x % a) == 0) { x = x / a; } else { a++; } } return a; }
2
public LRParseController(LRParsePane pane) { this.pane = pane; productions = pane.grammar.getProductions(); }
0
public void TelnetRead(StringBuffer buf, InputStream rawin, BufferedReader in[]) throws InterruptedIOException, IOException { final char c = (char) in[0].read(); if (mccppattern[patDex] == c) { patDex++; if ((patDex >= mccppattern.length) && (!neverSupportMCCP)) { while (rawin.available() > 0) ...
8
private void createDocumentNodes(List listNodes, CleanTimeValues cleanTimeValues) { Iterator it = listNodes.iterator(); while (it.hasNext()) { Object child = it.next(); if (child == null) { continue; } boolean toAdd = true; if (child instanceo...
9
@Override public void terminateSimulation(Host... network) { logger_.debug("Hello"); for (Host host : network) { logger_.debug("Trying to get a handle to {}:{}", host, host.getPort()); try { SimulationHandle simulationHandle = getRemoteHandle(host); ...
2
public void removeComponent(Component component) { if(component instanceof InteractableContainer) { InteractableContainer container = (InteractableContainer)component; if(container.hasInteractable(currentlyInFocus)) { Interactable original = currentlyInFocus; ...
8
public static Move TakeUserInput(int r1, int c1){ // Display the game board Game.board.Display(); PrintSeparator('-'); // Ask for user input System.out.println("Enter your Move."); System.out.println("Piece To Move:"); System.ou...
2
public void write(String symbol) { buffer.deleteCharAt(tapeHead); buffer.insert(tapeHead, symbol); cachedHash = 0xdeadbeef; }
0
@Override public boolean canImport(JComponent comp, DataFlavor[] flavors) { for (int i = 0; i < flavors.length; i++) { if (flavors[i] != null && flavors[i].equals(mxGraphTransferable.dataFlavor)) { return true; } } return false; }
3
public static void makeCompactGrid(Container parent, int rows, int cols, int initialX, int initialY, int xPad, int yPad) { SpringLayout layout; try { layout = (SpringLayout)pa...
7
public boolean addComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { if (averageGroundLevel < 0) { averageGroundLevel = getAverageGroundLevel(par1World, par3StructureBoundingBox); if (averageGroundLevel < 0) { ...
9
public void clear(){ for(int i=0;i<modes;i++){ mode_param[i]=null; } mode_param=null; for(int i=0;i<maps;i++){ // unpack does the range checking FuncMapping.mapping_P[map_type[i]].free_info(map_param[i]); } map_param=null; for(int i=0;i<times;i++){ // unpack does the range checking ...
8
@Override public void characters(char[] ch, int start, int length) throws SAXException { if (ch != null) { String s = new String(ch, start, length).trim(); if (product == null || s.length() < 1) { return; } else { if (qName.equalsIgnoreCase(ProductsConstants.PROVIDER.getContent())) ...
9
public void testClear() { ByteArrayBuilder builder = new ByteArrayBuilder(); byte[] testdata = new byte[1024]; for(int i=0;i<testdata.length;i++) { testdata[i] = (byte)i; } builder.clear(); for(int i=0;i<testdata.length;i++) { assertEquals(i, builder.length()); builder.append(testdata[i]); // c...
9
private void mapEdge(){ if(Base.render.yOffset < 0) Base.render.yOffset += mapMovementSpeed; if(Base.render.yOffset > (Base.level.height * 32) - Base.height) Base.render.yOffset -= mapMovementSpeed; if(Base.render.xOffset < 0) Base.render.xOffset += mapMovementSpeed; if(Base.render.xOffset > (Base.level.width *...
4
public String get(String keyValue, Object ... args) { String message = super.getMessage(keyValue, args, locale); if(inCharset != null && outCharset != null) { try { message = new String(message.getBytes(inCharset), outCharset); } catch(UnsupportedEncodingException e) { e.printStackTrace(); }...
7
private int getY(Dimensions dim){ Face direction = surface.roomView.playerDirection; if (direction == Face.EASTERN){ if (ceiling){ return dim.getX(); } return 100 - dim.getX(); } if (direction == Face.SOUTHERN){ return 100 - dim.getY(); } if (direction == Face.WESTERN){ if (ceiling){ ...
5
public boolean isActive(Component c) { boolean active = true; if (c instanceof JDialog) { JDialog dlg = (JDialog) c; if (dlg.getParent() instanceof JComponent) { return JTattooUtilities.isActive((JComponent) (dlg.getParent())); ...
6
public void newPiece(double percent) { Block piece = Block.EMPTY; if (percent < .14) piece = Block.TALL; else if (percent < .28) piece = Block.ELL; else if (percent < .42) piece = Block.BACKELL; else if (percent < .56) piece = Block.HORN; else if (percent < .70) piece = Block.EGYPT; e...
7
@Override public int compareTo(TVC o) { return intencity.compareTo(o.intencity); }
0
protected void processMouseEvent(MouseEvent e) { if (e.getID() == e.MOUSE_PRESSED) { if (hasFocus()) { int code = InputManager.getMouseButtonCode(e); mapGameAction(code, true); } else { requestFocus(); } ...
2
edge depthFirstTraverse( edge e ) { edge f; if ( e == null ) { f = this.root.leftEdge; if ( f != null ) f = f.findBottomLeft(); //this is the first edge of this search pattern return f; } else //e is non-null { if ( e.tail.leftEdge == e ) // if e is a left-oriented edge, we ski...
3
void load(){ theoriesSplittedsRead = original.split("END"); for(int i=0;i<theoriesSplittedsRead.length;i++) if(theoriesSplittedsRead[i].contains("THEORY ProofList IS")) proofListRead = theoriesSplittedsRead[i]; for(int i=0;i<theoriesSplittedsRead.length;i++) if(theoriesSplittedsRead[i].contains("...
8
public void mutate(int probabilty, int mutationSize) { Random randGen = new Random(); int test = randGen.nextInt(100); if(test > probabilty) return; //mutation if(bins.size() < mutationSize){ for(int i = 0; i < bins.size(); i++){ List<Element> items = bins.get(i).getAll(); for(int...
6
public ImageIcon saveImg(String imgUrl, String fileName, boolean returnImage) { System.out.println("Save to file " + fileName + " from " + imgUrl); try { URL url = new URL(imgUrl); BufferedImage originalBufImg = ImageIO.read(url); BufferedImage resizedBufImg = null; if(originalBufImg.get...
4
public static Vector<Vector<Move>> expandMoves(Board board, Player player){ Vector<Vector<Move>> outerVector = new Vector<Vector<Move>>(); if(player == Player.black){ Vector<Move> moves = null; moves = Black.CalculateAllForcedMovesForBlack(board...
8
synchronized void resizeMap(int x, int y) { int i, i2, X, Y; short newMap[][][]= new short[MapLayers][x][y]; X = MapColumns; if (x < MapColumns) { X = x; } Y = MapRows; if (y < MapRows) { Y = y; } for (i=0;i<X;i++) { for (i2=0;i2<Y;i2++) { try { newMap[i][i2] =...
9
private void btnLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoginActionPerformed if(con==null){ JOptionPane.showMessageDialog(null, "Could not connect to the database! Please check connection and then retry.", "Communication Failure", JOptionPane.ERROR_MESSAGE); ...
8
@SuppressWarnings("RedundantIfStatement") @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Pair pair = (Pair) o; if (first != null ? !first.equals(pair.first) : pair.first != null) return false; ...
7
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; ID3v2UrlFrameData other = (ID3v2UrlFrameData) obj; if (description == null) { if (other.description != null) return false; } else...
9
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { setBorder(UIManager.getBorder("TableHeader.cellBorder")); if (column == 4) { setIcon(new ImageIcon(scaleAmmoImage)); setPreferredSize(new Dimension(30, 30)); ...
3
private static VirusStats[] getVirusStats() { TreeMap<Integer, LinkedList<Virus>> invert = new TreeMap<Integer, LinkedList<Virus>>(); TreeMap<Virus, Integer> virusCounts = getVirusCounts(); // Invert the map for (Entry<Virus, Integer> entry : virusCounts.entrySet()) { int count = entry.getValue(); Virus v...
5
public void assign(Entry entry) { ColonyTile colonyTile = null; Building building = null; if (entry.getWorkLocation() instanceof ColonyTile) { colonyTile = (ColonyTile) entry.getWorkLocation(); colonyTiles.remove(colonyTile); } else if (entry.getWorkLocation() ins...
6
public boolean isSvek() { boolean defaultValue = false; // if (OptionFlags.SVEK && type == UmlDiagramType.CLASS) { // defaultValue = true; // } if (type == UmlDiagramType.CLASS) { defaultValue = true; } if (type == UmlDiagramType.OBJECT) { defaultValue = true; } if (type == UmlDiagramType.USECASE)...
9
private boolean generateRoom(int x, int y, Direction direction) { int roomWidth = Main.rand.nextInt(ROOM_MAX_SIZE - ROOM_MIN_SIZE) + ROOM_MIN_SIZE; int roomHeight = Main.rand.nextInt(ROOM_MAX_SIZE - ROOM_MIN_SIZE) + ROOM_MIN_SIZE; int x1, x2, y1, y2; if (direction == Directi...
9
public static boolean isCorporationID(int id) { try { InputSource data; String notCorp = "{\"info\":null,\"characters\":[]}"; data = Download .getFromHTTP("http://evewho.com/api.php?type=corplist&id=" + id); BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(data....
2
public static Graph initialize(DynamicArray<String> matrix) { Graph g = new Graph(); String[][] adjacencyMatrix = parseStringArray(matrix); Vertex[] vertices = new Vertex[matrix.getSize()]; for (int i = 0; i < vertices.length; i++) { vertices[i] = new Vertex(i); g...
5
public boolean Salvar(Pessoa obj) { if (obj.getCodigo() == 0) { try { PreparedStatement sql = getConexao().prepareStatement("insert into pessoa(Nome,DataNascimento) values(?,?)"); sql.setString(1, obj.getNome()); sql.setDate(2, new java.sql.Date(obj.ge...
7
public void search(ListView<String> list, String word) { //now to find them! list.getItems().clear(); for (JournalEntry entry : journal.getEntries()) { //look thru topics first... boolean found = false; for (String topic : entry.getTopic()) { i...
8
public int getNum() { return num; }
0
private String createProtectedLines() { StringBuilder sb = new StringBuilder(); List<String> lines = getProtectedLines( fileName ); if ( !lines.isEmpty() ) { for ( String line : lines ) { sb.append( line ); } } else { sb.append...
2
public DeviceType getDeviceType() { return deviceType; }
0
public String toString() { return ((this.day == 0 ? "Mon " : (this.day == 1 ? "Tue " : (this.day == 2 ? "Wed " : (this.day == 3 ? "Thu " : (this.day == 4 ? "Fri " : (this.day == 5 ? "Sat " : (this.day == 6 ? "Sun " : "Unknown " + this.day + " "))))))) + (int)this.hour + "h" + (int)this.min + "m"); }
7
public static String[] verifyTimeArguments(String[] args) throws Exception { if (null == args || args.length != 3) throw new IncorrectNoOfArgumentsException(3); String[] t = new String[3]; int hour = Integer.parseInt(args[0]); int min = Integer.parseInt(args[1]); int ms = Integer.parseInt(args[2]); if (ho...
8
public int compareTo(Object o) { int row1 = modelIndex; int row2 = ((Row)o).modelIndex; for (Iterator<Directive> it = sortingColumns.iterator(); it.hasNext();) { Directive directive = (Directive)it.next(); int column = directive.co...
7
public void setAllAccessible(boolean b){ for(int x = 0; x< IConfig.LARGEUR_CARTE;x++ ){ for(int y = 0; y< IConfig.HAUTEUR_CARTE;y++ ){ this.mapGraph[x][y].setMarkedAccessible(b); } } }
2
public void mouseMoved(MouseEvent e) { MouseX = e.getX(); MouseY = e.getY(); if (state == 2) { int x = 50 * winZoom, y = 25 * winZoom, num = 0; while (num < var.NUM_ELS) { if (MouseX > x && MouseY > y && MouseX < x + (40*winZoom) && MouseY < y + (4...
7
@Override protected Object registeringGUI() { long idProd, idBuyer, idSeller; while(true){ try{ idProd = Long.parseLong(guiImpl.requestData("Código do produto:")); break; }catch(NumberFormatException e){ GUIAbsTemplate.operation...
6
private void persist(String cubeIdentifier) throws PersistErrorException, PageFullException, IOException, SchemaNotExistsException, CubeNotExistsException { SchemaClientInterface schemaClient = SchemaClient.getSchemaClient(); Schema schema = schemaClient.getSchema(cubeIdentifier...
9