text
stringlengths
14
410k
label
int32
0
9
public void construct(String file_name) { try { BufferedReader br = new BufferedReader(new FileReader(file_name)); String line, cell = ""; String[] tokens; boolean first_line = true; while ((line = br.readLine()) != null) { tokens = lin...
6
@SuppressWarnings("unchecked") @Test public void QueryStudent(){ Session session = HibernateUtil.currentSession(); Transaction tx = session.beginTransaction(); List<Student> slist = new ArrayList<Student>(); String hql = "select s from Student as s"; Query q = session.createQuery(hql); slist = q.lis...
4
public String toString() { return "FROM:" + boardIndexFrom + " TOP CARD INDEX: " + toMoveTop + (boardIndexTo == -1 ? "" : " TO " + boardIndexTo); }
1
private static void addPeakCalls(HashMap<String, List<Holder>> map ) throws Exception { for(String contig : map.keySet()) { List<Holder> list = map.get(contig); for(int x=0 ; x < list.size(); x++) { Holder h = list.get(x); Holder lastH = x >0 ? list.get(x-1) : null; if( h.regressionSlope == nu...
9
public static void UpperPlaceOfPublication(){ try { if(conn == null || conn.isClosed()){ conn = DatabaseConnection.getConnection(); } } catch (SQLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try{ conn.setAutoCommit(false); PreparedSt...
4
public void writeFlightReportToXML(FlightReport report) { try { if(!fileWriter.checkIfFileExistsOrCreateNew(FlightReportPath)){ createFlightReportToXMLFile(report); } // create document from existing file DocumentBuilder...
7
public static void makeCompactGrid(Container parent, int rows, int cols, int initialX, int initialY, int xPad, int yPad) { SpringLayout layout; try { layout = (SpringLayout)parent.getLayout(); } catch (ClassCastException exc) { System.err.println("The first argument to ma...
7
private void key(KeyEvent event, boolean pressed) { if (this.hasFocus()) { if (event.getKeyCode() == KeyEvent.VK_ALT && event.isControlDown() && isFullscreen) { // Special case for Ctrl-Alt-Ins to be mapped to // Ctrl-Alt-Delete. //...
7
public Tpv(int idTpv, GregorianCalendar fecha, GregorianCalendar hora, Cliente cliente, double total, double entrega) { this.idTpv = idTpv; this.fecha = fecha; this.hora = hora; this.cliente = cliente; this.total = total; this.entrega = entrega; }
0
static void indexDocs(IndexWriter writer, File file) throws IOException { // do not try to index files that cannot be read if (file.canRead()) { if (file.isDirectory()) { String[] files = file.list(); // an IO error could occur if (files != null) { for (int i = 0; i < files.length; i++) { ...
9
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed String criterio = ""; boolean isCompra = false; BigDecimal rangoMax = BigDecimal.ZERO; BigDecimal rangoMin = BigDecimal.ZERO; if(rbtCompra.isSelected()) ...
8
public boolean canGoAtDirection(Direction direction, Location from) { switch (direction) { case UP: return isWalkablePath(from.getX(), from.getY() - 1); case DOWN: return isWalkablePath(from.getX(), from.getY() + 1); case LEFT: ...
4
public static PVector resolveTopRight(PVector v) { PVector result = new PVector(); if (((v.heading() > (float)(Math.PI/4)) && (v.heading() <= (float)Math.PI)) || ((v.heading() > (float)-Math.PI) && (v.heading() < (float)(-3*Math.PI/4)))) // NB brackets round second PI expression before float cast { result....
4
@Override public JFormCollection load() { if (loaded) return this; String body = null; try { body = JHttpClientUtil.postText( context.getUrl() + JHttpClientUtil.Forms.URL, JHttpClientUtil.Forms.GetFormCollection.replace("{listName}", list....
9
@SuppressWarnings("unchecked") public void start() { if(hasStarted()) { throw new IllegalStateException("Machine has already started."); } if(stateGraph == null) { throw new IllegalStateException("No state graph specified."); } if(stateGraph.getStartState()==null) { throw new IllegalStateException("...
3
private boolean jj_3_76() { if (jj_scan_token(EXCLAM)) return true; return false; }
1
public boolean start() { stopWaiting = false; if (startServerSocket()) { new Thread(new Runnable() { @Override public void run() { waitForConnections(); } }, "wait for connections").start(); return tr...
1
public static void addToProductionWithUsefulVariableSet( Production production, Set set) { set.add(production); }
0
@Override public void getInput() { int selection = -1; boolean isValid = false; do { this.displayMenu(); Scanner input = SnakeWithPartner.getInFile(); do { try { selection = input.nextInt(); isValid ...
7
public void render() { BufferStrategy bs = getBufferStrategy(); if (bs == null) { createBufferStrategy(3); return; } screen.clear(); int xScroll = player.x - screen.width / 2; int yScroll = player.y - screen.height / 2; level.render(xScroll, yScroll, screen); player.render(screen); ...
5
public static void output() { System.out.println("hello wold !"); }
0
private void registerListeners() { // Add volume listener. mediaPlayer.addMediaPlayerEventListener(new MediaPlayerEventAdapter() { @Override public void playing(MediaPlayer mediaPlayer) { updateVolume(mediaPlayer.getVolume()); } }); //...
3
@Override public String getColumnName(int columnIndex) { switch(columnIndex) { case 0: return "Ranking"; case 1: return "Team #"; case 2: return "Team Name"; case 3: return "Round 1"; case 4: return "Round 2"; case 5: return "Round 3"; case 6: return "Round 4"; case 7: return ...
8
private static void getAllTestNgTests(List<String> urlsOrFiles) throws Exception { List<TestResultData> testNgResultData = parseTestNgResultFromFilesOrUrls(urlsOrFiles); List<String> testNgTests = (List<String>) CollectionUtils .collect(testNgResultData, new BeanT...
4
public static pgrid.service.corba.exchange.ExchangeHandle narrow (org.omg.CORBA.Object obj) { if (obj == null) return null; else if (obj instanceof pgrid.service.corba.exchange.ExchangeHandle) return (pgrid.service.corba.exchange.ExchangeHandle)obj; else if (!obj._is_a (id ())) throw new...
3
public static void main(String[] args) { if(args == null || args.length !=3) { System.err.println("usage: java Replace <instring> <what> <with>"); System.exit(1); } System.out.println("creating Replace object r ..."); Replace r = new Replace(args[0]); System.out.println("r after method replaceFirst:...
4
public int getpointValue() {//Accesses the Card's point value return pointValue; }
0
@Override public boolean equals(Object obj) { if (obj == this) { return true; } return obj instanceof LengthValue && super.equals(obj); }
2
static final void method365(Class318_Sub1 class318_sub1, Class348_Sub1[] class348_sub1s) { if (Mob.aBoolean10221) { int i = class318_sub1.method2384(class348_sub1s, 49); Class9.aHa171.method3642(i, class348_sub1s); } if (Class332.aSArray4142 == aa_Sub1.aSArray5191) { boolean bool = false; boo...
9
public void tookDamage(double damageTaken) { if(invincibility<=0){ game.isDamaged(); invincibility=invTime; armour-=damageTaken; if(armour<=0){ Random r = new Random(); Color c; int numSparks; if(Spark.glowEnabled){ n...
7
public void detectCols() { for (int i = 5; i > 2; i--) { detectCol(i); } }
1
public void paint(Graphics gr1d, Object destinationComponent, Boolean b) { final Graphics2D gr = (Graphics2D) gr1d; gr.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); final int n = G.getVerticesCount(); if (n == 0) return; AbstractGraphRenderer.getCurrentG...
9
private void findNextTime(int timeUnit, int timeUnitCount) { switch (timeUnit) { case SECOND: calendar.add(Calendar.SECOND, timeUnitCount); break; case MINUTE: calendar.add(Calendar.MINUTE, timeUnitCount); break; case HOUR: cale...
7
public static void printBattleProgress() { b1.allowedToPaintExp=true; //System.out.println(enemy[enemyIndex].toHPOnlyString()+" Remaining Pokemon:"+ //Mechanics.remainingPokemon(enemy, enemyNumOfPokemon)); //System.out.println(user[userIndex].toBattleString()); System.out.print("Waiting for command..."); i...
4
public void testRemove() { int element_count = 10; TIntList a = new TIntArrayList(); assertTrue( a.isEmpty() ); for ( int i = 1; i <= element_count; i++ ) { a.add( i ); } assertEquals( 6, a.get( 5 ) ); assertTrue( a.remove( 5 ) ); for ( int ...
9
public char getTipo(String nombre){ getLista g = new getLista(); ListaClientes = g.getListaCliente(); ListaProveedores = g.getListaProveedor(); for(int i = 0;i<ListaClientes.size();i++){ if(ListaClientes.get(i).getNick().equals(nombre)){ return ...
3
public List<Graph> getErrorToConfidenceGraph() { Map<Double, Integer> timeMap = new HashMap<Double, Integer>(); Map<Double, Integer> stepsMap = new HashMap<Double, Integer>(); Map<Double, Integer> timeCount = new HashMap<Double, Integer>(); Map<Double, Integer> stepsCount = new HashMap<Double, Integer>(); ...
8
public RegularTransitionTool(AutomatonPane view, AutomatonDrawer drawer, FSAToREController controller) { super(view, drawer); this.controller = controller; }
0
@Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); try { String metodo = request.getParameter("metodo"); ...
8
@Override public boolean addAll( Collection<? extends E> collection ) { boolean changed = false; for (E element : collection) { changed |= add( element ); } return changed; }
2
public static JSONValue parse(TokenReader tokens, String token) throws IOException, ParseException { JSONObject result = new JSONObject(); if ((token = tokens.next()).equals("}")) { return result; } do { String key = JSONString.parse(tokens, token).toString(); tokens.parseAssert((token = tokens.ne...
3
public int compareTo(HandRank handRank) { int compare = getRank().compareTo(handRank.getRank()); if (compare != 0) { return compare; } Cards myHand = getHand(); Cards theirHand = handRank.getHand(); for (int i = 0; i < HAND_SIZE; i++) { if (myHand....
4
public void serializeFile(String filename) { try { FileOutputStream file = new FileOutputStream(filename); ObjectOutputStream o = new ObjectOutputStream(file); o.writeObject(this); o.close(); } catch (IOException e) { System.err.println(e); } }
1
public String getEmailPer() { return emailPer; }
0
private static void sortSameSuitCards(CardArray cards, CardArray suitCards) { int[] cardsNums = new int[suitCards.size()]; int y = 0; // index for (Card i : suitCards) { cardsNums[y] = i.num(); y++; } Arrays.sort(cardsNums); for (int n : cardsNums) { for (Car...
4
public boolean equals(Object o) { if (!(o instanceof FilterChain)) { return false; } FilterChain otherChain = (FilterChain) o; int size = filters.size(); if (size != otherChain.getFilters().size()) { return false; } for (int i = 0; i < size...
4
public void setBrakes(int brakes) { this.brakes = brakes; }
0
private void IDLE(Vector3f direction, float distance) { Vector2f lineStart = new Vector2f(transform.getTranslation().getX(), transform.getTranslation().getZ()); Vector2f castDirection = new Vector2f(direction.getX(),direction.getZ()); Vector2f lineEnd = lineStart.add...
3
public boolean isAValidDirectory() { try { return args[0] != null; } catch (ArrayIndexOutOfBoundsException e) { return false; } }
1
private void setState(ModelStates state) { Point windowPoint = currentWindow == null ? new Point(50, 50) : currentWindow.getLocation(); switch (state) { case loginsingup: currentWindow = loginsingup; loginsingup.setLocation(windowPoint);// set window is a custom // location endgamewindow...
6
public Enemy setEnemy(int layerPosition,int x, int y, int damage, int health, int gravity, String name[], boolean canColide){ String namePath[] = new String[name.length]; for (int i =0; i< name.length; i++){ namePath[i] = "res/images/" + name[i]; } if(name[0].compareTo("Jumper_0.png")==0){ listOfEnemies[l...
5
private static ArrayList<String> getDataFromMap(String key) { if (null == key || "N".equalsIgnoreCase(key) || "".equals(key)) return null; String[] temp = key.split("、"); ArrayList<String> resultList = new ArrayList<String>(); if(temp.length > 1){ for(String t : temp){ resultList.addAll(getData(t));...
5
private boolean checkFeetCollision(Cell[][] tiles){ int feetX = feetBox.getX()/Cell.CELL_WIDTH; for(int i = 0; i < tiles.length; i++){ if(tiles[i][feetX] != null && feetBox.checkCollision(tiles[i][feetX].getHitbox())){ return true; } } return false; }
3
@Override public boolean onCommand(CommandSender sender, Command command, String sabel, String[] args) { if (Utils.commandCheck(sender, command, "maleficus")) { Player player = (Player) sender; if (args.length == 0) { player.sendMessage(Utils.center("--- §6[§fMaleficus§6]§f ---")); player.sendMessage("...
8
private void addToCounts(Instance instance) { double [] countsPointer; if(instance.classIsMissing()) return; // ignore instances with missing class int classVal = (int)instance.classValue(); double weight = instance.weight(); m_ClassCounts[classVal] += weight; m_SumInstances += w...
9
public Map<Player, Player> Command_refuse(Map<Player, Player> Map) { tpMap = Map; StringBuilder message = new StringBuilder(); for(int i = 0; i < args.length ; i++) { message.append(args[i]); message.append(" "); } for(Entry<Player, Player> entry : tpMap.entrySet()) { Player key = en...
6
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof XPosition)) return false; XPosition other = (XPosition) obj; if (column != other.column) return false; if (line != other.line) return false; if (pos != other.pos) return false; if (source == nu...
8
public boolean comprobarAdmin(String nick, String password){ beansAdministrador admin = buscarAdmin(nick); if(admin != null){ if(admin.getPassword().equals(password)){ setAdmin(admin); return true; } } return false; }
2
public MealyMachine() { super(); }
0
public void saveGameInformation(Game currentGame) { PrintWriter gameWriter; String saveFile = "saveFile.txt"; try { gameWriter = new PrintWriter(saveFile); gameWriter.append(currentGame.getGameTitle() + "\r\n"); gameWriter.append(Integer.toString(currentGame.getFunRanking()) + "\r\n"); for (int c...
2
private double findSplitNumericNumeric(int index) throws Exception { double bestVal = Double.MAX_VALUE, currVal, currCutPoint; int numMissing = 0; double[] sumsSquares = new double[3], sumOfWeights = new double[3]; double[][] bestDist = new double[3][1]; double totalSum = 0, totalSumOfWeights = 0; ...
8
@Override public void run() { //say our server is starting logger.debug("Server starting"); //set this in case it was set to false keepRunning = true; //set up some buffer for ourselves byte[] recvData = new byte[64]; logger.debug("About to enter server con...
4
public static CustomButton makeTextExplorerLauchButton( final String buttonTitle) { final CustomButton a = new CustomButton(buttonTitle); a.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { if (!Database.loaded) return; JFrame jf = new JFrame(b...
8
@Override public void takeInfo(InfoPacket info) throws Exception { super.takeSuperInfo(info); Iterator<Pair<?>> i = info.namedValues.iterator(); Pair<?> pair = null; Label label = null; while(i.hasNext()){ pair = i.next(); label = pair.getLabel(); switch (label){ case RPMs: RPM = (Double) pai...
4
public void setImgPath_CommandBtnArrow(Path img, Imagetype type) { switch (type) { case KEYFOCUS: this.imgComArrow_KFoc = handleImage(img, UIResNumbers.COMBTNARROW_KFOC.getNum()); if (this.imgComArrow_KFoc == null) { this.imgComArrow_KFoc = UIDefau...
8
private void getLinkList() { try { List<Link> links; DataOutputStream dos = new DataOutputStream(socket.getOutputStream()); dos.writeBytes(ServerFrame.getLinkListCmd + "\n"); ObjectInputStream ois = new ObjectInputStream(socket.getInputStream()); links = (List<Link>) ois.readObject(); up...
3
private double calcOutput(int targetLayer,int position){ int[] relPos; int absPos = this.calcAbsolutePosition(targetLayer, position); double[] input = new double[addedNeurons]; double[] weights = new double[addedNeurons]; boolean inputNeuron=true; for(int row = 0; row < addedNeurons;row++){ if(weightMat...
3
void guess(String solution){ int count = 0; count++; int a = getA(solution, "1234"); int b = getB(solution, "1234"); if (a == 4) { } updateAnsSet("1234", a, b); String step = String.valueOf(count); outcome = ""; outcome = outcome + "Step" + ...
4
public void llenarCombobox() { String to = System.getProperty("user.dir"); // recupero el directorio del proyecto String separator = System.getProperty("file.separator"); //recupero el separador ex: Windows= '\' , Linux='/' to = to + separator + "src" + separator + "src" + separator; // concaten...
2
public void run() { while (canContinue()) { // System.out.println(word.getWord()); printHangman(); printLetters(); System.out.print("\n\nPlease guess a letter!:"); String guess = sc.next(); char guessChar = validate(guess); word.checkGuess(guessChar); } printHangman(); printLetters();...
1
public HostInfo getHostByName(String name) { return this.hosts.get(name); }
0
public void loot(Item item, Stage stage) { // Get slot of item to loot int slot = 0; if(item instanceof WeaponItem) slot = item.getWeaponSlot(); else if(item instanceof ArmorItem) slot = item.getArmorSlot(); // If player can equip, equip if(stage.player.getEquipment().canEquip(item, slot)) { sta...
5
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TracksHaveHashtags that = (TracksHaveHashtags) o; if (hashtagId != that.hashtagId) return false; if (trackId != that.trackId) return false; ...
5
@Override public boolean equals( Object o ) { if ( this == o ) { return true; } if ( o == null ) { return false; } if ( !(o instanceof Degree) ) { return false; } final Degree other = (Degree) ...
3
public void removeMeanFriends() { // YOUR CODE HERE // Remove all the friends who don't have you as a friend. // You may want to use the find method. ArrayList<Person> meanFriends = new ArrayList<Person>(); for (Person each : friends) { if (each.find(this)...
3
private Map<String, BoundField> getBoundFields(Gson context, TypeToken<?> type, Class<?> raw) { Map<String, BoundField> result = new LinkedHashMap<String, BoundField>(); if (raw.isInterface()) { return result; } Type declaredType = type.getType(); while (raw != Object.class) { Field[] f...
8
public Void visitUnit(UnitTree tree) { String name = options.getOutputName(); if (name == null) { name = tree.getSource(); int dot = name.lastIndexOf('.'); if (dot > 0) name = name.substring(0, dot); } File file = new File(options.getOutputDir(), name+".java"); try { output = new PrintStream(file)...
5
public String authenticate(String userName, String password) throws ConnectException, InvalidLoginException { Connection con = ConnectionService.getConnection(); try { String query = "select * from Login where username=?"; PreparedStatement preparestatement = con.prepareStatement(query); preparestateme...
5
public void updateReactToPyroState(double s_elapsed) { can_growl = true; if (!target_unit.isInMap()) { initState(RobotPilotState.INACTIVE); can_growl = true; } else if (target_object_room.equals(current_room)) { if (!target_unit.getRoom().equals(target_object_room)) { initState...
7
@Override void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) { // Replace child if(this._caso_ == oldChild) { setCaso((TCaso) newChild); return; } if(this._valor_ == oldChild) { ...
5
public void divideNo(No x, int i, No y) { int t = (int) Math.floor((ordem - 1) / 2); //cria nó z No z = new No(ordem); z.setFolha(y.isFolha()); z.setN(t); //passa as t ultimas chaves de y para z for (int j = 0; j < t; j++) { if ((ordem - 1) % 2 == 0) ...
8
public Move findbest(Game g) throws GameException { try { boolean max; int bestVal; // if first player, then find the max value // otherwise find the min value if (g.whoseTurn() == Game.FIRST_PLAYER) { max = true; bestVal = Integer.MIN_VALUE; // running max, starts at bottom } else { ma...
7
private void initializeLogger() { this.log = Logger.getLogger(this.getClass().getName()); try { FileHandler fh = new FileHandler(this.getClass().getName() .replace("class ", "") + ".log"); fh.setFormatter(new SimpleFormatter()); this.log.addHandler(fh); } catch (SecurityException e1) { // TO...
3
public State stateCreate(Point point) { if (currentStep != CREATE_SINGLE_FINAL) { outOfOrder(); return null; } State[] finals = automaton.getFinalStates(); drawer.clearSelected(); for (int i = 0; i < finals.length; i++) { automaton.removeFinalState(finals[i]); drawer.addSelected(finals[i]); } ...
2
protected void update() { //Arc lenght angle double arcAngleLengthInRadians = Math.toRadians(getLength()); //Angle rotation of the item double startAngleInRadians = Math.toRadians(getStartAngle() + ANGLE_TO_START_AT_ZERO_DEGREE); moveTo.setX(getInnerRadius() * Math.cos(startAngleInRadians)); move...
5
public String resolveFilename(String filename) { if (filename.startsWith("/") || filename.startsWith("\\")) filename = filename.substring(1); if (!usingMod) { return mainDirName + filename; } String[] splitPath = splitParent(filename); ...
8
private void antialias(int ch, int gr) { int sb18, ss, sb18lim; gr_info_s gr_info = (si.ch[ch].gr[gr]); // 31 alias-reduction operations between each pair of sub-bands // with 8 butterflies between each pair if ((gr_info.window_switching_flag !=0) && (gr_info.block_type == 2) && !(gr_info.mixed...
8
public boolean finish() { if (!started) return false; boolean ok = true; started = false; try { out.write(0x3b); // gif trailer out.flush(); if (closeStream) { out.close(); } } catch (IOException e) { ok = false; } // reset for subsequent use transIndex = 0; out = null; image = n...
3
public List<Stock> getStocks(List<String> symbols) throws SymbolNotFoundInNasdaq { // save data to tmp list, after update done, point with service list to // tmp... List<Stock> ret = new LinkedList<Stock>(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < symbols.size(); i++) { // if(i > ...
4
public void createTables() throws Exception { if (!MineAuction.enabled) return; Connection c = null; Statement s = null; c = MineAuction.db.openConnection(); s = c.createStatement(); if (plugin.getResource("create.sql") == null) { if (MineAuction.enabled) { Log.error("Unable to find create.sql, ...
6
private void createGUI() { JPanel mainPanel = new JPanel(new BorderLayout()); JPanel topPanel = new JPanel(new MigLayout("fill")); // Панель быстрого поиска JPanel searchPanel = new JPanel(new MigLayout("fill")); searchPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.cr...
8
public static void main(String[] args) { // int [] arr={2,7,13,19}; // System.out.println(new NthUglyNumber().nthSuperUglyNumber(12,arr)); String s="我钱懿斐"; System.out.println(s.length()); }
0
public Archive getSelectedArchive() { if (showOpenDialog(component) == 0) { File selectedFile = getSelectedFile(); if (selectedFile.getName().endsWith(".class")) return new ClassFile(selectedFile); else try { return new JavaArchive(new JarFile(selectedFile)); } catch (IOException e) { e...
3
@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 TaxonObservationFilterElementType)) { return false; } TaxonObservationFilterElementType other = (TaxonObservationFilter...
5
public static void main(String[] args) { Reader in = new Reader(); Writer out = new Writer(); int n,m,k,v; while (true) { try { n = in.nextInt(); m = in.nextInt(); } catch (Exception e) { break; } ...
6
public static void main(String[] args) { // TODO code application logic here // 2. Mira esta serie: 2, 2, 4, 12, 48, ... la semilla de esta serie fue el número 2 Mira esta serie:. 3, 3, 6, 18, 72, ... la semilla de esta serie fue el número 3. //Cree una función que recibe dos enteros: x, y y. Si alguno de ...
5
public String toString() { StringBuilder out = new StringBuilder(); for (TraverseMode mode : TraverseMode.values()) { int mask = getMaskForMode(mode); if (mask != 0 && (modes & mask) == mask) { if (out.length() != 0) { out.append(","); ...
4
@Test public void testSerial() { System.out.println("ASD"); LineTextField f = new LineTextField(); f.setFieldName("HELLO"); f.setMaxChars(100); try { FileOutputStream fos = new FileOutputStream("testfile"); ObjectOutputStream oos = new ObjectOutputStre...
2
private void mongoCreator() throws UnknownHostException { DBHandler db = new DBHandler(); MongoHandler dbmon = new MongoHandler(); DB dbmongo = dbmon.connect(); dbmongo.dropDatabase(); db.openConnection(); Statement st; String cadena[]; String ca...
8
static public TreeMap<Integer, TreeSet<Integer>> stringToGraph(String str) { TreeMap<Integer, TreeSet<Integer> > tmpNoeuds = new TreeMap<Integer, TreeSet<Integer> >(); StringTokenizer tokenizer = new StringTokenizer(str); while (tokenizer.hasMoreTokens()) { Integer token = Integer.parseInt(tokeni...
1