text
stringlengths
14
410k
label
int32
0
9
@Override public Object getValueAt(int rowIndex, int columnIndex) { RaavareLagerKompDTOView raavareLagerKomp = raavareLagerKompList.get(rowIndex); Object value = null; switch (columnIndex) { case 0: value = raavareLagerKomp.getRaavareId(); break; case 1: value = raavareLagerKomp.getRaavareNavn(); ...
5
public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) { return new SAXAnnotationAdapter(getContentHandler(), "annotation", visible ? 1 : -1, null, desc); }
1
public void removePlayer(Player player) { this.logger.info("Jugador " + player.getUser().getUsername() + " solicita salir de sala " + this.roomName ); // se elimina del equipo correspondiente if( player.getTeam().getType() != Team.NONE ){ if( player.getTeam().getType() == Team.RED ){ this.teamRed.rem...
8
protected boolean isFinished() { return false; }
0
public ShowEmployeePanel() { super(null); // Declares as a null layout model = new EmployeeTableModel(); sorter = new TableRowSorter<EmployeeTableModel>(model); employeeTable = new JTable(model); employeeTable.setPreferredScrollableViewportSize(new Dimension(500, 70)); employeeTable.setFillsViewpor...
6
@Override public ContainerRequest filter(ContainerRequest request) { final String accessToken = request.getHeaderValue("Authorization"); Session session = null; TokenWrapper response = null; if (accessToken != null && accessToken.length() > 0) { try { PhiAuthClient.setHostname("http://evergreenalu...
7
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
public void print() { String nullString = "null"; if (root != null) { int treeDepth = root.height(); List[] levels = new List[treeDepth]; for(int i = 0; i < levels.length; i++){ levels[i] = new ArrayList<Node>(); } levels = getLevelsList(levels); //Actually print everything. for(int i =...
5
public void update(ChiVertex<Integer, Integer> vertex, GraphChiContext context) { final int iteration = context.getIteration(); final int numEdges = vertex.numEdges(); /* On first iteration, each vertex chooses a label equalling its id */ if (iteration == 0) { vertex.setValu...
8
public static void startupOptimize() { { Object old$Module$000 = Stella.$MODULE$.get(); Object old$Context$000 = Stella.$CONTEXT$.get(); try { Native.setSpecial(Stella.$MODULE$, Stella.getStellaModule("/LOGIC", Stella.$STARTUP_TIME_PHASE$ > 1)); Native.setSpecial(Stella.$CONTEXT$, ((Mod...
7
public void doubleAster(String single) throws IOException { int i = 0; for (String double_block : single.split("<br />:?\\*\\* ")) { double_block = double_block.replaceAll("<br />", ""); status[5] = double_block; if (i > 0) status[4] = "laka前に倣うslk"; addToArray(status); i++; } }
2
@Override public void setAddress(Address address) { super.setAddress(address); }
0
public static void main(String[] args) { ArrayList<Integer> primes = new ArrayList<Integer>(); for (int i = 0; i < isPrime.length; i++) if (isPrime[i]) primes.add(i); int[] primeSumTerms = new int[1000000]; for (int i = 0; i < primes.size(); i++) { int terms = 1; int sum = primes.get(i); for (i...
9
@Override public void doAction(String value) { char choice = value.toUpperCase().charAt(0); do { switch (choice) { case 'R': //return to game return; //displays main menu case 'S': //save the game by storing data away, and quit by ca...
5
public TraverseMode getNonTransitMode() { if (contains(TraverseMode.CAR)) { return TraverseMode.CAR; } if (contains(TraverseMode.BICYCLE)) { return TraverseMode.BICYCLE; } if (contains(TraverseMode.WALK)) { return TraverseMode.WALK; } ...
3
public ImageIcon getImage() { System.out.println("Getting image"); if (image == null) { if (imagePath != null) { System.out.println(imagePath); image = new ImageIcon(getClass().getResource("images/" + imagePath)); } else { image = n...
2
public static void main(String args[]) { try { System.out.println("RS2 user client - release #" + 317); if (args.length != 5) { System.out .println("Usage: node-id, port-offset, [lowmem/highmem], [free/members], storeid"); return; } localWorldId = Integer.parseInt(args[0]); portOffset = ...
6
public int sarLookback( double optInAcceleration, double optInMaximum ) { if( optInAcceleration == (-4e+37) ) optInAcceleration = 2.000000e-2; else if( (optInAcceleration < 0.000000e+0) || (optInAcceleration > 3.000000e+37) ) return -1; if( optInMaximum == (-4e+37) ) ...
6
*/ public static void help(Cons commands) { { Cons thecommands = commands; if (thecommands == Stella.NIL) { { System.out.println("The following commands are available (type `(help <command>+)'"); System.out.println("to get command-specific documentation):"); System.out...
7
@Override public void run() { while(true){ try { Thread.sleep(Delta); } catch (InterruptedException e) { e.printStackTrace(); } // go through the list of timeStamps Double[] ts = timestamps.toArray(new Double[timestamps.size()]); for(int i = 0; i< ts.length; i...
5
public void eatFood() { if (isCheap() && getHousingRole().getHouse() != null){ //DAVID I'm trying this out to see what happens... print("Going to market to buy food to eat at home"); goToMarket(); print("Going to eat at home"); getHousingRole().msgEatAtHome(); mCommuterRole.mActive = true; mCommu...
6
@Override public void run() { while(true){ try { ArrayList<ChatMessage> messageCopy = new ArrayList<>(writtenMessages); writtenMessages.clear(); for (ChatMessage chatMessage : messageCopy) { dbCon.addMessage(chatMessage); } writtenMessages.clear(); loadMessages(); loadU...
3
public MainMenu() { Random rand = new Random(); menu = new OptionsMenu(); config.loadConfig("settings", ".xml"); sound = Config.songs.get(rand.nextInt(Config.songs.size())); try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exce...
1
public void persistTransactionSet(TransactionSet transactionSet) { String sqlStatement; dao.connect(); sqlStatement = generateInsertStmt(transactionSet); if(dao.getErrorLogs().getErrorMsgs().size() == 0){ dao.executeUpdate(sqlStatement); } if(dao.getErrorLogs().getErrorMsgs().size() == 0){ dao.disconnec...
2
public Matrix solve (Matrix B) { if (B.getRowDimension() != n) { throw new IllegalArgumentException("Matrix row dimensions must agree."); } if (!isspd) { throw new RuntimeException("Matrix is not symmetric positive definite."); } // Copy right hand side. double[][]...
8
private void saveFile() { byte[] data = new byte[this.torrentInfo.file_length]; System.out.println("building file..."); for(int i : this.pieces.keySet()){ Piece p = pieces.get(i); int pind = p.getIndex(); byte[] pdata = p.getData(); int dataOffset = pind * this.torrentInfo.piece_length; if(pind < ...
6
public static Object[] getSinkVertices(mxAnalysisGraph aGraph) throws StructuralException { if (!mxGraphProperties.isDirected(aGraph.getProperties(), mxGraphProperties.DEFAULT_DIRECTED)) { throw new StructuralException("The graph is undirected, so it can't have sink vertices."); } ArrayList<Object> sourceL...
4
@Override public boolean equals(Object obj) { if (obj instanceof Piece) { Piece otherPiece = (Piece)obj; return this.name.equals(otherPiece.name) && this.color == otherPiece.color; } return false; }
2
public void begin(){ while(true){ partida.mover(); repaint(); try{ Thread.sleep(18); }catch(InterruptedException e){} } }
2
public void run() { try { PrintWriter out = new PrintWriter(socket.getOutputStream(),true); BufferedReader in = new BufferedReader( new InputStreamReader(socket.getInputStream())); String userInput; while ((userInput = in.readLine()) != null) { out.println("Echo " +u...
2
public double[][] createLattice(int rows, int cols, double rate, double up, double down, double q) { double[][] lattice = new double[rows][cols]; for(int row = 0; row < rows; ++row) { for(int col = 0; col < cols; ++col) { /* ...
8
public void compareSignaturesFromFile(String inputfile, String outputfile) { try { BufferedReader br = new BufferedReader(new FileReader(inputfile)); File output = new File(outputfile); FileWriter writer = new FileWriter(output); String line; while ((line = br.readLine()) != null) { String[] toke...
5
public void setSeatType(long value) { this._seatType = value; }
0
public static Object getDirectedLeaf(mxAnalysisGraph aGraph, Object parent) { Object[] vertices = aGraph.getChildVertices(parent); int vertexNum = vertices.length; Object currVertex; for (int i = 0; i < vertexNum; i++) { currVertex = vertices[i]; int inEdgeCount = aGraph.getEdges(currVertex, parent, t...
3
public static boolean line_line(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3){ double f1 = (x1 - x0); double g1 = (y1 - y0); double f2 = (x3 - x2); double g2 = (y3 - y2); double f1g2 = f1 * g2; double f2g1 = f2 * g1; double det = f2g1 - f1g2; if(Math.abs(det) > ...
4
public String getName () { return name; }
0
public void updateCondition( float newCondition, boolean normalState, boolean burning ) { // // Firstly, make any necessary state transitions- final float oldCondition = condition ; condition = newCondition ; if (scaffolding == null && ! normalState) { clearAllAttachments() ; scaf...
6
@Override protected void process() { super.process(); Monster actor = (Monster) ai.getActor(); Player player = getPlayerToAttack(actor); if (actor == null || player == null) { terminate(); return; } if (actor.isFeared() && actor.getFearedSou...
7
public List<POWMessage> getObjects(List<InventoryVectorMessage> inventoryVectors) { List<POWMessage> objects = new ArrayList<>(inventoryVectors.size()); for (InventoryVectorMessage m : inventoryVectors) { POWMessage p = objectCache.get(m); if (p != null) { objects.add(p); } else { p = database.ge...
3
public static void main(String[] args) throws Exception { bytes = new byte[800000000]; urlmap = new HashMap<String, ArrayList<Integer>>(4500000); HashMap<Long, Integer> map = readHashMap("UsersMapping"); File dir = new File(inDirectory); int cnt = 0; long t1 = System.currentTimeMillis(); int totalUsers = ...
9
private void editParamCell() { int row = table.getSelectedRow(); if (row >= 0) { ParameterEditor pe = new ParameterEditor(model.getParameter(row)); if (pe.isOk()) { try { model.update(row, pe.getFormula()); } catch (Exception e1) { JOptionPane.showMessageDialog(null, e1.getMessage()); } ...
3
public static SelectItem[] getSelectItems(List<?> entities, boolean selectOne) { int size = selectOne ? entities.size() + 1 : entities.size(); SelectItem[] items = new SelectItem[size]; int i = 0; if (selectOne) { items[0] = new SelectItem("", "---"); i++; ...
4
* @return boolean whether the two decks contain the same order of cards */ public boolean equalsInOrder(Deck d) { if (this.cardArray.length != d.cardArray.length) return false; for (int i = 0; i < cardArray.length; i++) { if (cardArray[i].compareTo(d.cardArray[...
3
protected void genDoorsNLocks(MOB mob, CloseableLockable E, String doorName, int showNumber, int showFlag) throws IOException { if((showFlag>0)&&(showFlag!=showNumber)) return; boolean HasDoor=E.hasADoor(); boolean Open=E.isOpen(); boolean DefaultsClosed=E.defaultsClosed(); boolean HasLock=E.hasALock();...
7
public void pulse() { DCPackage pulsePackage = new DCPackage(currentRound, new byte[DCPackage.PAYLOAD_SIZE]); currentRound = (currentRound+1) % pulsePackage.getNumberRange(); resetRound(); broadcast(pulsePackage); }
0
public void bornAgain() { if (getParent() != null) { if (getParent().getParent() != null) { getParent().getParent().repaint(); } } }
2
public void update(Observable o, Object arg) { String name, str, text, textFinal, requete; List<String> keywords = sqlCommand.getKeywords(); List<String> types = sqlCommand.getTypes(); //textFinal = "<html><body style=\"font-family:Geneva,Arial,Helvetica,sans-serif;font-size:11px;\">"; textFinal = "<html><b...
6
public static byte[] dumpElement(TypeModel tm) { ClassWriter cw = new ClassWriter(0); FieldVisitor fv; MethodVisitor mv; String name = tm.bcType(); cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, name + "Element", "L" + collections + "impl/AbstractHugeElement<L" + name + "Allocation;>;L" + name + ";Ljava/...
4
public long FindSumOfPandigitalNumbersWithAscendingPrimeSubStringDivisibilityProperty() { Permutizer permutizer = new Permutizer(); long toReturn = 0; String currentPandigitalNumber = "0123456789"; do{ int twothreefour = Integer.parseInt( currentPandigita...
8
public LedString(int x, int y, String s) { this.x = x; this.y = y; stringShapes = new LedShape[s.length()]; int xOffset = x; for(int i = 0; i < s.length(); i++) { stringShapes[i] = charToShape(s.charAt(i)); stringShapes[i].setXY(xOffset, y); if(stringShapes[i].width == 0) stringShapes[i].moveX(4)...
5
public List<Subset> filterSubset(List<Subset> subsetList, int preferredSize){ if(subsetList.size () <=preferredSize && preferredSize !=-1)return subsetList; for (int i =0; i <subsetList.size ()-1; i ++) { for (int j =i+1; j <subsetList.size (); j ++) { Subset focus =subsetList.get (i); ...
7
private void jTree1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTree1MouseClicked Component node = (Component) jTree1.getLastSelectedPathComponent(); //System.out.println(node.getClass()); String description = null; if (node != null) { ...
8
@SuppressWarnings("unused") public static void main(String[] args) { if (args.length < 1) { System.out .println("Argumentos insuficientes para ejecutar la aplicación."); } else { if (args[0].toLowerCase().equals(MODO_CLIENTE)) { ControladorCliente c = new ControladorCliente(); } else if (args[0]....
3
public String getAlertDescription() { return alertDescription; }
0
private void chooseNewPlaylist() { if(!LockedPlaylistValueAccess.lockedPlaylist) { newFilePath = fileChooser.getNewFilePath(); String[] options = {}; // Only change the playlist if the new path is different from the old one. if((currentFilePath != newFilePath) &...
4
public boolean addTile(int x, int y, Tile tile) { Tile old = getLowestTile(x, y); if(old == null) return false; if(old.height == tile.height) { tile.next = old.next; tiles.set(getPos(x, y, this.width, this.height), tile); return true; } do { if(old.height == tile.height) { old.data ...
9
public void doCommand(int command) { switch (command) { case P2: case P3: case P4: main.newGame(selection + 2); break; case CONTROL_SETUP: new BomberConfigDialog(main); break; case EXI...
7
private String getMime(String extension) { String mime = ""; switch (extension) { case ".pdf": mime = "application/pdf"; break; case ".png": mime = "image/png"; case ".css": ...
6
protected Field getField() { return field; }
0
protected Token jjFillToken() { final Token t; final String curTokenImage; final int beginLine; final int endLine; final int beginColumn; final int endColumn; String im = jjstrLiteralImages[jjmatchedKind]; curTokenImage = (im == null) ? input_stream.GetImage() : im; beginLine = input_stream.g...
1
public static void main(String[] args) { try { Integer max = 0; Integer min = 0; Integer maxGoal = 0; Integer minGoal = 0; String maxName = ""; String minName = ""; String teamName=""; Scanner scanner = new Scanner(new File("file_Location/football.dat")); while (scanner.hasNext()) { S...
7
private String _parseMessage(String ... array) { String error = ""; for (String temp : array) { error += temp + " "; } return error; }
1
public String getEventName() { return eventName; }
0
private void bonoPuntaje(){ if(nivel.equals("Basico") && intentos == 6){ bono = 30; puntuacion += 30; } if(nivel.equals("Intermedio") && intentos == 4){ bono = 50; puntuacion += 50; } if(nivel.equals("Avanzado") && intentos == 2){ bono = 100; puntuacion += 100; } }
6
public LinkedNode removeDuplicates(LinkedNode head){ if(head==null){ return null; } if(head.getNext()==null){ return head; } Set<Integer> existingValues = new HashSet<Integer>(); List<Integer> nonDuplicateValues = new ArrayList<Integer>(); ...
8
private void resaveParamsShowTour(SessionRequestContent request) { Direction direction = (Direction) request.getSessionAttribute(JSP_CURRENT_DIRECTION); if (direction != null) { Integer idDirection = direction.getIdDirection(); if (idDirection != null) { request.s...
2
private static DisplayMode getBestDisplayMode(GraphicsDevice device) { for (DisplayMode bestDisplayMode : BEST_DISPLAY_MODES) { DisplayMode[] modes = device.getDisplayModes(); for (DisplayMode mode : modes) { if (mode.getWidth() == bestDisplayMode.getWidth() && mode.getHeight() == bestDisplayMode.getH...
5
private static int copyGapBytes(byte[] newcode, int j, byte[] code, int i, int iEnd) { switch (iEnd - i) { case 4: newcode[j++] = code[i++]; case 3: newcode[j++] = code[i++]; case 2: newcode[j++] = code[i++]; case 1: newcode[j++] = ...
4
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://down...
6
public Dimension getMinimumSize() { if (image != null) { return new Dimension(image.getWidth(), image.getHeight()); } return super.getMinimumSize(); }
1
public boolean memberP(Stella_Object value) { { Iterator self = this; if ((value == null) || value.standardObjectP()) { { Stella_Object m = null; Iterator iter000 = self; while (iter000.nextP()) { m = iter000.value; if (m == value) { ...
6
public static void newStartMenu(Game game, Screen parent) { try { startMenuClass.getConstructors()[0].newInstance(game, parent); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrac...
5
public Company getCompany() { return company; }
0
public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if(command.equals("About...")) { JFrame aboutFrame = new JFrame("About SChemP"); aboutFrame.setLocation(frame.getX()+250,frame.getY()+150); aboutFrame.setSize(300,300); aboutFrame.setVisible(true); } else if(co...
8
private String convertAddressToString (byte[] ipAddress, int port) { StringBuilder str = new StringBuilder(); for (int i = 0; i < 4; i++) { if (ipAddress[i] < 0) { str.append(ipAddress[i] + 256); } else { str.append(ipAddress[i]); ...
3
public void makeSelection() { if(!list.getSelectedValue().startsWith("-1")) { selection = list.getSelectedValue().substring(0, list.getSelectedValue().indexOf(";")); dispose(); } }
1
public void close() throws IOException { if (inStream != null) inStream.close(); if (inReader != null) inReader.close(); }
2
public boolean removeWarpUser(CommandSender cs, Command cmd, String string, String[] args) { Player player = (Player) cs; if (player.hasPermission("warspandports.user.remove") || player.isOp()) { if (args.length != 4) { player.sendMessage(ChatColor.RED + "Proper use is " + ChatColor.AQUA + "/w...
5
final void checkForComodification() { if (modCount != expectedModCount) throw new ConcurrentModificationException(); }
1
private void miSelPlayer2MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_miSelPlayer2MousePressed Object[] profileNames = Manager.getInstance().getProfileNames().toArray(); String selectedProfile = (String) JOptionPane.showInputDialog(this, "Select a player.", "Profil...
1
public void preload(String root) { File file = new File(root); File[] files = file.listFiles(); for(File f : files) { if(f.isDirectory()) { preload(f.getPath()); } else if(f.isFile()) { getSound(f.getPath()); } ...
3
private Boolean connectToServer(String serverName) { String rmiSerName = "rmi://localhost/" + serverName + "/"; try{ serverConnected = (ServerInterface)Naming.lookup(rmiSerName); if(!serverConnected.connect(this,getName())) gui.addLogArea("Impossibile connettersi\nNome già " + "presente nella lista ...
4
public void clickTutorial() { System.out.println("You have chosen your characters so please equip him with items next."); }
0
public static String getColor(int i) { switch(i) { case 0: return "black"; case 1: return "red"; case 2: return "blue"; case 3: return "green"; case 4: return "grey"; case 5: return "purple"; case 6: return "yellow"; case 7: return "brown"; case 8: return "orange"; } ...
9
protected String[] flatten(Options options, String[] arguments, boolean stopAtNonOption) { init(); this.options = options; // an iterator for the command line tokens Iterator iter = Arrays.asList(arguments).iterator(); // process each command line token while (iter....
9
@Override public void caseAAvalieExpSenaoComando(AAvalieExpSenaoComando node) { inAAvalieExpSenaoComando(node); { List<PComando> copy = new ArrayList<PComando>(node.getSenao()); Collections.reverse(copy); for(PComando e : copy) { e....
3
public List getEncoders(Serializable structure) { if (structure == null) return Collections.unmodifiableList(encoders); List validEncoders = new ArrayList(); Iterator it = encoders.iterator(); while (it.hasNext()) { Codec enc = (Codec) it.next(); if (enc.canEncode(structure)) validEncoders.add(enc)...
3
public boolean wordPatternMatch(String pattern, String str) { if (pattern.isEmpty()) { return str.isEmpty(); } if (map.containsKey(pattern.charAt(0))) { String value = map.get(pattern.charAt(0)); if (str.length() < value.length() || !str.substring(0, value.length()).equals(value)) { return false; ...
8
public boolean growNetherWart(Player player, String[] args, int radius) { Block playerCenter = player.getLocation().getBlock(); // Get Centrepoint (Player) int netherWarts = 0; for (int x = -radius; x < radius; x++) { for (int y = -radius; y < radius; y++) { for (int z = -radius; z < ...
6
@Override public boolean setBelt(Wearable belt) throws NoSuchItemException, WrongItemTypeException { if (belt != null) { if (belt instanceof Belt) { if (belt.getLevelRequirement() > level || belt.getStrengthRequirement() > stats[0] || belt.getDexterityRequirement() > stats[1] || belt.getMagicRequirement...
8
private void setCapacity(int capacity) { if (capacity < _n) { capacity = _n; } double factor = (_factor < 0.01) ? 0.01 : (_factor > 0.99) ? 0.99 : _factor; int nbit, nmax; for (nbit = 1, nmax = 2; nmax * factor < capacity && nmax < NMAX; ++nbit, nmax *= 2) { ...
9
public static void main(String[] args) throws IOException { decodeCustom decoder = new decodeCustom(); BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(args[0]))); BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(args[1]))); String recieved;...
2
public static void registerQueryRowVTIs( String className, String connectionURL ) throws Exception { // find public static methods which return ResultSet Class theClass = Class.forName( className ); Method[] methods = theClass.getMethods(); int ...
5
public static void process(String text) throws Exception { System.out.println(text); String[] args = StringUtil.tokenize(text); ModelCommand command = getCommand(args[0]); if (command == null) { Logger.log("\n" + "Comando '"); Logger.log(args[0]); ...
4
public void levelNode(List<List<Integer>> result,TreeNode node,int level){ if(node == null) return ; if(level == result.size()) result.add(new ArrayList()); result.get(level).add(node.val); levelNode(result,node.left,level+1); levelNode(result,node.right,l...
2
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; GeneratorState other = (GeneratorState) obj; if (rootUrl == null) { if (other.rootUrl != null) return false; } else if (!rootUrl.equals(...
9
@Override public STAFResult execute(RequestInfo reqInfo) { STAFResult result = super.execute(reqInfo); if (result.rc == STAFResult.Ok) { CommandAction command = null; String parsedCommandName = (parseResult.numInstances() >= 2) ? parseResult.instanceName(2).toUpperCase() : null; LOG.info("Looking for com...
4
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton1ActionPerformed LoginWorker loginWorker = new LoginWorker(); loginWorker.execute(); while (!loginWorker.isDone()) { } if (Client.getUser() != null) { this.setVisible(f...
2
public void changePassword(String username, String password) throws UserExistsException { User user = getUserByUsername(username); user.setPassword(password); try { saveUser(user); } catch (UserExistsException e) { throw new UserExistsException("Tne new password e...
1
public void getMessage() { try { JSONObject params = new JSONObject(); JSONObject meta = new JSONObject(); meta.put("client_version", PANDA_CLIENT_VERSION); meta.put("session_id", this.sessionId); params.put("meta", meta); JSONObject resul...
9