text
stringlengths
14
410k
label
int32
0
9
public boolean searchMatrix(int[][] matrix, int target) { if (matrix.length == 0) { return false; } int start = 0, end = matrix.length; while (start < end) { int mid = (start + end) >>> 1; int midVal = matrix[mid][0]; if (midVal < targe...
8
int insertKeyRehash(float val, int index, int hash, byte state) { // compute the double hash final int length = _set.length; int probe = 1 + (hash % (length - 2)); final int loopIndex = index; int firstRemoved = -1; /** * Look ...
9
private void scan(boolean target, boolean debug) throws IOException{ System.out.println("stage: scanner"); PrintWriter pw = null; if (target){ output = new File(this.name + ".scan"); output.createNewFile(); pw = new PrintWriter(new FileWriter(output)); pw.println("LINEA\t\tTIPO\t\t\t\t\t\tVALOR"); ...
9
public boolean equals(Object other) { if ( (this == other ) ) return true; if ( (other == null ) ) return false; if ( !(other instanceof BandsperfestivalId) ) return false; BandsperfestivalId castOther = ( BandsperfestivalId ) other; return (this.getFestId()==castOther.getFestId()) && (...
8
public Map<K, V> read(JsonReader in) throws IOException { JsonToken peek = in.peek(); if (peek == JsonToken.NULL) { in.nextNull(); return null; } Map<K, V> map = constructor.construct(); if (peek == JsonToken.BEGIN_ARRAY) { in.beginArray(); while (in.hasNe...
6
private boolean fillNumber(char[][] board, int row, int col) { int size = board.length; for(int i=row; i<size; i++) { int j=col; if(i==row+1)j=0; for(; j<size; j++) { if(board[i][j]!='.') ...
9
public static void main(String[] args) throws Exception { ApplicationContext ctx = new ClassPathXmlApplicationContext( "context/jdbcContext.xml"); // dataSourceはSpringで作成。 DataSource source = (DataSource) ctx.getBean("dataSource"); Connection con = source.getConnection(); Statement stat = con.createState...
1
public String toString() { switch (typecode) { case TC_LONG: return "long"; case TC_FLOAT: return "float"; case TC_DOUBLE: return "double"; case TC_NULL: return "null"; case TC_VOID: return "void"; case TC_UNKNOWN: return "<unknown>"; case TC_ERROR: default: return "<error>"; } ...
7
public List getMessByTimeAndDriver(String beginTme, String endTime,String driver,String rescueStatus) { if(beginTme!=null&&!beginTme.trim().equals("")){ if(endTime!=null&&!endTime.trim().equals("")){ String hql = "from Rescueapply r where r.applytime >=:beginTime and r.applytime <=:endTime and r.driver=:dri...
6
public Gezin getGezin(int gezinsNr) { // inefficiente oplossing for (Persoon p : personen) { Iterator<Gezin> it = p.getGezinnen(); while (it.hasNext()) { Gezin r = it.next(); if (r.getNr() == gezinsNr) { return r; ...
3
public <T> ResultSet queryDB(String query, ArrayList<T> sqlParam){ PreparedStatement ps = null; ResultSet rs = null; try{ ps = conn.prepareStatement(query); int i = 1; for (T a : sqlParam){ //System.out.println(a.getClass()); if (a.getClass() == String.class){ ps.setString(i, (String)a); ...
7
public void dumpInstruction(TabbedPrintWriter writer) throws java.io.IOException { if (!isEntered) writer.println("// MISSING MONITORENTER"); writer.print("synchronized ("); if (object != null) object.dumpExpression(writer.EXPL_PAREN, writer); else writer.print(local.getName()); writer.print(")");...
2
public JSONObject toJSON() throws JSONException { JSONObject json = super.toJSON(); json.put("aptitude", aptitude.name()); JSONArray array = new JSONArray(); if(this.subordonnes != null){ for(int i = 0; i < this.subordonnes.size(); i++){ array.put(i, this.subordonnes.get(i).toJSON()); } } ...
2
public static ArrayList<Map<String, String>> loadLabels(String labelsFile) { if(labelsFile == null) return null; ArrayList<Map<String, String>> labels = null; try{ BufferedReader fi = new BufferedReader(new FileReader(labelsFile)); labels = new ArrayList<Map<String, String>>(); String doc...
6
private void addBedrock() { for (int x = 0; x < chunkWidth; x++) { for (int z = 0; z < chunkWidth; z++) { world.chunk[x][255][z] = 1; } } }
2
static void removeDup(LinkedListNode n) { Set<Integer> set = new HashSet<Integer>(); while (n != null) { int current = n.getValue(); if (set.contains(current)) { n.pre.next = n.next; } else { set.add(current); } ...
2
private void jButton_VerifyFilesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_VerifyFilesActionPerformed OpenTransactionAccount otAccount = new OpenTransactionAccount(); int isSuccess = otAccount.verifyFiles(jTextField_ServerID.getText(), jTextField_NymID.getText(), jTextFie...
3
public void roadNameCheck() { for(MyNode n : mg.getNodeArray()) { for(MyEdge e : n.getFromEdges()) { if(e.getRoadName().equals(address[0])) { putEdge(e); } } for(MyEdge e : n.getToEdges()) { if(e.getRoadName().equals(address[0])) { putEdge(e); } } } }
5
private static void showStorage (int indent, Rio500 rio, boolean external) throws IOException { Rio500.MemoryStatus mem; int temp; indentLine (indent, external ? "SmartMedia" : "Built-in Memory"); indent += 2; temp = rio.getFreeMemory (external); indentLine (indent, "Available Memory in bytes: " + ...
5
public 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
String removeMnemonics (String string) { /* removes single ampersands and preserves double-ampersands */ char [] chars = new char [string.length ()]; string.getChars (0, chars.length, chars, 0); int i = 0, j = 0; for ( ; i < chars.length; i++, j++) { if (chars[i] == '&') { if (++i == chars.length) break; i...
5
static void input(double[][] matrix){ for(int i = 0; i < matrix.length; i++){ for(int j = 0; j < matrix[i].length; j++){ matrix[i][j] = scan.nextDouble(); } } }
2
public void elSuapDefinitivo(int arr) { IVPTabu obj = new IVPTabu(); String url = "jdbc:derby://localhost:1527/PDPIVP"; String selectdatos="SELECT * FROM MatrizSolucion"; int tabu=0; int notabu=0; double cambio=0; int indice1=0; int indice2=0; double losmejores[]=new double[5]; ...
7
public void printInventory(){ for(Block i : inv){ System.out.print(i.type + " "); } System.out.println(); }
1
private void closeConnections() throws Exception { if (getConnections() == null) return; while (getConnections().size() > 0) { ISocketServerConnection ssc = (ISocketServerConnection)getConnections().get(0); ssc.disconnect(); getConnections().remove(ssc); } }
2
private double[][] manRGBArray(BufferedImage image, Hemisphere hemi){ double[][] rgbArray = new double[200][200]; int rgb = 3096;//Don't ask why int x=0; int y = 0; for (x = 0; x < 200; x++) { // loop x axis of the image for (y = 0; y < 200; y++) {// loop y axis // remove arrow or text if (hemi ...
9
public static void main(String[] args) throws JAXBException, FileNotFoundException { Company company = new Company(); company.setName("ITCompany"); Departament itDepartament = new Departament(); itDepartament.setName("IT"); Worker worker = new Worker(); worker.setName("Tom"); itDepartament.addWor...
2
public void kirajzol(){ System.out.println(" 0 1 2 3 4 5 6 7"); for(int i=0; i<8; i++){ System.out.print(i+" "); for(int j=0; j<8; j++) System.out.print(sajat[i][j]+" "); System.out.println(); } }
2
public static void syncSize() { // grab the size that's been set int sizeSet = Preferences.getPreferenceInt(Preferences.RECENT_FILES_LIST_SIZE).cur; // if it's different than our stored setting ... if (sizeSet != recentFilesList.currentRecentFilesListSize) { // store new setting recentFilesList.cur...
1
private byte a2b(byte c){ if('0'<=c&&c<='9') return (byte)(c-'0'); if('a'<=c&&c<='z') return (byte)(c-'a'+10); return (byte)(c-'A'+10); }
4
@Basic @Column(name = "FUN_AAAA") public Integer getFunAaaa() { return funAaaa; }
0
public void read(Scanner input) { emptyGraph(); checking = true; try { String line = input.nextLine(); if (!line.equals(version)) { throw new ParseException(line, -1); } GraphType loadedType = GraphType.valueOf(input.nextLine()); ...
4
public static String getSuperRegionName(int superRegionID){ String out = ""; switch(superRegionID){ case 1: out = "North America"; break; case 2: out = "South America"; break; case 3: out = "Europe"; break; case 4: out = "Africa"; break; case 5: out = "Asia"; break; case 6:...
6
@Override public boolean apply(ICreature input) { if (input == observer) { return false; } double dirAngle = input.directionFormAPoint(observer.getPosition(), observer.getDirection()); return abs(dirAngle) < (observer.getFieldOfView()) && observer.distanceFromAPoint(input.getPosition()) <= ...
2
private boolean checkDuplicate(String userID){ if(count > 0){ for (int i = 0; i < clientObj.length; i++) { if((clientObj[i].getUserID()).equals(userID)){ return false; } } }return true; }
3
public void run() { try { if (logger.isInfoEnabled()) logger.info("Start job schedule launcher at " + new Timestamp(System.currentTimeMillis())); String dateParam = new Date().toString(); JobParameters param = new JobParametersBuilder().addString("date", dateParam).toJobParameters(); JobExe...
3
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; }
1
private List<String> validNegative(List<String> words) { List<String> tempNumbers = words; int negCount = 0; while(tempNumbers.contains("negative") || tempNumbers.contains("minus")) { if(negCount != 0) { System.err.println("Only one 'negative' or 'minus' allowed"); System.exit(7); } else if...
7
private void startGame(GameModel m){ if (gameController != null){ gameController.stopThread(); } if (m == null){ startNewGame(); } WINDOW.add(new LoadingPanel()); gameController = new GameController(mainModel, this); mainModel.setGameModel(m); gameController.init(); WINDOW.add(gameControl...
2
protected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect) { int formatTag = MediaLibAccessor.findCompatibleTag(sources,dest); MediaLibAccessor srcAccessor1 = new MediaLibAccessor(sources[0], destRect...
9
public boolean update(CreditProgram crProg) { //Получаем текущий обьект по названию кредитной программы String crProgName = crProg.getName(); CreditProgram curProgram; if ((curProgram = get(crProgName)) == null) { //Если обьекта c таким именем не существует - обновлять нечего...
5
public static boolean setGuildHome(String[] args, CommandSender s){ //Various checks if(Util.isBannedFromGuilds(s) == true){ //Checking if they are banned from the guilds system s.sendMessage(ChatColor.RED + "You are currently banned from interacting with the Guilds system. Talk to your server admin if you...
8
public void enablePayButton(ListSelectionEvent e) { if (!e.getValueIsAdjusting() && list.getSelectedIndex() != -1) { pay.setEnabled(list.getSelectedValue().isBookable()); } else { pay.setEnabled(false); } }
2
public void menuFileAsym() { int choice; do { System.out.println("\n"); System.out.println("File Cryption Menu"); System.out.println("Select Asymmetric Cryption Methode"); System.out.println("----------------------------------\n"); System.out....
5
private boolean isJavabeanGetter(IMethod method) throws JavaModelException { if (method.getNumberOfParameters() == 0 && Flags.isPublic(method.getFlags())) { String methodName = method.getElementName(); if (methodName.length() > 3 && methodName.startsWith("get")) //$NON-NLS-...
8
public void update() { Player_down.update(); Player_up.update(); Player_left.update(); Player_right.update(); if(firerate > 0) firerate--; int xa = 0, ya = 0; if (input.up) ya--; if (input.down) ya++; if (input.left) xa--; if (input.right) xa++; if (xa != 0 || ya != 0) { move(xa,...
7
protected void switchChannel(String toReplace, String replacing) { if (toReplace.equals(replacing.toLowerCase())) { //Nothing to edit, reload the initial picture this.changePicture(this.getRelURL()); this.revalidateContainer(); reloadChanges(); return; } BufferedImage toEdit = null; try { ...
9
@Override public String getName() { return this.name; }
0
@Override public boolean tick(Tickable ticking, int tickID) { if((affected!=null) &&(affected instanceof MOB) &&(tickID==Tickable.TICKID_MOB)) { final MOB mob=(MOB)affected; if((husbanding==null)||(mob.location()==null)) { messedUp=true; unInvoke(); } for(final MOB husbandM : husbanding...
9
public static void invert(double src[][], double dst[][]) { gaussian(src, a); for (int i = 0 ; i < 4 ; i++) for (int j = 0 ; j < 4 ; j++) b[i][i] = i == j ? 1 : 0; for (int i = 0 ; i < 3 ; i++) for (int j = i + 1 ; j < 4 ; j++) for (int k = 0 ; k < 4 ; k++) ...
9
public void setShopName(String shopName) { this.shopName = shopName; }
0
public static boolean transitiveClosureIteratorDnextP(TransitiveClosureIterator self) { { Stella_Object node = self.value; Iterator adjacencyiterator = ((Iterator)(edu.isi.stella.javalib.Native.funcall(self.allocateAdjacencyIteratorFunction, null, new java.lang.Object [] {node}))); if (adjacencyiterato...
8
@Override public boolean registerParser(Class<? extends IPacketParser> parser) { Object object = null; try { object = parser.newInstance(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } ParsesPacket annotation = parser.getAnno...
5
public Stack() { this.stack = new DynamicArray(); }
0
@Override public void showGetOptions(ResourceType[] enabledResources) { getAvailables = enabledResources; getreload.setVisible(false); getAmount.setVisible(false); //Show them all getwood.setVisible(true); getbrick.setVisible(true); getsheep.setVisible(true); getwheat.setVisible(true); getore.setV...
6
public ThreadPoolImpl(int minThreads, int maxThreads, int maxIdleTime) throws IllegalArgumentException { if (maxThreads < 1) { throw new IllegalArgumentException( "maxThreads must be an integral value greater than 0"); } _maxThreads = maxThreads; if...
4
public void addFace(Face face) { if (!mesh.isDynamic() && !mesh.needsRenderUpdate) return; if (face == null) return; if (faces.contains(face)) return; faces.add(face); face.mesh = mesh; face.reg = this; mesh.needsRenderUpdate = true; }
4
public ArrayList<ArrayList<Double>> vectorsCompletionForMaintenance(ArrayList<String> newWordsArray, StatisticData[][] sd, int numOfComments, String articleId) throws SQLException{ ArrayList<String> wordArray = HelperFunctions.addNewWordsToOldWords(newWordsArray, articleId); DatabaseOperations.setArticleWords(artic...
7
public int getColumnCount() { return entries[0].length; }
0
public synchronized Player getPlayer(int index) throws IndexOutOfBoundsException { if (index > players.length) throw new IndexOutOfBoundsException( "The max number of players is four."); return players[index]; }
1
public static XSDDatatype getXSDDatetime() { return (new XSDDateTime(Calendar.getInstance())).getNarrowedDatatype(); }
0
private static void loadUnpackedNPCBonuses() { Logger.log("NPCBonuses", "Packing npc bonuses..."); try { DataOutputStream out = new DataOutputStream(new FileOutputStream( PACKED_PATH)); BufferedReader in = new BufferedReader(new FileReader( "data/npcs/unpackedBonuses.txt")); while (true) { St...
7
public static BencodeParser getResponsibleParserByFirstChar(char firstChar) throws InvalidFormatException { for (BencodeParser parser : AVAILABLE_PARSERS) { if(parser.isResponsible(firstChar)){ return parser; } } throw new InvalidFormatException(); }
2
public void registroAlArchivo(General atributos, String archivo, String n, int c, String m, double nota) throws FileNotFoundException{ //Se llama al metodo datosEstudiante datosEstudiante(atributos, n, c, m, nota); //Se crea el archivo y se le guarda la informacio F...
0
public Material dropPicker() { int next = gen.nextInt(10); switch (next) { case 1: return getHelmet(); case 2: return getChestPlate(); case 3: return getLeggings(); case 4: return getBoots(); case 5: return getHoe(); case 6: return getPickaxe(); case 7: return getAxe(); case 8: ...
9
@Test public void testSearchxPath() throws Exception { MyUnit.testFindFieldsbyXpath(); }
0
private int getMatrix(int i, int j) { if (i >= 0 && i < size && j >= 0 && j < size) return array[i][j]; else return -1; }
4
@Override public void buttonStateCheck(Input input) { int mX = input.getMouseX(); int mY = input.getMouseY(); int farX = getX() + getStoredImage().getImage().getWidth(); int farY = getY() + getStoredImage().getImage().getHeight(); if (pointContains(getX(), mX, farX) && pointContains(getY(), mY, farY)) { h...
9
public static double deltaVectors( double[] vec1, double[] vec2 ) { double[] test = Vector.sub(vec1, vec2); double delta = 0.0; int m = vec1.length; for ( int i = 0; i < m; ++i ) delta += Math.abs(test[i]); return(delta / m); }
1
public static void main(String[] args) { Map<String,String> map = new HashMap<String,String>(); map.put("10", "aaa"); map.put("12", "dafg"); map.put("14", "gaswde"); map.put("15", "gasde"); Set<String> set = map.keySet(); for(Iterator<String> iter = set.iterator();iter.hasNext();){ String key...
2
Item newNameTypeItem(final String name, final String desc) { key2.set(NAME_TYPE, name, desc, null); Item result = get(key2); if (result == null) { put122(NAME_TYPE, newUTF8(name), newUTF8(desc)); result = new Item(index++, key2); put(result); } return result; }
1
public void printExceptionList() { for (Iterator<Throwable> it = exceptions.iterator(); it.hasNext();) { Throwable throwable = it.next(); if (throwable != null) throwable.printStackTrace(); } }
2
public long binIsBlack(){ return binIsBlack; }
0
private Vector<Vector<Object>> getContenidoTabla(int perfil){ //r_con.Connection(); Tareas t=new Tareas(r_con); Permisos p=new Permisos(r_con); Vector<Vector<String>> v = p.getContenidoTablaPermisos(perfil); Vector<Vector<String>>tareas = t.getDescripcionTareas(); ...
6
@Override protected void onReceive(int clientId, String message) { System.out.println("Received message from client " + clientId + ": \"" + message + "\""); Message msg = Message.parse(message); switch(msg.getType()) { case ID_REQUEST: //TODO send id response, send spawn messages to client, send spawn mes...
2
@Before public void setUp() throws Exception { }
0
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { progress = new javax.swing.JProgressBar(); jLabel1 = new javax.swing.JLabel(); okButton = new javax.swing.JButton(); jLabel2 =...
0
String multiplyHelper(String str1,int digit,int zeros){ if(digit==1){ for(int i=0;i<zeros;i++){ str1+="0"; } return str1; } if(digit==0||str1.equals("0")){ return "0"; } String str=""; int advance=0; for(int i=str1.length()-1;i>=0;i--){ int temp=(str1.charAt(i)-'0')*digit+advance; ad...
7
protected void initParts() { assert this.composite1 == null: "This is a bug."; assert this.implem_composite1 == null: "This is a bug."; this.implem_composite1 = this.implementation.make_composite1(); if (this.implem_composite1 == null) { throw new RuntimeException("make_composite1() in co...
6
private void updateScreenActvCopyAllComponentValsToTxtFlds(){ for (int i = 0; i < currentlyShownActivityRowsNum; i++) { int actvCompType = jLabelsActvArr[i].getCompType(); if( actvCompType != COMPONENT_TYPE_TEXTFIELD ){ String txtFldVal1; String txtFldVa...
7
@Override public void execute() { Variables.status = "Summoning"; Walking.walk(new Tile(3658, 5094, 0)); Task.sleep(500, 600); if(Skills.getRealLevel(Skills.SUMMONING) >= 83) { if(Summoning.getPoints() > 8 && Inventory.getItem(Variables.LAVA_TITAN_POUCH_ID) != null) { Summoning.summonFamilia...
9
public PegsHash( PegsBoardType type, boolean[][] board ) { hashes = new int[(type.places.length >> 5) + 1]; int hashIndex = 0; int k = 0; for (PegsPoint p : type.places) { hashes[hashIndex] |= (board[p.y][p.x] ? 1 : 0) << k; if (++k == 32) { k = 0; hashIndex++; } } hash = h...
4
@Override public double getVariance() throws VarianceException { if (nu <= 1) { throw new VarianceException("t variance nu > 1."); } else if (1 < nu && nu <= 2) { return Double.POSITIVE_INFINITY; } else { return (double) nu / (nu - 2); } }
3
private void seeParse(ArrayList<ObjInfo> seeArray, String[] splitPacket) { for(int i = 2; i < splitPacket.length; i += 4) { // Split up the ObjName String[] splitName = (splitPacket[i].split(" ")); String[] splitInfo = (splitPacket[i+1].split(" ")); // Determine type of object: // - Flag -...
6
void setCellForeground () { if (!instance.startup) { table1.getItem (0).setForeground (1, cellForegroundColor); } /* Set the foreground color item's image to match the foreground color of the cell. */ Color color = cellForegroundColor; if (color == null) color = table1.getItem (0).getForeground (1); Tabl...
3
public void goTop() { nNode = Idx[I].top; sRecno = 0; found = false; nKey = 0; for(;;) { goNode(); readPage(); if(left_page>0) nNode=left_page; else { for(;;) { if(key_cnt>0 || right_page<0) break; nNode = right_page; goNode(); readPage(); } nKey ...
6
public Memento saveToMemento() { // TODO erstellen MementoBoard memento = new MementoBoard(this.numOfColumns(), this.numOfRows()); // FIXME richtige reihenfolge? oder rows zuerst? // FIXME passt das sonst? for (int row = 0; row < this.numOfRows(); ++row) { for (int col = 0; col < this.numOfColumns(); ++...
2
public static void main(String[] args) { setIsPrime(); //asn is [a, b, count] int[] ans = new int[]{-1000, -1000, -1}; for(int a = -999; a < 1000; a++) for(int b = -999; b < 1000; b++) { int x = 0; int count = 0; int f = x*x + a*x + b; while( f >= 0 && isPrime[f] ) { count++; ...
5
@Override public int compareTo(final MethodStatistics o) { return (time < o.time ? -1 : (time == o.time ? 0 : 1)); }
2
private NodeDouble<E> getIndex(int index){ if (index == 0){ return _head; } else if(index == _lenght-1){ return _tail; } else if (0< index && index < _lenght-1){ int calculo = (_lenght/2) - index; NodeDouble<E> actual; if(calculo <= 0){ calculo = _lenght - index-1; actual = _tail; f...
7
public CheckResultMessage check21(int day) { return checkReport.check21(day); }
0
@Override public final int getId(final Path path) throws InterruptedException { @SuppressWarnings("hiding") final Integer id; synchronized (Deserializer_0.this.idMapOut) { id = Deserializer_0.this.idMapOut.get(path); if (id == null) { Deserializer_0.this.idMapOut.put(path, -1); } } if ...
4
public static Properties toProperties(JSONObject jo) throws JSONException { Properties properties = new Properties(); if (jo != null) { Iterator keys = jo.keys(); while (keys.hasNext()) { String name = keys.next().toString(); properties.put(name...
2
public static void main(String[] args) { long ntscIncrementAsLong = 0x3F9111109E88C1B0L; // 0.0166666666 double ntscIncrement = Double.longBitsToDouble(ntscIncrementAsLong); long palIncrementAsLong = 0x3F9485CD701C02FCL; // 0.020041666 double palIncrement = Double.longBitsToDouble(palIncrementAsLong); floa...
5
@EventHandler public void onPlayerInventoryClose(InventoryCloseEvent e) { String title; Player p; ItemStack[] stack; title = e.getInventory().getTitle(); if (!title.contains("Armor")) return; p = Bukkit.getPlayer(title.substring(0, title.indexOf("'s") - 1)); if (p == null) return; ...
4
public void get() { System.out.print(value); }
0
public static boolean isPrimitiveWrapper(Class type) { return ( // (type == Boolean.class) || (type == Integer.class) || (type == Long.class) || // (type == Short.class) || (type == Float.class) || (type == Double.class)); // || //(type == Byte.clas...
3
Object getProperty(String property, int index) { //Logger.debug("Measures.getProperty(" +property + "," + index +")"); if ("count".equals(property)) { return new Integer(measurementCount); } if ("countPlusIndices".equals(property)) { return index < measurementCount ? measurements[index]....
7
public CloseProgram() { setIconImage(Toolkit.getDefaultToolkit().getImage(CloseProgram.class.getResource("/InterfazGrafica/Images/Warning.png"))); setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); setModal(true); setTitle("BOLSA DE EMPLEOS REP.DOM"); setBounds(100, 100, 450, 300); setLocationRelativ...
0
public void assignVariables(String host, int port) { hostName = host; portNumber = port; try { echoSocket = new Socket(host, port); } catch (UnknownHostException e2) { // TODO Auto-generated catch block e2.printStackTrace(); } catch (IOException e2) { // TODO Auto-generated catch block e2.print...
4