text
stringlengths
14
410k
label
int32
0
9
private Method returnTypeMethod(String name, Class<?> returnType, Class<?>... argTypes) { try { Method method = method(name, argTypes); Ghost<?> ghost = Ghost.me(method.getReturnType()); if (ghost.openEyes().isPrimitive()) { if (Ghost.me(returnType).openEyes().wrapperClass() == ghost.openEyes().wrapperC...
7
@Basic @Column(name = "PRP_FORMA_PAGO") public String getPrpFormaPago() { return prpFormaPago; }
0
public void set_side_info(FrameData fd){ for(int ch = 0; ch < channels; ch++) side_info.set_scfsi(fd.si.scfsi[ch], ch); for(int gr = 0; gr < max_gr; gr++) for(int ch = 0; ch < channels; ch++){ Channel gi = fd.si.gr[gr].ch[ch]; if(gi.window_switchi...
4
public void addContaCorrente(ContaCorrente conta) { //this.aContas.incluir(conta); this.aContas.incluirNoFim(conta); }
0
@Override public void update(Observable o, Object arg) { if (o instanceof MP3Model) { if (arg instanceof List) { List<?> list = (List<?>) arg; if(list.get(0).getClass().equals(TrackBean.class)) { // If the list is full of tracks then we need to update the playlist view.setDisplayedPlaylist(model...
9
public void addModule(String policy,String subjectInput,String resourceInput, String actionInput, String environmentInput) { FilePolicyModule policyModule = new FilePolicyModule(); String policyname=Log4jInit.prefix+"/"+policy; System.out.println(policy); policyModule .addPolicy(policyname); CurrentEnvMo...
7
private Object findGetMethodInvoke(MBeanAttributeInfo[] attInfos, String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException{ Object value = null; for (MBeanAttributeInfo beanAttributeInfo : attInfos) { if (attribute.equals(beanAtt...
7
public LinkedList<String> operatePhoenix(String runParse, int extractFlag, File compile) { LinkedList<String> phoenixOutput = new LinkedList<String>(); try { //compile grammar compile(compile); //run parse for file input ProcessBuilder phoenixBuilder = new ProcessBuilder("/bin/tcsh", runParse)...
4
@Override public void rotate180(Board board) { int rot = (getRotation()+2) % 4; if (rotateAlgorithm(board, Point.translate(getBase(), BASES[rot]), RELS[rot], getKicks()[(getRotation()+1)%4])) { addRotation(2); } }
1
private JSONWriter append(String string) throws JSONException { if (string == null) { throw new JSONException("Null pointer"); } if (this.mode == 'o' || this.mode == 'a') { try { if (this.comma && this.mode == 'a') { this.writer.write('...
7
private static void registrarVinilo() { boolean salir; String nombre, codigo; float precio; Vinilo vinilo; do { try { System.out.print( "Introduce el nombre del Vinilo: "); nombre = scanner.nextLine(); System.out.print( "Introduce el cdigo del Vinilo: "); codigo = scanner.nex...
2
static void actionLikeB(B b) { b.action(); }
0
int checkBlockLine(int par1ArrayOfInteger[], int par2ArrayOfInteger[]) { int ai[] = { 0, 0, 0 }; byte byte0 = 0; int i = 0; for (; byte0 < 3; byte0++) { ai[byte0] = par2ArrayOfInteger[byte0] - par1ArrayOfInteger[byte0]; if...
9
public void keyPressed(KeyEvent e) { keys[e.getKeyCode()] = true; game.getCurrentScreen().onKey(e.getKeyCode()); }
0
@Override public void ParseIn(Connection Main, Server Environment) { Room Room = Environment.RoomManager.GetRoom(Main.Data.CurrentRoom); if (Room == null) { return; } if (!Room.CheckRights(Main.Data, true)) { return; } if...
3
public List<Message<?>> purge(MessageSelector selector) { if (selector == null) { return this.clear(); } List<Message<?>> purgedMessages = new ArrayList<Message<?>>(); Object[] array = this.queue.toArray(); for (Object o : array) { Message<?> message = (Message<?>) o; if (!selector.accept(message) &&...
9
public FieldPainter (int winWidth, int winHeight) { super(); setSize(winWidth, winHeight); fieldWidth = (getWidth() - 200) / cellSize; fieldHeight = (getHeight() - 40) / cellSize; alg = new AStar(fieldWidth, fieldHeight, Integer.valueOf(dTextField.getText())); alg.setDe...
4
public int getMinimumWidth(TreePanel panel) { int width = TextDrawing.getPreferredSize(getHeaderFont(), getName()).width; if (panel.isUserSortable()) { width += SORTER_WIDTH; } return width; }
1
@Override public void putAll(Map<? extends K, ? extends V> m) { for (K k : m.keySet()) { keys.add(k); values.add(m.get(k)); } }
3
public void move(int dir) { direction = dir; setImage(dir); if (dir == def.Frame.UP) { GoingUp = true; GoingDown = false; beStoped(); if (canMoveUp) { dy = -def.Frame.SPEED; } } if (dir == def.Frame.DOWN) { GoingDown = true; GoingUp = false; beStoped(); if (canMoveDown) { d...
9
@BeforeTest @Test(groups = { "MaxHeapIntegers" }) public void testMaxHeapIntPushPop() { Reporter.log("[ ** MaxHeap Integer Push ** ]\n"); testQueueInt = new MaxPriorityQueue<>(new Integer[seed], true); try { Reporter.log("Insertion : \n"); timeKeeper = System.currentTimeMillis(); for (int i = 0; i...
6
public Piece getPiece() { return this.placedPiece; }
0
public static Rate getRateByID(int rateID){ try { if(conn == null || conn.isClosed()){ conn = DatabaseConnection.getConnection(); } } catch (SQLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } Rate r = null; try { Statement stmnt = conn.c...
5
User(String prefix, String nick) { _prefix = prefix; _nick = nick; _lowerNick = nick.toLowerCase(); }
0
public LimitedSkiPass(int id, String type, Date activationDate, Date expirationDate, int numPassages) { super(id, type, activationDate, expirationDate); if (numPassages <= 0) { throw new IllegalArgumentException( "Non-positive number of passages is not allowed...
1
public synchronized String getRawData() throws IOException { byte[] input; //temporary holder if (m_connected) { m_os.write('G'); //request Data System.out.println("Requested Data"); if (m_is.available() <= bufferSize) { input = new byte[m_is.availab...
5
public Matrix solve (Matrix B) { if (B.getRowDimension() != m) { throw new IllegalArgumentException("Matrix row dimensions must agree."); } if (!this.isNonsingular()) { throw new RuntimeException("Matrix is singular."); } // Copy right hand side with pivoting int n...
9
public void setProporties(int type) { this.type = type; switch(type) { case PLAYER: health = 100; damage = -1; points = -1; hitLevel = 2; break; case INVADER1: health = 100; damage = -1; points = 10; hitLevel = 1; break; case INVADER2: health = 100; damage = -1; ...
8
public Integer getByeWeekValue(Schedule evolvable) { Integer value = 0; List<Week> weeks = evolvable.getWeeks(); for(int i = 0; i < weeks.size(); i++) { Week w = weeks.get(i); if(i >= 4 && i <= 11) { int byeCount = 0; for(int j = 0; j < Week.DAYS_PER_WEEK; j++) { Day day = w.getDay(j); ...
9
public String getRoadHaul() { return roadHaul; }
0
public void setBoardValue(int i,int j,int token) { if(i < 0 || i >= 3) return; if(j < 0 || j >= 3) return; board[i][j] = token; }
4
public static void changeSelectionToNode(JoeTree tree, OutlineLayoutManager layout) { Node selectedNode = tree.getYoungestInSelection(); // Update Selection tree.clearSelection(); tree.addNodeToSelection(selectedNode); // Record State tree.setEditingNode(selectedNode); tree.setCursorPosition(0); tre...
0
@Override public Cliente salvar(Cliente entidade) throws ValidacaoException { if (entidade == null) throw new IllegalArgumentException("'entidade' não pode ser nula"); if (!cnpjEstaValido(entidade.getCNPJ())) throw new ValidacaoException( String.format("C...
3
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 synchronized int getInt(ConfigValues path) { return this.yaml.getInt(path.getPath()); }
0
public boolean contains(E e) { if (search(e) != null) { return true; } return false; }
1
protected int[] filterPixels( int width, int height, int[] inPixels, Rectangle transformedSpace ) { int index = 0; int[] outPixels = new int[width * height]; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { int pixel = 0xffffffff; for (int dy = -1; dy <= 1; dy++) { int iy = y+...
8
void move(int delta) { try { DateFormat df = new SimpleDateFormat("yyyy/MM"); Date d = df.parse(currentMonth); Calendar calendar = Calendar.getInstance(); calendar.setTime(d); calendar.add(Calendar.MONTH, delta); DateFormat df2 = new Simpl...
1
private void createNetwork(ArrayList<Road> roads, ArrayList<RoadLink> roadLinks){ // initialization int totalRoads = roads.size(); network = new int[totalRoads*2][totalRoads*2][NUMBER_OF_ARC_ATTRIBUTES]; // set up road to node relation - needed for adding road links HashMap<Integer, Integer> roadIdToNode = ne...
7
public String solve(){ if(status != NOT_SOLVED){ return status; } double p0 = initAprox; double p = p0; for(int i = 0; i < MAX_ITER; i++){ p = p0 - (f.at(p0) / fp.at(p0)); if( Math.abs(p - p0) < TOLERANCE){ // we're done solution = p; iterations = i; solutionEval = f.at(p); status = ...
3
private void addCardImageToLabel(int position, boolean naMao, Carta carta) { String caminhoCarta = null; if(carta.isVirada()){ caminhoCarta = "resources/images/" + carta.getNumero() + carta.getNaipe() + ".png"; } if(carta.isFechada()){ caminhoCarta = "resources/i...
9
public int compareTo(Instruction instr) { if (addr != instr.addr) return addr - instr.addr; if (this == instr) return 0; do { instr = instr.nextByAddr; if (instr.addr > addr) return -1; } while (instr != this); return 1; }
4
public String translate(final String text) { final StringBuffer rv = new StringBuffer(); Element temp = null; char current; boolean match = false; for (int x = 0; x < text.length(); x++) { current = text.charAt(x); temp = pattern; match = false; while(temp != null) { if (isMatch(curren...
8
public void initTermList(ResultSet rs) { try { while (rs.next()) { String term = rs.getString("term"); if (!termList.contains(term)) { termList.add(term); } } } catch (SQLException e) { e.printStackTrace(); } }
3
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ThreeDimCoordinate other = (ThreeDimCoordinate) obj; if (x != other.x) return false; if (y != other.y) return false; if (z != other.z) ...
6
public static void main(String[] varArgs) { int rows; String option; Pset2Mario m = new Pset2Mario(); do { Console c = System.console(); out.print("How many rows high would you like the pyramid to be? (The number must be between 0 and 23, inclusive.) "); ...
6
public static void main(String[] args) { Scanner s = new Scanner(System.in); String shortStr, longStr; int count = 0; int seriesCount = 0; System.out.print("Please enter a short string: "); shortStr = s.nextLine(); System.out.print("Now please en...
3
@Override public void valueChanged(TreeSelectionEvent e) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) e.getPath().getLastPathComponent(); String key = (String) node.getUserObject(); JScrollPane jsp = (JScrollPane) panelJspMap.get(key); jsp.getVerticalScrollBar().setValue(0); // Scrolls the right pa...
0
@Override public void actionPerformed(ActionEvent e) { Reference.lastActionMinute = new DateTime().getMinuteOfDay(); if (e.getSource() == overviewButton) { Reference.overPanel = new OverPanel(); ...
8
protected void updateText( final BaseUI UI, Text headerText, Text detailText ) { detailText.setText("") ; headerText.setText("") ; final String name = category.name ;//.toUpperCase() ; headerText.setText(name+" structures:") ; for (final InstallType type : category.types) { final Composi...
7
public static double wordDifference(Map<String, Integer> t1, Map<String, Integer> t2) { // construct total word counts int totes1 = 0; int totes2 = 0; for (String s : t1.keySet()) { totes1 += t1.get(s); } for (String s : t2.keySet()) { totes2 += t2.get(s); } // construct return value for first aut...
6
public static String getTypeName(Type type) { if (type == null) return "null"; if (! (type instanceof Class<?>)) return type.toString(); Class<?> cls = (Class<?>) type; if (cls.isArray()) { // ??? in Field.getTypeName, this block was wrapped with a try block // which allo...
8
public String getSavePath() { return savePath; }
0
* @param beep true if the clock should beep */ public void start(int interval, final boolean beep) { ActionListener listener = new ActionListener() { public void actionPerformed(ActionEvent event) { Date now = new Date(); System.out.println(...
1
public Writer openSource( JPackage pkg, String fileName ) throws IOException { final OutputStreamWriter bw = encoding != null ? new OutputStreamWriter(openBinary(pkg,fileName), encoding) : new OutputStreamWriter(openBinary(pkg,fileName)); // create writer try { ...
5
public void actionPerformed(ActionEvent e) { if (automaton.getInitialState() == null) { JOptionPane.showMessageDialog(Universe .frameForEnvironment(environment), "The automaton should have " + "an initial state."); return; } AutomatonChecker ac = new AutomatonChecker(); if (ac.isNFA(automaton)) ...
2
boolean inSubroutine(final long id) { if ((status & Label.VISITED) != 0) { return (srcAndRefPositions[(int) (id >>> 32)] & (int) id) != 0; } return false; }
1
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String activateString = request.getParameter("activate"); if (activateString != null && !activateString.trim().isEmpty()) { Boolean activate = Boolean.valueOf(activateString); if (acti...
5
public boolean increment(T myKey,double increment) { boolean newObject=false; Double myValue=get(myKey); if (myValue==0) { myValue=new Double(increment); if (increment>0) { newObject=true; } } else { myValue=new Double(myValue.doubleValue()+increment); } put(myKey,myValue); return ne...
2
private Mnemonic getMnemData(String assemblyLine) throws AssemblerException { String[] assemblyLineSplit = assemblyLine.split("\\s+"); ArrayList<String> assemblyTermList = new ArrayList<String>(); for (String assemblyTerm : assemblyLineSplit) { assemblyTerm = assemblyTerm.replaceAll("^,+", ""); assemblyT...
3
@Override public int getChildCount ( Object parent ) { Value<?> vprt = ( (BencodeTreeNode) parent ).getValue(); if ( vprt instanceof ListValue ) { return ( (ListValue) vprt ).getSize(); } else if ( vprt instanceof DictionaryValue ) { return ( (DictionaryValue) vprt ).getSize(); } else { return...
3
private boolean camposCompletos (){ if((combo_tipo.getSelectedIndex()>=0)&& (fecha.isFechaValida(field_desdee.getText()))&& (fecha.isFechaValida(field_hasta.getText()))&& (!field_tasa.getText().equals(""))&& (!field_sobretasa.getText().equals("")) ){ ...
5
public static int reverse(int x) { int sign = x < 0 ? -1 : 1; int raw = x < 0 ? -1 * x : x; long res = 0; do { res = res * 10L + raw % 10L; raw = raw / 10; } while (raw != 0); if (res > Integer.MAX_VALUE) return 0; else return (int) (sign * res); }
4
@Before public void setUp() { try { tiedosto = new File("JapanimaatinTiedostot/testi.txt"); PrintWriter kirjoitin = new PrintWriter(tiedosto); kirjoitin.print(""); //tyhjennetään tiedosto edellisten testien tms jäljiltä kirjoitin.close(); lukija = ...
1
public static void setAssets(String serverID, String assetID) { List baskets = Basket.getBasketList(serverID, null); if (baskets != null && baskets.size() > 0 && !"Popup Dialog".equalsIgnoreCase(((String[]) baskets.get(0))[0])) { ((BasketTableModel) jTable19.getModel()).setValue(baskets); ...
7
public void setPosition(float[] position) { if (Float.isNaN(position[0]) || Float.isNaN(position[1])) { throw new RuntimeException("Position is NaN"); } this.position = position; }
2
@Test public void testFindByPrimaryKey() { fail("Not yet implemented"); }
0
private void validateEvaluateStack(){ if(isStackEmpty()) throw new EmptyStackEvaluationException(); if( !( operandStack.size() == operatorStack.size()+1 && operandStack.size() > 1) ) throw new IllegalNumberOfOperandsException(); }
3
public double[][] rankedAttributes () throws Exception { int i, j; if (m_attributeList == null || m_attributeMerit == null) { throw new Exception("Search must be performed before a ranked " + "attribute list can be obtained"); } int[] ranked = Utils.sort(m_attrib...
7
public boolean searchMatrix(int[][] matrix, int target) { // IMPORTANT: Please reset any member data you declared, as // the same Solution instance will be reused for each test case. if (matrix == null || matrix.length == 0) return false; int m = matrix.length; int n = matrix[0].length; int s = 0; int ...
5
protected CycFormulaSentence loadKBQSentence(CycAccess access, CycDenotationalTerm kbq) throws CycApiException, IOException { try { final String command = SubLAPIHelper.makeSubLStmt(KBQ_SENTENCE, kbq); return access.converseSentence(command); } catch (CycApiException xcpt) { throw ne...
1
private Tree conditionalExpressionPro(){ Tree conditionalExpression = null, truePart = null, falsePart = null; if((conditionalExpression = orExpressionPro()) != null){ if((accept(Symbol.Id.PUNCTUATORS,"\\?")) != null){ if((truePart = expressionPro()) != null){ if((accept(Symbol.Id.PUNCTUATORS,":")) !...
5
public void writeTypes(Vector vector) { // A big ol' case statement in a for loop -- what's polymorphism mean, again? // I really wish I could extend the base classes! Enumeration enm = vector.elements(); Object nextObject; while (enm.hasMoreElements()) { nextObject = enm.nextElement(); if (null == nex...
5
public static void main(String[] args) { try { List<String> warnings = new ArrayList<String>(); boolean overwrite = true; File configFile = new File(ClassLoader.getSystemResource(runXMLAUTHORITY).getFile()); ConfigurationParser cp = new ConfigurationParser(warnings); Configuration config = cp.parseConf...
6
protected static boolean chantAlignmentCheck(StdAbility A, MOB mob, boolean renderedMundane, boolean auto) { if((!auto) &&(!mob.isMonster()) &&(!A.disregardsArmorCheck(mob)) &&(mob.isMine(A)) &&(!renderedMundane) &&(CMLib.dice().rollPercentage()<50)) { if(!A.appropriateToMyFactions(mob)) { mob....
8
public String toString() { String s = ""; for (int amount = totalAmount; amount > 0; amount -= coin[amount]) s += coin[amount] + " "; return s; }
1
public CreditCard() { setTitle("Credit Card Application"); JButton_PerAC.setText("Add Credit-card account"); JButton_Withdraw.setText("Charge"); JButton_CompAC.setText("Generate Monthly bills"); //remove all listener that we have first for (ActionListener al : JButton_P...
4
@Override public void sort(T[] comparables) { for (int i = 0; i < comparables.length; i++) { for (int j = i + 1; j < comparables.length; j++) { if (comparables[i].compareTo(comparables[j]) > 0) { swat(comparables, i, j); } } ...
3
@Override public DataTable generateDataTable (Query query, HttpServletRequest request) throws DataSourceException { DataTable dataTable = null; try (final Reader reader = new FilterCsv (new BufferedReader (new InputStreamReader (new URL (this.urlYahoo).openStream())))) { TableRow row = new TableRow (); ...
5
public boolean skipPast(String to) throws JSONException { boolean b; char c; int i; int j; int offset = 0; int length = to.length(); char[] circle = new char[length]; /* * First fill the circle buffer with as many characters as are in the...
9
@SuppressWarnings("empty-statement") private static <T extends Comparable<? super T>> void quickSort(T[] a, int low, int high) { if (low + CUTOFF >= high) { insertionSort(a, low, high); } else { int middle = (low + high) / 2; // Sort low, middle, high ...
9
public void setPitch( float pitch ) { if ( pitch < 0 ) { pitch += 360f; // unnegativize(TM) the number } pitch %= 360; // get the number within 0-359 // the pitch is out of range if ( ( pitch > minPitch ) && ( pitch < maxPitch ) ) { /...
5
private static boolean checkEdges(ConnectedGraph G1, ConnectedGraph G2, Map map, int n) { // Check edges in the forward direction. for (int i = 0; i < n; i++) { int key = map.getKey(i); int value = map.getValue(i); if (G1.V[key].children.length != G2.V[value].children.length) { System.out.println("...
8
public void writeWritingAccesses() { String path = output.toString() + "/" + measurementName + "_writingAccesses.txt"; writingAccesses = new File(path); if (writingAccesses.exists()) { try { fr = new FileReader(path); br = new BufferedReader(fr); StringBuffer buffer = new StringBuffer(...
5
private final boolean cons(int i) { switch (b[i]) { case 'a': case 'e': case 'i': case 'o': case 'u': return false; case 'y': return (i==0) ? true : !cons(i-1); default: return true; } }
7
protected void fileScan(File f) throws FileNotFoundException{ //Do not consider the size of pkgs String key=null; boolean chunkEncoding=false; boolean emptyPkg=false; InfoItemSlot item = new InfoItemSlot(null,0,1); // System.out.println("File name: "+f.getName()); FileInputStream fin = new FileInputStre...
4
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Passage other = (Passage) obj; if (role == null) { if (other.role != null) return false; } else if (!role.equals(other.role)) return ...
9
String ToStringOnlyBorderInformation(int mark) { String retVal = ""; if (!comparisonResult.numberGenesOnBorderIntervalAllSide.isEmpty()) { for (String gene : comparisonResult.numberGenesOnBorderIntervalAllSide.keySet()) { if (comparisonResult.numberGenesOnBorderIntervalAllSid...
4
@Override public void load(FileInputStream in) throws IOException{ int c = in.read(); if (c != -1){ for (int i = 0; i < contains.length; i++){ setItemInSlot(i, new Item(in.read())); } } }
2
*@param nivel * @return descuento **/ public long devolverPorcentaje(long valor, int nivel){ long descuento = 0; if(nivel == 1){ descuento = (valor * 2)/100; }else if(nivel == 2){ descuento = (valor * 25)/100; }else if(nivel == 3){ descuento = (valor * 6)/100; }else if(nivel >= 4 && nivel <= 5){...
7
public void trajectory(int time){ int activity; for(int i=0; i<time; i++){ for(int j=0;j<numNodes;j++){ System.out.printf(""+(nodes.get(j).getState()? " ":"█") ); } activity = 0; activity = update(activity); System.out.printf("\t%d\t%d\n", activity, state); } }
3
@Override public String getColumnName(int column){ String name = "??"; switch (column){ case 0: name ="RaavareId"; break; case 1: name ="Raavare Navn"; break; case 2: name ="LeverandoerId"; break; case 3: name ="Raavare Kost Pris"; break; case 4: name ="Raavare V...
5
@Override public void tileFocusChangedAt(Position p) { // check if a tile was clicked Unit u = game.getUnitAt(p); City c = game.getCityAt(p); if (c != null) { CleanCityUI(); ImageFigure productionFig = new ImageFigure(c.getWorkforceFocus(), new Point(GfxConstants.WORKFORCEFOCUS_X, GfxConst...
4
public void removeMouseMotionListener(MouseMotionListener l) { if(l == null) { return; } this.mouseMotionListener = null; }
1
@Override public void onEnable() { plugin = this; cmdManager = new CommandManager(this); listenerManager = new ListenerManager(this); loadKits = new LoadKits(this); configFile = new File(getDataFolder().getAbsolutePath()+"/config.yml"); voteKits = new File(getDataFolder().getAbsolutePath()+"/kits.yml")...
2
public void start_logging() { synchronized(logging_enabled) { logging_enabled = true; } }
0
private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed int lastItem = jComboBox1.getItemCount()-1; if(loaded && jComboBox1.getSelectedIndex()==lastItem) { String input = JOptionPane.showInputDialog("Enter the application's ID:"); ...
4
private void updateRanking(int clan) throws SQLException { StringBuilder sb = new StringBuilder(); sb.append("SELECT c.id, "); sb.append(clan != -1 ? "c.jobRank, c.jobRankMove" : "c.rank, c.rankMove"); sb.append(", a.lastlogin AS lastlogin, a.loggedin FROM characters AS c LEFT JOIN accou...
9
@Override public void onSpawnTick(SinglePlayerGame game) { Set<Location> entityLocations = game.getEntityLocations(this); for (Location loc : entityLocations) { Set<Location> emptyLocations = game.getEmptyLocations(loc.x, loc.y, 1); for (Location empty : emptyLocations) { ...
3
public static List<Car> loadData(String datafile) throws NumberFormatException, IOException { List<Car> cars = new LinkedList<Car>(); int nextuid = 0; //open file from jar BufferedReader in = new BufferedReader(new InputStreamReader(RentalStore.class.getClassLoader(...
3