text
stringlengths
14
410k
label
int32
0
9
public static void makeGrid(Container parent, int rows, int cols, int initialX, int initialY, int xPad, int yPad) { SpringLayout layout; try { layout = (SpringLayout)parent.getLayout(); } ...
6
public static List<TableColumnDesc> getColumns(String sql) throws SQLException{ List<TableColumnDesc> result = new ArrayList<TableColumnDesc>(); Statement stt = con.createStatement(); ResultSet rs = stt.executeQuery(sql); while (rs.next()) { TableColumnDesc tcd = new TableColumnDesc(); tcd.setField(rs.ge...
1
public void cambiarPosicionJugado2(){ for(int x=0;x<8;x++){ for(int y=0;y<8;y++){ if(pd.mapa_jugador2[x][y].equals(codigo)) pd.mapa_jugador2[x][y]=""; } } int x=rd.nextInt(0)+7; int y=rd.nextInt(0)+7; cam...
3
protected String getBoxDescription(Box box) { if (box.getType() == Type.TEXT_CONTENT) return box.getText(); else { final String cls = box.getAttribute("class"); final String id = box.getAttribute("id"); StringBuilder ret = new StringBuilder("<"...
3
void removeInternal(Node<K, V> node, boolean unlink) { if (unlink) { node.prev.next = node.next; node.next.prev = node.prev; } Node<K, V> left = node.left; Node<K, V> right = node.right; Node<K, V> originalParent = node.parent; if (left != null && right != null) { /* *...
8
public boolean addToKit(T elem){ if(kit.add(elem)) return true; else return false; }
1
@Override public int compare(Chromosome o1, Chromosome o2) { if(o1.getFitness() > o2.getFitness()) return -1; if(o1.getFitness() < o2.getFitness()) return 1; return 0; }
2
public void out(String level, String msg) { // The messages level int severity = 0; // Send passed value to upper case String compare = level.toUpperCase(); // Set log level to passed parameters (if it can be mapped) if (compare.startsWith("INFO")) { // All messages severity = 4; } else if (compare...
6
public boolean isZeroVector(){ return x == 0 && y == 0; }
1
public void analyse() { LexicalAnalyser lexicalAnalyser = CommandAnalyseFactory .createLexicalAnalyser(this.sentence); try { lexicalAnalyser.analyse(); } catch (AnalyseException e) { } if (!lexicalAnalyser.isComplete()) { this.errors = lexicalAnalyser.getErrorMsg(); return; } SyntaxAnalyser s...
5
public double getPerformance(int evaluation) { double result; result = Double.NaN; switch (evaluation) { case EVALUATION_CC: result = m_CC; break; case EVALUATION_RMSE: result = m_RMSE; break; case EVALUATION_RRSE: result = m_RRSE; break; case EVALUATION_MAE: res...
8
@Override public void update(Match obj) { PreparedStatement pst = null; try { pst = this.connect().prepareStatement("update Matches set equipeA=?, equipeB=?, scoreA=?, scoreB=?, datematch=? where id=? ;"); pst.setString(1, obj.getEquipeA()); pst.setString(2, obj.g...
3
private boolean readFeed() { try { // Set header values intial to the empty string String title = ""; String link = ""; // First create a new XMLInputFactory XMLInputFactory inputFactory = XMLInputFactory.newInstance(); // Setup...
8
@Override public void tick(double dt) { this.dt = dt; super.move(dt); gravitate(); if (x > GameState.getInstance().getWidth() + 100 || x < -100 || y > GameState.getInstance().getHeight() + 100 || y < -1000) remove(); handleIntersects(); applyFriction(); liveTime += dt; if (liveTime >= explosionTime...
5
public static void prePlay(String charType, Scanner scan, Random gen) { //Parameters: Character type, Scanner and a random number generator if (charType == "Mage") { Mage player = new Mage(); play(scan, player, gen, "Mage"); } else if (charType == "Necromancer") { Necromancer player = new Necro...
2
public void run() { while ( true ) { try { Socket newClient = sock.accept(); handler.handleNewConnection(newClient); } catch (IOException e) { System.exit(0); return; } } }
2
public String getMessage() { return this.message; }
0
public static void main(String[] args) { Scanner dado = new Scanner(System.in); Agencia a = new Agencia(); int numero; String proprietario; float valor; boolean opcao = false; while (!opcao) { try { menu(); int operacao...
8
public void update() { int xChange = 0, yChange = 0; if (anim < 7500) anim++; else anim = 0; if (input.up) yChange--; if (input.down) yChange++; if (input.left) xChange--; if (input.right) xChange++; if (xChange != 0 || yChange != 0) { move (xChange, yChange); moving = true; } else { ...
7
public synchronized void start(int... ports) { if (ports != null && ports.length > 3) { // TODO set ports gameSocketServerPort = ports[0]; chatSocketServerPort = ports[1]; managerSocketServerPort = ports[2]; } if (!listening) { listening = true; (new Thread(this)).start(); } }
3
public void updateUniforms(Matrix4f worldMatrix, Matrix4f projectedMatrix, Material material) { if (material.getTexture() != null) material.getTexture().bind(); else RenderUtil.unbindTextures(); setUniform("transform", projectedMatrix); ...
1
public void saveMetaRecords() throws IOException{ Metafile record; KeyFrame key; String metaFile = ""; primaryFileName = primaryFileName.split(".rgb")[0]; System.out.println("primary file name "+primaryFileName.split(".rgb")[0]); FileWriter fstream = new FileWriter(primar...
2
public void setFunTipo(String funTipo) { this.funTipo = funTipo; }
0
public static double acos(double a){ if(a<-1.0D || a>1.0D) throw new IllegalArgumentException("Fmath.acos argument (" + a + ") must be >= -1.0 and <= 1.0"); return Math.acos(a); }
2
private void processEvent(Sim_event ev) { Object data = null; data = ev.get_data(); // get the event's data if (data != null && data instanceof Gridlet) { Gridlet gl = (Gridlet)data; completedJobs.add(gl); } else { // handle ping request ...
3
private boolean r_combo_suffix() { int among_var; int v_1; // test, line 91 v_1 = limit - cursor; // (, line 91 // [, line 92 ket = cursor; // substring, line 92 ...
9
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; FieldListNode other = (FieldListNode) obj; if (node == null) { if (other....
9
public int hashCode() { int hash = 0; if (foreground != null) hash ^= foreground.hashCode(); if (background != null) hash ^= background.hashCode(); if (font != null) hash ^= font.hashCode(); if (metrics != null) hash ^= metrics.hashCode(); if (underline) hash ^= (hash << 1); if (strikeout) ...
9
private void compute_pcm_samples12(Obuffer buffer) { final float[] vp = actual_v; //int inc = v_inc; final float[] tmpOut = _tmpOut; int dvp =0; // fat chance of having this loop unroll for( int i=0; i<32; i++) { final float[] dp = d16[i]; float pcm_sample; pcm_sample = (float)(((vp[1...
1
public static InputStream getInputStreamByFilename(String filename) { File inputFile = new File(filename); InputStream inputStream = null; try { inputStream = inputFile.toURI().toURL().openStream(); } catch (IOException e) { System.out.println("Unable to create In...
1
private Map<Integer, Double> getAllUsages(List<Bookmark> bookmarks, double timestamp, boolean categories) { Map<Integer, Double> usageMap = new LinkedHashMap<Integer, Double>(); for (Bookmark data : bookmarks) { List<Integer> keys = (categories ? data.getCategories() : data.getTags()); double targetTimestamp ...
6
public void actionPerformed(ActionEvent e) { for (int i = 0; i < t.getSize(); ++i) { t.TowerDefense_TransArray[i] .setX(t.TowerDefense_TransArray[i].getX() + 1); t.TowerDefense_TransArray[i] .setY(t.TowerDefense_TransArray[i].getY() + 1); t.TowerDefense_TransArray[i...
2
@Test public void testAddFutureMeetingIDs() { // add several future dates all on one day Calendar date = (Calendar)futureDate.clone(); date.set(Calendar.HOUR, 8); cmInst.addFutureMeeting(testContactSet, date); date.set(Calendar.HOUR, 9); cmInst.addFutureMeeting(testContactSet, date); date.set(Calendar.H...
1
private void validarDatos(String nombre, String fecha_inicio, String fecha_fin) throws BusinessException { String mensaje = ""; if(nombre == null || nombre.isEmpty()) mensaje += "Fecha de pago no puede ser nula o vacia\n"; if(fecha_inicio == null || fecha_inicio.isEmpty()) ...
7
public int getMachineIndexByName(String machineFileName){ ArrayList machines = getEnvironment().myObjects; if(machines == null) return -1; for(int k = 0; k < machines.size(); k++){ Object current = machines.get(k); if(current instanceof Automaton){ ...
6
private void printResults() { for (String result : results) { System.out.println(result); } }
1
@Override public void save() throws RemoteException { try (OutputStream os = new FileOutputStream(settingsFile)) { properties.storeToXML(os, "FTP File Manager Settings"); } catch (IOException ioe) { throw new RuntimeException(ioe); } }
1
public List<IGraph<N>> getMinimumGraphs() { return result != null && result.size() > 0 && result.get(0) instanceof IGraph<?> ? (List<IGraph<N>>) result : null; }
4
public void setNom( String nom ) { this.nom = nom; }
0
public void read_dic(String dictionaryFileName, TagSet tagSet) throws IOException{ String str = ""; BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(dictionaryFileName))); INFO[] info_list = new INFO[255]; for (int i = 0; i < 255; i++) { info_list[i] = new INFO(); } whil...
7
@Override public void setValueAt(Object value, int rowIndex, int columnIndex) { Problem problem = problems.get(rowIndex); switch (columnIndex) { case COLUMN_TITLE: problem.setProblemName(value.toString()); break; case COLUMN_FILE_NAME: problem.setFileName(value.toString()); break; case COLUMN_IN...
4
private void loadPreferences() { print("Loading user preferences"); preferences = new Properties(); // Try and load from a file preferencesFile = new File(homeDir, "preferences.xml"); if (preferencesFile.isFile()) { try { preferences.loadFromXML(new FileInputStream(preferencesFile)); } catch (Inv...
4
public boolean onBoard() { return (((col + row) % 2 == 0) && ((col + row) >= 6) && // northwest border ((col + row) <= 22) && // northeast border (col >= 1) && // west border (col <= 9) && // east border (row >= 1) && // north border (row <= 17) &&...
9
public void addValueToHashes(String currState,String prevState,double totalValue, HashMap<String,String> bestToFrom,HashMap<String,Double> bestScoreTo) { Double myVal=bestScoreTo.get(currState); if (myVal==null || myVal<totalValue) { myVal=new Double(totalValue); bestToFrom.put(currState,prevState); best...
2
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
@Override public CounterParty createNewChild(TreeMap<String, String> properties) { CounterParty counterParty = new CounterParty(); counterParty.setName(properties.get(NAME)); String aliasesString = properties.get(CounterParties.ALIAS); if(aliasesString!=null){ counterPart...
6
@Override public void hit(GameObject obj) { if (obj instanceof Bullet && !((Bullet)obj).enemy) { this.game.addScore(5); width = width / 2; height = height / 2; v = new Vector2D(Math.random() * MAX_SPEED, Math.random() * MAX_SPEED); if (width < 20 |...
6
public ArrayList<Edge> getEdges() { ArrayList<Edge> edges = new ArrayList<Edge>(); for (Integer u : adjList.keySet()) { for (Integer v : adjList.get(u)) { boolean found = false; for (Edge e : edges) { if ((e.u == u && e.v == v) || (e.v == u && e.u == v)) { found = true; ...
8
private static void btxToXML_help(BTXParser in, XMLEventFactory ev, XMLEventWriter out) throws IOException, XMLStreamException { in.next(); // START_OBJECT ParseEventData d = in.getEventData(); if (d.objName.equals("<t")) { // Special for text type! // Single unnamed attribute for the text in.next(); ...
4
private static String searchEvent(String inputCommand) { String keyword = getParameter(inputCommand); if (keyword == null) return MESSAGE_INVALID_CMD; ArrayList<String> searchResults = new ArrayList<String>(); Iterator<String> eventIter = events.iterator(); while (eventIter.hasNext()) { String currentEv...
4
boolean isPalindrome(String str) { for (int i = 0; i < (str.length() / 2) + 1; ++i) { if (str.charAt(i) != str.charAt(str.length() - i - 1)) { return false; } } return true; }
2
public static void main(String[] args) throws ClientProtocolException, IOException, InterruptedException { // 读取配置文件 Properties config = new Properties(); config.load(new FileInputStream(GreatCustomerBak.class.getResource("/").getFile() + "config.properties")); // 读取代理列表文件地址 String proxyListFile = config.getP...
9
public static int dayToNum(String name) { int num; if (name.equals("Monday")) num = 1; else if (name.equals("Tuesday")) num = 2; else if (name.equals("Wednesday")) num=3; else if (name.equals("Thursday")) num = 4; else if (name.equals("Friday")) num=5; else if (name.equals("Saturday")) ...
7
@Override public String runMacro(HTTPRequest httpReq, String parm, HTTPResponse httpResp) { final StringBuffer TBL=(StringBuffer)Resources.getResource("WEB SOCIALS TBL"); if(TBL!=null) return TBL.toString(); final List<String> socialVec=CMLib.socials().getSocialsList(); final StringBuffer msg=new StringBu...
8
static final public void Literal() throws ParseException { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NULL: jj_consume_token(NULL); break; case TRUE: jj_consume_token(TRUE); break; case FALSE: jj_consume_token(FALSE); break; case INTEGER: jj_consume_token(...
7
public static Matrix getMatrix(int rows, int cols, DataType dataType) { Matrix matrix = null; switch (dataType) { case INTEGER: matrix = new MatrixInteger(rows, cols); break; case DOUBLE: matrix = new MatrixDouble(rows, cols); ...
3
public void setFocused(boolean focus) { focused = focus; }
0
public Component getTableCellRendererComponent(JTable table, Object cell, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, cell, isSelected, hasFocus, row, column); setToolTipText(ToolTipHelper.makeToolTip((Card)table.getValu...
6
public VirtualReplayGainNode(Property property, PropertyTree parent) { super(property, parent); }
0
public Suggestion createSuggestion(Set<Card> seenCards, Map <String, Card> cards, Map<Character, String> rooms){ Card rCard =new Card("Name", Card.CardType.ROOM); Random rand = new Random(); int randNum = rand.nextInt(cards.size()); ArrayList <Card> unseenC = new ArrayList <Card>(); for(String c : cards.keyS...
8
public Instances getDataSet() throws IOException { if (getDirectory() == null) throw new IOException("No directory/source has been specified"); String directoryPath = getDirectory().getAbsolutePath(); FastVector classes = new FastVector(); Enumeration enm = getStructure().classAttribute().enu...
9
public Collection<PearsonDictionaryEntry> filter() { List<PearsonDictionaryEntry> retVal = new ArrayList<PearsonDictionaryEntry>(); for (PearsonDictionaryEntry entry : entries) { if (entry.getHeadword() != null && headword != null) { if (entry.getHeadword().equals(headword)) { if (posTagConstrains.conta...
5
public void openDoors(Vector3f position, boolean playSound) { boolean worked = false; for(Door door : doors) { if(Math.abs(door.getTransform().getPosition().sub(position).length()) < 1.5f) { worked = true; door.open(0.5f, 3f); } } if(playSound) { for(int i = 0; i < exitPoints.size...
7
private void loadScene() { File stdSceneDir = new File("scenes"); if (!stdSceneDir.exists()) { stdSceneDir.mkdir(); } UIManager.put("FileChooser.cancelButtonText", LOCALIZER.getString(L_CANCEL)); UIManager.put("FileChooser.cancelButtonToo...
7
public void parseParameters() throws IOException { int len = request.getContentLength(); if (len <= 0) { return; } if (len > this.maxPostSize) { log.warn("Parameters were not parsed because the size of the posted data was too big. " + "Use the maxPostSize attribute of the connector to resolve this ...
8
public static void saveAccounts() { try { StringBuilder rawAccs = new StringBuilder(); File accountsFile = new File(Configuration.ACCOUNTS_DIR + File.separator + "Accounts.txt"); if (!accountsFile.exists()) { accountsFile.createNewFile(); } ...
3
static final void method159(int i) { if ((Class260.anInt3312 ^ 0xffffffff) < -1) { int i_1_ = 0; for (int i_2_ = 0; Class286_Sub1.consoleMessages.length > i_2_; i_2_++) { if (Class286_Sub1.consoleMessages[i_2_].indexOf("--> ") != -1 && ++i_1_ == Class260.anInt3312) { Class363.aString4461 ...
5
@Override public List<Customer> searchCustomer(String term) { term = ".*" + term + ".*"; List<Customer> match = new ArrayList<Customer>(); for (Customer customer : getCustomers()) { if (customer.getAddress().matches(term) || new String(customer.getCustomerID() + "").matches(term) || customer.getName...
5
public void run () { Socket s = null; try { String res; s = new Socket(Mailhost, 25); PrintStream p = new PrintStream(s.getOutputStream(),true); in = new DataInputStream(s.getInputStream()); expect("220", "greetings"); p.println("HELO " + "helohost"); expect("250...
7
public void computerwins() { if(tie==true)//occupied[0][0]==occupied[0][1]&&occupied[0][1]==occupied[0][2]&&occupied[0][2]==occupied[1][0]&&occupied[1][0]==occupied[1][1]&&occupied[1][1]==occupied[1][2]&&occupied[1][2]==occupied[2][0]&&occupied[2][0]==occupied[2][1]&&occupied[2][1]==occupied[2][2]&&tie==true) ...
1
@Override public Scorer scorer(LeafReaderContext context) throws IOException { assert termArrays.length != 0; final LeafReader reader = context.reader(); PhraseQuery.PostingsAndFreq[] postingsFreqs = new PhraseQuery.PostingsAndFreq[termArrays.length]; final Terms fieldTerms = reader.terms(...
9
public Tetrad(BoundedGrid<Block> grid) { blocks = new Block[4]; for (int i = 0; i < 4; i++) { blocks[i] = new Block(); } Color color = Color.WHITE; Location[] locs = new Location[4]; int shape = 0; shape = ((int) (Math.random() * 7)); switch (shape) { case 0: // I shape color = Co...
9
public String toStringExtended() { String info = (this.type + "-section named '" + this.name + "', id (" + this.reference + ") on level: " + level + "; complete path: " + this.getPath() + "\n\t- "); if (this.subsections != null && this.sectionCount() != 0 && this.getSections() != nu...
8
private JLabel menuItem(String title, final String desc, final int index) { final JLabel btn = new JLabel(title); btn.setHorizontalAlignment(JLabel.CENTER); btn.setForeground(Color.WHITE); btn.setBackground(new Color(0, 0, 0, 0)); btn.setFont(new Font("Serif", 0, 40)); btn.setPreferredSize(new Dimension(...
4
private PickResult pickGeomAny (PickShape pickShape) { Node obj = null; int i; SceneGraphPath[] sgpa = null; if (pickRootBG != null) { sgpa = pickRootBG.pickAll(pickShape); } else if (pickRootL != null) { sgpa = pickRootL.pickAll(pickShape); } if (sgpa == null) return null; // no match for(i=0; i<s...
8
private void agrupar() { Agrupamento agrupamento; switch(agrupamentoAtual){ case TODOS: agrupamento = criarAgrupamentoTodos(); break; case ANO: agrupamento = criarAgrupamentoPorAno(); break; case ATIVO: ...
5
private static byte[][] generateSubkeys(byte[] key) { byte[][] tmp = new byte[Nb * (Nr + 1)][4]; int i = 0; while (i < Nk) { tmp[i][0] = key[i * 4]; tmp[i][1] = key[i * 4 + 1]; tmp[i][2] = key[i * 4 + 2]; tmp[i][3] = key[i * 4 + 3]; i++; } i = Nk; while (i < Nb * (Nr + 1)) { byte[] temp ...
6
public static boolean probarConexion(String url,String user , String pass){ java.sql.Connection con = null; try { Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); con = java.sql.DriverManager.getConnection(url, user, pass); if (con != null) { ...
2
private SelectionTransition findFirstNonEmptyTransition() { for (SelectionTransition transition : transitions) { if(!transition.isEmpty()) return transition; } return null; }
2
public static int indexOf(int[] arr, int val){ for (int i = 0 ; i < arr.length; i++){ if (arr[i] == val) return i; } return -1; }
2
static final void method432(int i, int i_0_, int i_1_, int i_2_) { anInt619++; i = i * Class213.aNode_Sub27_2512.aClass320_Sub25_7274.method3776(false) >> 8; if ((i_1_ ^ 0xffffffff) != 0 || Class377_Sub1.aBoolean8775) { if ((i_1_ ^ 0xffffffff) != 0 && ((Class313.anInt4013 ^ 0xffffffff) != (i_1_ ^ 0xffffffff) |...
9
public static Consumable loadConsumable(int ID) { BufferedReader reader; try { reader = new BufferedReader(new FileReader(System.getProperty("resources") + "/database/consumables")); String line; while((line = reader.readLine()) != null) { final String[] temp = line.split(";"); ...
5
private void checkUndeclaredVariable(ParseTree node) { if (node.attribute.equals("IDENTIFIER") && !containsVariable(node.value) && !undeclaredVariables.contains(node.value)) { System.out.println("Undeclared Variable: " + node.value); undeclaredVariables.add(node.value); } for (int i = 0; i < node.childr...
4
private boolean setHoustonMap(String mapName){ Image mapImage = null; ImageIcon imageIcon; boolean hasFile = false; //for displaying message on the panel. startPanel.appendText(">> Connecting... \n" + ">> Destination: " + urlStr + " \n"); if (url_status){//If URL Internet connection is availa...
6
@Override public void sequence(String id, String sequence, String quality) { // Testing the strings (if some are null the method will stop here) if ((sequence == null) || (quality == null) || sequence.isEmpty() || quality.isEmpty()) { return; } super.addValue(sequence.length()); }
4
@Override public int getAddress(Identifier var, int size) throws Exception { addressRecord a = usedMem.get(var); if(a != null) { if(a.size != size) { throw new Exception("varaible accessed as different size than expected"); } return a.addre...
2
SignatureInputStream(Hessian2Input in) throws IOException { try { _in = in; byte []fingerprint = null; String keyAlgorithm = null; String algorithm = null; byte []encKey = null; int len = in.readInt(); for (int i = 0; i < len; i++) { S...
8
@Override public String getName() { return name; }
0
public int size(int niveau){ int size = 0; switch(niveau){ case 1: size = beginner.size(); break; case 2: size = intermediate.size(); break; case 3: size = advanced.size(); break; case 4: size = expert.size(); break; case 5: size = grandmaster.size(); break; ...
5
public void execForAbonent(Abonent abonent) { Queue<Msg> messageQueue = messages.get(abonent.getAddress()); if (messageQueue == null) { return; } while (!messageQueue.isEmpty()) { Msg message = messageQueue.poll(); message.exec(abonent); } ...
2
protected static void initFilters(boolean loader, Vector<String> classnames) { int i; int n; String classname; Class cls; String[] ext; String desc; FileSourcedConverter converter; ExtensionFileFilter filter; if (loader) m_LoaderFileFilters = new Vector...
7
public void merge(Iterable<? extends Player> updateDatabase) { for (Player rhs : updateDatabase) { boolean matched = false; boolean conflict = false; for(String key : rhs.getIds().all()) { String id = rhs.getIds().get(key); Map<String,Player>...
8
public static boolean getStationsData(String pathName) { DocumentBuilderFactory docBuilderFactory; DocumentBuilder docBuilder; Document document = null; try { docBuilderFactory = DocumentBuilderFactory.newInstance(); docBuilder = docBuilderFactory.newDocumentBuilder(); document = docBuilder.parse(new...
7
public static void unjar(Path file, Path to) throws IOException { if (Files.notExists(to)) { Files.createDirectories(to); } try (JarFile jarFile = new JarFile(file.toFile())) { Enumeration<JarEntry> entries = jarFile.entries(); while (entries.hasMoreElements()) { JarEntry entry = ...
8
public Reservation modifyReservation(int reservationId, double startTime, int duration, int numPE) { Reservation currReservation = getReservation(reservationId); if(currReservation == null) { logger.info("Error modifying reservation, ID is invalid"); return null; } ...
4
private static void twoPlayers(int numOfCards) { frame.setLayout(new BorderLayout()); // If a game has already been started // cardHolderPanel has to be cleared before // it can be used properly again. cardHolderPanel.removeAll(); // Adds the cardHolderPanel to the frame. frame.add(cardHolderPanel, Bor...
6
@Test public void testHasMatchedWord() { assertTrue(_dictionary.hasMatchedWord("356937")); }
0
protected boolean isSubTypeOf(final Value value, final Value expected) { Type expectedType = ((BasicValue) expected).getType(); Type type = ((BasicValue) value).getType(); switch (expectedType.getSort()) { case Type.INT: case Type.FLOAT: case Type.LONG: ...
9
@Override public boolean tick(Tickable ticking, int tickID) { if(!super.tick(ticking,tickID)) return false; if((tickID==Tickable.TICKID_MOB) &&(affected instanceof MOB) &&(affected != invoker)) { final MOB M=(MOB)affected; final MOB mob=invoker(); final Room R=CMLib.map().roomLocation(M); ...
9
@Override public void run() { Loader loader = new Loader(); try { loader.setUrl(url); loader.load(); } catch (Exception e) { e.printStackTrace(); } }
1