text
stringlengths
14
410k
label
int32
0
9
private boolean htaccessGranted( URI requestURI, HTTPHeaders headers, HypertextAccessFile htaccess, File directory, Map<String,BasicType> additionalSettings, Map<String,BasicType> optionalReturnSettings, Environment<String,BasicType> session ) throws IOException,...
3
public boolean mouseIn(int mx, int my) { if (xpos <= mx && mx <= xpos + width && ypos <= my && my <= ypos + height) return true; return false; }
4
private int HuffmanValue(int table[],int temp[], int index[], InputStream in) throws IOException{ int code, input ,mask=0xFFFF; if(index[0]<8){ temp[0] <<= 8; input = get8(in); if(input==0xFF){ marker=get8(in); if(marker!=0) marker_index=9; } temp[...
9
public String searchANDdescribe() { StringBuilder result = new StringBuilder(); for(K k : this) { if(k.getClass().equals(PapaBuilding.class)){ result.append(((PapaBuilding) k).getAttributes()); }else if(k.getClass().equals(PapaBicho.class)){ result.append(((PapaBicho) k).getAttributes()); }else if(...
9
private void toggleRemoveSelection(TreePath path) { Stack stack = new Stack(); TreePath parent = path.getParentPath(); while (parent != null && !isPathSelected(parent)) { stack.push(parent); parent = parent.getParentPath(); } if (parent != null) { stack.push(parent); } else { super.removeSelecti...
7
@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 Municipality)) { return false; } Municipality other = (Municipality) object; if ((this.municipalityID == null &...
5
public void setFirstName(String firstName) { this.firstName = firstName; }
0
private void promote(Position pos) { if (board.getFieldAt(pos) == Board.BLACK_REGULAR_PIECE) { board.changeFieldAt(pos, Board.BLACK_KING); } else if (board.getFieldAt(pos) == Board.WHITE_REGULAR_PIECE) { board.changeFieldAt(pos, Board.WHITE_KING); } }
2
public void checkPairs( Hand hand, Hand handP, String name ) { ArrayList<Card> alC = hand.getCards(); for (int i = 0; i < alC.size(); i++) { Card checker = alC.get(i); for (int n = 0; n < alC.size(); n++ ) { if ( n != i && checker.equals( alC.get(n)) ) { Card type = alC.get( n ); Syste...
6
public void keyTyped(KeyEvent e) { if (e.getKeyChar() == 127) { sim.doDelete(); return; } if (e.getKeyChar() > ' ' && e.getKeyChar() < 127) { Class c = sim.shortcuts[e.getKeyChar()]; if (c == null) { return; } ...
7
public Paint getGradientePaint(){ int x1=0, x2=getWidth(), y1=0, y2=getHeight(); switch (gradiente){ case HORIZONTAL: x1=getWidth()/2; y1=0; x2=getWidth()/2; y2=getHeight(); return new GradientPaint(x1,y1,colorPr...
9
private void rotate() { //orient++; if (orient%4==0) { litPositions=new int[][] {{0,1,0}, {0,1,0}, {0,1,1}}; } if (orient%4==1) { litPositions=new int[][] {{0,0,0}, {1,1,1}, {1,0,0}}; } if (orient%4==2) { litPositions=new int[][] ...
4
NonTerminal(HashSet<Token.Kind> tokenSet) { firstSet.addAll(tokenSet); }
0
public List<Message> getMessageList( long cvs_id, int person, int page_size, int offset ){ List<Message> list = new ArrayList<Message>(); PersonInfoHandler handler = null; try{ ResultSet result = dao_list.getMessageList(cvs_id, person, page_size, offset); handler = new PersonInfoHandler(); if( !handler.i...
4
@Override public boolean execute(RuleExecutorParam param) { Rule rule = param.getRule(); List<String> values = Util.getValue(param, rule); if (values == null || values.isEmpty()) { return false; } boolean retValue = true; for (String value : values) { String compareValue = rule.getValue(); if (rul...
6
private void nextNonce() { for(int i = 0; i < NONCE_SIZE; i++) { byte b = nonce[i]; if(b == Byte.MAX_VALUE) { nonce[i] = Byte.MIN_VALUE; } else { nonce[i] = ++b; return; } } }
2
public State hasChosenItemsState() { return hasChosenItemsState; }
0
public int DisplayWinners() { int TotalWinners = winners.size(); do { if (TotalWinners == 1) { System.out.println("Player " + winners.get(0).getPlayerid() + " has won the game!"); TotalWinners--; } else if (TotalWinners == 2) { System.out.println("Player " + winners.get(0).getPlayerid() ...
4
public void testCode() { int count = 0; boolean success; do { count++; success = TaskManager.DoTask(new SimpleAbstractTask("MESSAGE TASK") { /** * */ private static final long serialVersionUID = -354957472036892394L; @Override public synchronized void executeTask() { for (...
7
private String[] toPathArray(String path) { if (path.charAt(0) == '/') path = path.substring(1); return path.split("/"); }
1
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String form = ""; HttpSession sesion = request.getSession(); response.setContentType("text/html;charset=UTF-8"); response.setCharacterEncoding("UTF-...
3
public FloatElement[] getSortedSimilarWordsByDelta(String word) throws Exception{ int index = model1.index(word); FloatElement[] similarWords = new FloatElement[model1.sizeOfVocabulary]; //float invalid = -10; for (int i=0; i<model1.sizeOfVocabulary; i++){ float pmi1 = 0; float pmi2 = 0; floa...
9
public void testPropertyCompareToDayOfMonth() { MonthDay test1 = new MonthDay(TEST_TIME1); MonthDay test2 = new MonthDay(TEST_TIME2); assertEquals(true, test1.dayOfMonth().compareTo(test2) < 0); assertEquals(true, test2.dayOfMonth().compareTo(test1) > 0); assertEquals(true, test1...
2
public void chat() { // Get username System.out.println("Enter a username:"); System.out.print(">"); // Get chat message try(BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in))){ String fromUser = stdIn.readLine(); bow.setUserName(fromUser); System.out.println("You may...
7
@Test public void resolve() { String [] numbers={ "37107287533902102798797998220837590246510135740250", "46376937677490009712648124896970078050417018260538", "74324986199524741059474233309513058123726617309629", "91942213363574161572522430563301811072406154908250", "230675882075393461711719803104210...
0
@Override protected void setCompletion(final HTTPCompletion completion) { super.setCompletion(new HTTPCompletion() { @Override public void failure(URLRequest request, Throwable t) { if (completion != null) { completion.failure(request, t); ...
5
public void initAscii() { for(char i=0 ; i<256 ; i++) tableAscii.add(i); }
1
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Tree)) { return false; } final Tree<?> other = (Tree<?>) obj; if (rootNode == null) { if (other.rootNode != null) { return false; } } else i...
8
@Override public void componentResized(ComponentEvent e) { if(e.getComponent() == null || e.getComponent() instanceof JFrame == false) return; JFrame frame = (JFrame)e.getComponent(); Container contentPane = frame.getContentPane(); ...
4
private void init() { statsFile = new File("stats.txt"); date = new Date(); jLabel1 = new JLabel(); this.setBackground(Color.black); initLeaderBoards(); setBackLabel(); resetLayout(); //saveStats(); try { loadStats(); } catch...
1
static Playlist playlistFromElement(DomElement e) { if (e == null) return null; Playlist p = new Playlist(); if (e.hasChild("id")) p.id = Integer.parseInt(e.getChildText("id")); p.title = e.getChildText("title"); if (e.hasChild("size")) p.size = Integer.parseInt(e.getChildText("size")); p.creator =...
9
void updateVelocity(double t) { double dx, dy; if (Math.abs(getVelocity()[0] + (force.getX()/getMass())*t) < .6) //Breaks physics by limiting velocity. Might not actually do anything... dx = getVelocity()[0] + (force.getX()/getMass())*t; else dx = getVelocity...
8
public void dragCard(String ID, int newx, int newy) { for (Object e : table.getComponents()) { if ((e.getClass().equals(TCard.class) || e.getClass().equals(Token.class)) &&((TCard) e).getID().equals(ID)) { ((TCard) e).setCardPosition(newx, newy...
4
public void update(float delta) { if (startTime < 0) { startTime = System.currentTimeMillis(); } else if (time + delta < length / 1000) { time += delta; } if (endTime < 0 && System.currentTimeMillis() - startTime > length) { endTime = System.currentTimeMillis(); } if (System.currentTimeMillis() - e...
6
private void initNameTileFontMenu(Color bg) { this.nametextTilePanel = new JPanel(); this.nametextTilePanel.setBackground(bg); this.nametextTilePanel.setLayout(new VerticalLayout(5, VerticalLayout.LEFT)); String initFontTmp = this.skin.getNametextZoomedFont(); int initFontSizeTm...
7
public boolean decryptSerializedTable(){ String smartcard="verysecurepassword"; try { File f = new File(TABLE_FILE); File fe = new File(ENCRYPTED_TABLE_FILE); f.createNewFile(); fe.createNewFile(); FileInputStream fis = new FileInputStream(ENCRYPTED_TABLE_FILE); FileOutputStream fos = new ...
1
public void mouseClick(MouseEvent e){ if(e.getButton() == MouseEvent.BUTTON1){ if(data.orientation == 0){ menu.show(this, 0, TabButton.BUTTON_ACTIVE_HEIGHT); } else if(data.orientation == 1){ menu.show(this, 0, -menu.getHeight()); }...
3
protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) { while (in.remaining() > 0) { if (out.remaining() < 1) { return CoderResult.OVERFLOW; } final char c = in.get(); if (c >= 0 && c < 256 && IDENT_PDF_DOC_ENCODING_MAP[c]) { ...
6
private static void assertNum(int totalCounts, List<List<Double>> dataPointsUnnormalized) throws Exception { int sum = 0; for (int x = 0; x < dataPointsUnnormalized.size(); x++) for (int y = 0; y < dataPointsUnnormalized.get(x).size(); y++) sum += dataPointsUnnormalized.get(x).get(y); if (totalCounts...
6
public File getFile(String lfn, int resID) { if (lfn == null || resID == -1) { return null; } // sends a request to the RC int eventTag = DataGridTags.FILE_REQUEST; sendEvent(eventTag, lfn, resID); // waiting for a response from the resource Sim_...
3
private void serverNameTMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_serverNameTMouseReleased int index = serverNameT.getSelectedRow(); if(index>=0){ String server = (String)serverNameT.getModel().getValueAt(index, 0); serverConfigTF.setText(server); ...
2
public void createDestinationDirectories() { File projectObfuscatedDir = new File(destinationDir); projectObfuscatedDir.mkdir(); for (File directory : projectFiles) { if (directory.isDirectory()) { String n = destinationDir + "/" + directory.getAbsolutePath().substring(sourceDir.length()); File newDire...
2
public void onDisconnect() { GUIMain.add_line(DarkIRC.AppLang.getString("quit_msg")); while (!isConnected()) { try { reconnect(); Thread.sleep(3000L); for (int i = 0; i...
5
*@param nivel **/ public void showMeMoney(beansMiembro miembro, int nivel){ String tab = appMiembro.getLines(nivel); System.out.println(tab+"----------------------------------"); System.out.println(tab+"| "+miembro.getNick()+" Tus datos monetarios son:"); System.out.println(tab+"------------------------------...
3
@Override public ArrayList<String> getEffectSprites(){ ArrayList<String> result = new ArrayList<String>(); if(stype!=null) result.add(stype); if(stypeCount!=null) result.add(stypeCount); if(estype!=null) result.add(estype); return result; }
3
public SimulationResultsHolder runSimulation() { resultsHolder = new SimulationResultsHolder(); resultsHolder.addFlyReleaseInfo(fr.toString()); for (int i = 1; i<=numberOfDays; i++) { System.err.println("Running simulation for day " + i + "..."); double totalProbForDay = 0; int numberOfFlies = 0; Iter...
3
private String makeCode(){ String c=((ComboText)command.getSelectedItem()).getValue(); if(c.equals("MAKE")){ return logoObj.getText()+"=addons.logo("+makeW.getValue()+","+makeH.getValue()+"); " + logoObj.getText()+".setClosedCanvas("+closedCanvas.isSelected()+");"; ...
8
@Override public void update( float delta ) { SphereCollider spheres[] = new SphereCollider[6]; spheres[0] = new SphereCollider( player.getTransform().getPos(), 150 ); spheres[1] = new SphereCollider( player.getTransform().getPos(), 100 ); spheres[2] = new SphereCollider( player.getTransform().getPos(), 75 );...
6
public Repl(Class<? extends Visitor<S, T>> vClass) { this.interp = null; evalClass = vClass; try { interp = evalClass.newInstance(); } catch (InstantiationException | IllegalAccessException ie) { System.err.println(ie.getMessage()); System.err.println(...
2
public List getAll() throws SQLException { Session session = null; List list = new ArrayList(); try { session = HibernateUtil.getInstance().openSession(); list = session.createCriteria(EmployeeModel.class).list(); } catch (Exception e) { JOptionPane.s...
3
public String toString () { if (size == 0) return "{}"; StringBuilder buffer = new StringBuilder(32); buffer.append('{'); K[] keyTable = this.keyTable; int[] valueTable = this.valueTable; int i = keyTable.length; while (i-- > 0) { K key = keyTable[i]; if (key == null) continue; buffer.append(key)...
5
private void calcDeriv(){ if(this.numerDiffFlag){ // Numerical differentiation using delta and interpolation this.cs = new CubicSpline(this.x, this.y); double[] xjp1 = new double[this.nPoints]; double[] xjm1 = new double[this.nPoints]; ...
8
public Candlestick constroiCandleParaData(Calendar data, List<Negocio> negocios) { if(negocios.isEmpty()) return new Candlestick(0,0,0,0,0,data); double maximo = negocios.get(0).getPreco(); double minimo = negocios.get(0).getPreco(); double volume = 0; for (Negocio negocio : negocios) { v...
4
@Override public void appliquerReglesLocalesDeValidation(String[] categoriesReconnues) { //Validation de la date pour cycle. La date est valide entre 1er //avril 2012 et 1er avril 2014. Le reste n'est pas valide. Date dateMinConv = new Date(); Date dateMaxCo...
7
@Override public void setState(Map<String, Object> state) { this.state = state; this.showInfoArea(state); this.showHistoryArea(state); this.showFeedbackArea(state); this.updateMessageArea(""); this.input = ""; this.inputInfoArea.clear(); this.enableClicks = false; currentState = (S...
1
@Override public void update() { for(Particle p:particles){ p.update(); } }
1
public static void sobreescribirFichero(Map<String,Cliente> array){ try{ FileWriter fichero=new FileWriter("src/Ficheros/Clientes.txt"); PrintWriter pw=new PrintWriter(fichero); float aux_cuenta_corriente=0, aux_cuenta_ahorro=0, aux_penalizacion=0; Iterator it=array.entrySet().iterator(); w...
4
static final ItemDefinition itemDefinitionForID(int i) { ItemDefinition itemDefinition = (ItemDefinition) Class13.itemDefinitionNodes.getObjectForID(i); if (itemDefinition != null) { return itemDefinition; } byte abyte0[] = Class142_Sub10.aClass73_3362.method774(Class77.metho...
6
private void cleanup() { try { if (this.inputListener.isAlive()) { this.inputListener.interrupt(); } if (!this.socket.isInputShutdown()) { this.socket.getInputStream().close(); } ...
5
public void addNodeAfter(int item) { link = new IntNode(item, link); }
0
private static Moves performCleanupStep2(BotState state, Moves movesSoFar) { Moves out = new Moves(); boolean meaningfulMovePresent = false; for (AttackTransferMove attackTransferMove : movesSoFar.attackTransferMoves) { if (!attackTransferMove.getToRegion().getPlayerName().equals(state.getMyPlayerName())) { ...
9
static private final boolean cvc(int i) { if (i < 2 || !cons(i) || cons(i-1) || !cons(i-2)) return false; { int ch = b[i]; if (ch == 'w' || ch == 'x' || ch == 'y') return false; } return true; }
7
public Shell open(Display display) { // Load the images Class<HoverHelp> clazz = HoverHelp.class; try { if (images == null) { images = new Image[imageLocations.length]; for (int i = 0; i < imageLocations.length; ++i) { InputStream stream = clazz.getResourceAsStream(imageLocations[i]); ...
7
public void addPlugin(JPanel panel, PluginArea placement){ if(panel != null){ panel.setBackground(Constants.GUI_BACKGROUND); if(placement == PluginArea.SEARCH){ this.topPanel.add(panel, BorderLayout.EAST); } else { if(placement == PluginArea.LEFT_TOP){ this.layers[0].stopAndRemove(); this....
5
public static void main(String[] args) throws Throwable{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); Comparator<int[]> comp = new Comparator<int[]>() { public int compare(int[] o1, int[] o2) { if(o1[0]<o2[0])return -1; if(o1[0]>o2[0])return 1; return -1; } }; Stri...
8
public static Stella_Object accessMarkerTableSlotValue(MarkerTable self, Symbol slotname, Stella_Object value, boolean setvalueP) { if (slotname == Logic.SYM_LOGIC_TEST_TABLE) { if (setvalueP) { self.testTable = ((HashTable)(value)); } else { value = self.testTable; } } ...
7
public Object match(final String path) { if (rules.containsKey(path)) { return rules.get(path); } int n = path.lastIndexOf('/'); for (Iterator it = lpatterns.iterator(); it.hasNext();) { String pattern = (String) it.next(); if (path.substring(n).endsWith(pattern)) { return rules.get(patter...
5
@Override public long[] run(String query) { FUNCTION_NAME = "PRM"; query = query.toUpperCase(); boolean state = true; SQLParser parser = new SQLParser(); state &= parser.parse(query + ".txt"); // file name wrieteGlobalInfoToHDFS(parser); long[] time = new long[4]; long startTime = new Date().getTim...
5
@Override public void getInput() { int selection = -1; boolean isValid = false; do { this.displayMenu(); Scanner input = SnakeWithPartner.getInFile(); do { try { selection = input.nextInt(); isValid ...
6
@Action(name = "hcomponent.handler.onkeydown.invoke", args = { "undefined" }) public void onKeyDownInvoke(Updates updates, String[] args, String param) { HComponent<?> html = (HComponent<?>) Session.getCurrent().get( "_hcomponent.object." + param); if (html.getOnKeyDownListener() != null) Session.getCurrent...
3
private boolean jj_3R_87() { if (jj_scan_token(INTEGER_LITERAL)) return true; return false; }
1
public static String getTruncatedPathName(String pathNameString, String truncationString) { // we keep info thru the first directory // then separator..separator // then filename // if just two separators in pathname, we do nothing // c:\foo.txt // one separator, do nothing // c:\moo\foo.txt //...
5
@Test public void executeScenario() throws UnknownHostException { logger_.info("[Repair Scenario 4 Start] Peer on \"1\" repairs subtree on \"0\""); Injector injector = ScenarioSharedState.getInjector(); localPeerContextInit(injector); LocalPeerContext context = injector.getInstance(...
1
@Override public GetGameModelResponse getGameModel(int version, String cookie) { ArrayList<Pair<String,String>> requestHeaders = new ArrayList<Pair<String,String>>(); requestHeaders.add(new Pair<String,String>(COOKIE_STR, cookie)); ICommandResponse response = this.clientCommunicator.executeCommand(RequestType.GE...
2
@Override public void perform(CommandSender sender, String[] args) { if (args.length < 3) { inform(sender, "Usage: /give <player> <badge>"); } Player player = Bukkit.getPlayerExact(args[1]); try { badge = Badge.fromInt(Integer.parseInt(args[2])); } catch (NumberFormatException e) { badge ...
6
private void validateVertex(int v) { if (v < 0 || v >= V) throw new IndexOutOfBoundsException("vertex " + v + " is not between 0 and " + (V-1)); }
2
void begin() { while(true){ if(toDo.isEmpty() == true){ toDo.addAll(done); toDo.add(new DefaultState(as)); done.clear(); } if(toDo.peek() == null){ toDo.remove(); } else{ toDo.peek().show(); done.add(toDo.poll().next()); } } }
3
public void filter(byte[] samples, int offset, int length) { if (source == null || listener == null) { // nothing to filter - return return; } // calculate the listener's distance from the sound source float dx = (source.getX() - listener.getX()); float ...
5
public static void main(String[] args) { new _6_Initialization(); }
0
public final void startup(CmdLine cmdLine) { if (mHasStarted) { System.err.println(getClass().getSimpleName() + ".startup(...) may only be called once."); //$NON-NLS-1$ } else { KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this); configureApplication(cmdLine); LaunchProxy....
2
@Override public String process(HttpServletRequest request) throws MissingRequiredParameter { String password = request.getParameter("password"); String name = request.getParameter("name"); String surname = request.getParameter("surname"); String email = request.getParameter("email"); int idtipo = 3; ...
7
public static void main(String[] args) { DotThis dt = new DotThis(); Inner dti = dt.inner(); dti.outer().f(); }
0
public static boolean isValidName(String name) { if (name == null) { return false; } return name.length() > 3; }
1
public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("Starting Threads"); System.out.println("*******************************************"); Thread.yield(); final ArrayList<Integer> _al; ArrayList<Integer> _bl = new ArrayList<Integer>(); for(int index = 0; index<1...
8
public boolean filter(List<String> allowedFrameElements){ boolean result = false; Iterator<String> iter = frameElements.keySet().iterator(); while (iter.hasNext()) { if(allowedFrameElements.contains(iter.next())){ result = true; }else{ iter.remove(); } } return result; }
2
@Test public void testCustomUserAgentParsing() { // Test limited to the big browser families. As Camino can not be detected any longer, the second best match is Firefox3 (a child of Firefox). for (String agentString : camino2) { assertEquals(Browser.FIREFOX3, Browser.parseUserAgentString(agentString,Arrays.asLi...
2
public void addStudent(Student student) throws IllegalArgumentException { // Student names must be unique. This is because of a bug in JComboBox where // getSelectedIndex() returns the first index that contains the name of // the selected item: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4133743 // I ...
4
public static String getPrimitiveName(char c) { switch (c) { case 'B': return "byte"; case 'C': return "char"; case 'D': return "double"; case 'F': return "float"; case 'I': return "int"; case 'J': ...
9
@SuppressWarnings("unchecked") @Override public double getScore(Object userAnswer) { if (userAnswer == null) return 0; String ans = (String) userAnswer; ArrayList<String> trueAns = (ArrayList<String>) answer; for (int i = 0; i < trueAns.size(); i++) { if (trueAns.get(i).equals(ans)) return score; ...
3
protected void handleObject(Object obj) { if (obj == null) return; if (associatedMethods.get(obj.getClass()) == null) return; try { associatedMethods.get(obj.getClass()).invoke(this, obj); } catch (IllegalAccessException e) { e.printStackTr...
4
public void updateMailToAndCc(String to, String cc) { Address[] receiverAddress = createAddressFromStandardString(to); if (receiverAddress == null) { //如果没有设置收件人,则直接发送给发件人 try { receiverAddress = mMailMessage.getFrom(); } catch (MessagingException e) { // TODO Auto-generated catch block e.print...
6
@SuppressWarnings("rawtypes") public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { Player player = (Player) sender; ChatColor blue = ChatColor.AQUA; ChatColor gold = ChatColor.GOLD; if (player.hasPermission("skeptermod.usecommand.smclear") || (player.isOp())); {...
7
public void checkNext() { if (this.proceedToNext()) { this.cardBot.sendMessage("##cah", Colors.BOLD + "All players have submitted their cards." + Colors.NORMAL + " Time for " + this.czar.getName() + " to pick the winning card."); this.cardBot.sendMessage("##cah", this.blackCard.getColore...
5
public void draw(Graphics g) { printLEDNumbers(); if (isAlive && !isPaused) { advance(); } else if (isAlive && isPaused) { g.setColor(Color.red); g.drawString("PAUSED", 200, 40); } else { g.setColor(Color.red); g.drawString("GAME OVER (press 'N' for new game)", 200, 40); } //board....
4
public void removeSetting(String key) { if (getValue(key).equals("null")) return; synchronized(settings) { for (int i = 0; i < settings.size(); i++) { if (settings.get(i).split("=")[0].trim().equalsIgnoreCase(key)) { settings.remove(i); break; } } } }
3
@SuppressWarnings("resource") @Override public JsonObject getData() { JsonObject json = new JsonObject(); checkFile(config.getPath()); File file = new File(this.config.getPath()); try { if(file.isFile()){ json = read(file); }else{ json = readFiles(); } } catch (FileNotFoundExc...
3
@Deprecated public static String eventuallyRemoveStartingAndEndingDoubleQuote(String s) { if (s.length() > 1 && isDoubleQuote(s.charAt(0)) && isDoubleQuote(s.charAt(s.length() - 1))) { return s.substring(1, s.length() - 1); } if (s.startsWith("(") && s.endsWith(")")) { return s.substring(1, s.length() - 1)...
9
List<Equipo> getEquipos(String categoriaId, String deporteId) { List<Equipo> listaEquipos=null; String tituloDeporte="deporteId"; Map<String, Equipo> mapaEquipos = new HashMap(); Categoria categoria = torneos.getCategoria(categoriaId); String tituloCategoria = categoria...
9
public void doSave() { UserBean userBean = (UserBean) BeanHelper.getBean("userBean"); //load unitate into hashmap List<Unitate> unitateList = userBean.getUser().getSirues().getUnitateList(); HashMap<String, Long> siruesMap = new HashMap<>(); HashMap<Long, Integer> countMap = ne...
7
@Override protected Void doInBackground() { final int BUFFER_SIZE = 2048; BufferedInputStream bis = null; ByteArrayOutputStream baos; String prefix = ConfigManager.getInstance().getClientPrefix(); String addr = ConfigManager.getInstance().getProperties().getProperty("update...
5