text
stringlengths
14
410k
label
int32
0
9
public void writeLine(String text) { write(text + "\n"); }
0
private void parseReference(Element parentNode, String sectionName, int level) throws TemplateException { try { // look for section XPath xPath = XPathFactory.newInstance().newXPath(); NodeList nodeList = (NodeList) xPath.evaluate("/grammar/define[@name='" + sectionName + "']...
3
public void resetIfVersionMisMatch(String module, int version) { if (getVersion(module) != version) { startBatch(); removePreferences(module); setVersion(module, version); endBatch(); } }
1
public boolean isValidTilePlacement(int row, int column, int rotation) { int row2 = board.getAdjacentRow(rotation, row); int column2 = board.getAdjacentColumn(rotation, column); if (!board.isValidHex(row, column) || board.getHex(row, column).getColor() != Board.VACANT || !board.isValidHex(row2, column2) ...
9
@Action public void run() { int n = Integer.parseInt(jFormattedTextField1.getText()); if (n > 15 || n < 0) { jTable1.setModel(new javax.swing.table.DefaultTableModel()); if (errorReport == null) { JFrame mainFrame = DemoApp.getApplication().getMainFrame(); ...
5
private static boolean _isTrimable(char c, char[] exceptions) { if ((exceptions != null) && (exceptions.length > 0)) { for (int i = 0; i < exceptions.length; i++) { if (c == exceptions[i]) { return false; } } } return Character.isWhitespace(c); }
4
public static void main(String[] argsv) { // Setting op a bank. Bank christmasBank = new Bank(); christmasBank.addAccount(new BankAccount(BigInteger.valueOf(100))); christmasBank.addAccount(new BankAccount(BigInteger.valueOf(50), BigInteger.valueOf(-1000))); BankAccount theAccou...
4
protected SgfInstance constructGame() { SgfInstance game = new SgfInstance(); Move lastMove = game.getRoot(); Stack<Move> parents = new Stack<Move>(); while (index < contents.length()) { char c = getChar(); if (c == '(') { if (parents.size() == 0) { if (nextChar() == ';') ...
6
public ConnexionReclassifierRaster(){ arrayy.clear(); geomms.clear(); Connection con = null; try{ Class.forName("org.postgresql.Driver"); con = DriverManager.getConnection("jdbc:postgresql://"+ConnexionBaseDonnees.getHote()+":"+ConnexionBaseDonnees.getPort()+"/"+ConnexionBaseDonnees.getNomBase(),Connexi...
7
public String toString() { int a = bits; String s = ""; for(int i = 0 ; i < 32 ; i ++){ if((a & 0x1) == 0x1){ s = "1" + s; } else{ s = "0" + s; } a = a >> 1; } return s; }
2
@Override protected void paintComponent(Graphics graphics) { super.paintComponent(graphics); //luodaan taustalle mustat neliöt niin että palikan sivut erottuvat graphics.setColor(Color.BLACK); int ykoordinaattiNeliot=0; graphics.fillRect(65, 1, 64, 257); graphics.fill...
8
private void getIconArt() { try { boxSelectIcon = ImageIO.read(getClass().getResource("icons/I_BoxSelectTool.png")); brushIcon = ImageIO.read(getClass().getResource("icons/I_BrushTool.png")); eraserIcon = ImageIO.read(getClass().getResource("icons/I_EraserTool.png")); lineIcon = ImageIO.read(getClass().ge...
1
public void setAge(int age) { this.age = age; }
0
public void setElectionColumns2() { if( chckbxSubstituteColumns.isSelected()) { chckbxSubstituteColumns.doClick(); } for( VTD b : featureCollection.vtds) { b.resetOutcomes(); b.has_election_results = true; } for( VTD f : featureCollection.features) { f.resetOutcomes(); double[] dd = new d...
9
public ResultSet runQuery(String sql) { try { rs = stat.executeQuery(sql); } catch (SQLException ex) { Logger.getLogger(SQLHelper.class.getName()).log(Level.SEVERE, null, ex); } return rs; }
1
@Override public boolean unsubscribeObserver(Observer observer) { boolean removed = false; if (readers.contains(observer)) { removed = readers.remove(observer); } return removed; }
1
public void actionPerformed(java.awt.event.ActionEvent e) { String command = e.getActionCommand(); if (myButtonListener != null) { if (command.equals("0")) myButtonListener.processButton(0); else if (command.equals("1")) myButtonListener.processButton(1); else if (command.equals("2")) myButton...
5
protected void updateArc() { // arc was fully matched - save it addToPath( arc ); boolean extended = false; if ( arc.to != forbidden ) { ListIterator<Arc> iter = arc.to.outgoingArcs(); while ( iter.hasNext() ) { Arc a = iter.next(); if ( a.versions.intersects(versions) &&a.to.isPrintedO...
8
public int[] sortArrayWithHashMaps(int[] arr) { class ArrEl { int value; int freq; int first; @Override public boolean equals(Object o) { return this == o || o instanceof ArrEl && value =...
5
@SuppressWarnings("unchecked") public List<Film> getDostepneFilmy() { return em.createNamedQuery("film.dostepny").getResultList(); }
0
@Override public void actionPerformed(ActionEvent act) { // if the user presses exit game in the in-game menu if (act.getActionCommand().equals("menuExitGameBtn")) { exitGame(); } // if the user presses help in the in-game menu if (act.getActionCommand().equals("menuHelpBtn")) { JOptionPane.showMessa...
5
private void getConnection(Element connectElement) { String room1Name=""; String room2Name=""; String exit1=""; String exit2=""; Element el; NodeList nl = connectElement.getElementsByTagName("room1"); if(nl != null && nl.getLength() > 0) { el = (Element)nl.item(0); room1Name=el.getAttribute(...
8
@Override public void run() { for(int i = 0 ; i < 20 ; i ++) { try { Thread.sleep((long)Math.random() * 1000); } catch (InterruptedException e) { e.printStackTrace(); } SampleCalc.increase(); } }
2
public Element toElement(Ticket ticket) { Element element = new Element("ticket"); try { element.setAttribute("row", Integer.toString(ticket.getPlace().getRow().getNumber())); element.setAttribute("place", Integer.toString(ticket.getPlace().getNumber())); element.setAttribute("price", Double.t...
1
public void setTyyppi(EsteenTyyppi tyyppi) { this.tyyppi = tyyppi; }
0
@Override protected Class<?> loadClass(String name, boolean resolve) { try { if ("watermelon.sim.Player".equals(name) || "watermelon.sim.seed".equals(name) || "watermelon.sim.Point".equals(name)||"watermelon.sim.Pair".equals(name)) return parent.loadClass(name); else return super.loadClass(na...
6
private void checkCollision() { for (int i = 0; i < collisionRange.size(); i++) { if (getRectangle().intersects(collisionRange.get(i))) { // Kollision Unten if (collisionRange.get(i).getY() > this.getY() && collisionRange.get(i).getY() <= this.getY() + this.getHeight()) { this.jump = fal...
8
public final void setLedSize(final double LED_SIZE) { double size = LED_SIZE < 10 ? 10 : (LED_SIZE > 50 ? 50 : LED_SIZE); if (null == ledSize) { _ledSize = size; } else { ledSize.set(size); } }
3
private String possibleTurns(int x, int y) { String turns = ""; if (x > 0) { if (!maze.getTileAt(x - 1, y).equals(ETile.WALL)) { turns += EDirection.LEFT.getSymbol(); } } if (x < maze.getWidth() - 1) { if (!maze.getTileAt(x + 1, y).equ...
8
private int computeExpectation(int[] pref, int[] dist, int nfruits, int bowlsz) { double exp = 0; for (int i = 0; i != 12; ++i) { double p = 1.0 * dist[i] / nfruits; exp += (p * pref[i] * bowlsz); } return (int)exp; }
1
public void onBlockRemoval(World var1, int var2, int var3, int var4) { super.onBlockRemoval(var1, var2, var3, var4); if(!var1.multiplayerWorld) { var1.notifyBlocksOfNeighborChange(var2, var3 + 1, var4, this.blockID); var1.notifyBlocksOfNeighborChange(var2, var3 - 1, var4, this.blockID); ...
5
public static boolean validateWeapon(String weapon){ if(weapon.equals("laser") || weapon.equals("mortar") || weapon.equals("droid")){ return true; } return false; }
3
public void MainClick(int button, int x, int y){ if((x>(width/8*5) && y>height/4*3)) { if(button==0){ System.exit(0); } } // //starting the game //This first section is for AI singleplayer. if((x<(width/4) && y>height/2)) { if(but...
9
private boolean jj_2_18(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; try { return !jj_3_18(); } catch(LookaheadSuccess ls) { return true; } finally { jj_save(17, xla); } }
1
public ArrayList<ArrayList<Integer>> levelOrderBottom(TreeNode root) { ArrayList<ArrayList<Integer>> result = new ArrayList<ArrayList<Integer>>(); if (root == null){ return result; } ArrayList<ArrayList<Integer>> rLeft = levelOrderBottom(root.left); ArrayList<ArrayLis...
5
private void sendSensorData() { SmartDashboard.putBoolean("Tomahawk forward?", tomahawk.isForward()); SmartDashboard.putBoolean("Tilter at top?", tilter.isTopLimitTriggered()); SmartDashboard.putNumber("String-pot", tilter.readStringPot()); }
0
@Override public Map<String, Object> getAuctionById(String auctionId) { Map<String, Object> auctionMap = new HashMap<String, Object>(); Auction auction = emgr.find(Auction.class, Integer.parseInt(auctionId)); if (auction != null) { String auctionName = auction.getAuctionName(); String auctionDescription = ...
2
@Override public boolean equals(Object obj) { if(obj instanceof ScreenCharacter == false) return false; ScreenCharacter other = ((ScreenCharacter)(obj)); return character == other.getCharacter() && getForegroundColor() == other.getForegroundColor() && ...
7
public boolean hasSameData(ZFrame other) { if (other == null) return false; if (size() == other.size()) { return Arrays.equals(data, other.data); } return false; }
2
public static void main(String[] args) { String FileName = args[0]; In in = new In(FileName); int size = in.readInt(); Point Points[] = new Point[size]; for (int i = 0; i < size; i++) { Points[i] = new Point(in.readInt(), in.readInt()); } // read in the input file for (int i = 0; i < size - 3;...
7
@Override public boolean undo(CardGame game, CardPanel panel) { Hand hand = game.getHand(); List<List<Card>> board = game.getBoard(); List<Card> fromHandList = hand.getList(); //Must be the last one as was just done Card fromHand = fromHandList.remove(fromHandList.size() - 1)...
3
@Test public void FAMasiva() { try { log.debug("Sleeping for "+sleepTime+" secs due to ESPHORA reconnection problem"); int sleepMillis = sleepTime * 1000; Thread.sleep(sleepMillis); log.debug("Generando Lote Facturas A iva discriminado"); List<FA> facturasA = new ArrayList<FA>(); FA fa = ne...
8
public boolean copy() { LOGGER.info("LogWriter: copying : src=" + this.srcFile.getName() + " -> dest=" + this.destFile.getName()); LOGGER.info("LogWriter: copying : src=" + this.srcFile.getAbsolutePath() + " -> dest=" + this.destFile.getAbsolutePath()); // Reader Buffe...
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 static pgrid.service.corba.repair.RepairIssue[] read (org.omg.CORBA.portable.InputStream istream) { pgrid.service.corba.repair.RepairIssue value[] = null; int _len0 = istream.read_long (); value = new pgrid.service.corba.repair.RepairIssue[_len0]; for (int _o1 = 0;_o1 < value.length; ++_o1) ...
1
private void selectionSimulationStep(double[] previous, double[] next, SelectionStrengthModel[] ssm, double time) { boolean fixFlag =true; boolean zeroFlag =true; // lots of class v set from the calling function. for (int d =0; d < ndeme; d++) { if (sizes[d] == PopulationSizeModel.NULL_POPULATION) cont...
8
public Server(ServerDataHandler dataHandler){ this.dataHandler = dataHandler; try{ serverSocket = new ServerSocket(PORT); }catch(IOException ioe){ System.out.println("Could not create server socket on " + HOST + ":" + PORT); System.exit(0); } ...
5
private static char[] multiply(char[] number1, char[] number2, boolean minus) { char[] result = new char[] {'0'}; char[] reversedNumber1 = reverse(number1); char[] reversedNumber2 = reverse(number2); for(int i=0;i<reversedNumber2.length;i++) { int num2 = reversedNumber2[i] - '0'; int carry = 0; char...
7
public static void main(String[] args) { try { for (String[] command : convertMultipleConsoleCommands(args)) { try { Process process = new ProcessBuilder(command).start(); BufferedReader in = new BufferedReader(new InputStreamReader( ...
5
public static String formatMethodName(String s){ if (s.toLowerCase().equals("resume")) return "unpause"; if (s.toLowerCase().equals("quit to menu")) return "quitToMenu"; String r[] = s.split(" "); for(String w : r) w = w.substring(0, 1).toUpperCase() + w.substring(1).toLowerCase(); r[0] = r[0]....
4
public long getDateField(String name) { String val = valueParameters(get(name),null); if (val==null) return -1; if (_dateReceive==null) { _dateReceive=(SimpleDateFormat[])__dateReceiveCache.get(); if (_dateReceive==null) { ...
9
@Override public void actionPerformed(ActionEvent action) { super.actionPerformed(action); // TODO Auto-generated method stub switch(action.getActionCommand()) { case "clear": //ClearCell(activeX, activeY); break; case "random": RandomAssign(5); repaint(); break; } }
2
public static boolean correct(String dni)throws NullPointerException, NumberFormatException, StringIndexOutOfBoundsException,IllegalArgumentException{ boolean valor=false; if(dni.length()==0){ throw new NullPointerException(); } else if(dni.length()!=9){ valor=false; throw new StringIndexOutOfBound...
7
public static int[][] unMap(int[] solution) throws FileNotFoundException { if (solution == null) { System.out.println("There is no solution for this puzzle."); return sudokuPuzzle; } // 345 = row 3, column 4, box contains a 5 //variables used for determining row...
8
public void run() { while (iSAlive) { if (!missileQueue.isEmpty()) { notifyMissile(); } else { synchronized (this) { try { wait(); } catch (InterruptedException e) { e.printStackTrace(); } } } } }
3
private void paivitaMaxY(){ double maxY = Double.NEGATIVE_INFINITY; for (KentallaOlija osa : osat){ if (osa.getMaxY() > maxY){ maxY = osa.getMaxY(); } } if (getSuojakilpi()){ if (getY()+getSuojakilvenHalkaisija()/2 > m...
4
public void map(LongWritable key, Text value, OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException { // Taking one line at a time and tokenizing the same String line = value.toString(); StringTokenizer tokenizer = new StringTokenizer(line); // Iterating through all the words availa...
1
public String getString(int index) throws JSONException { Object object = get(index); return object == JSONObject.NULL ? null : object.toString(); }
1
private String nString(String s,int i){ String result=""; for(;i>0;i--){ result += s; //for appending strings } return result; }
1
public static Float valueOf(Object o) { if (o == null) { return null; } else if (o instanceof Float) { return (Float)o; } else if (o instanceof Double) { return (Float)o; } else if (o instanceof Byte) { return (float)(Byte)o; } else...
6
private void makefile(){ if(pType.getText().length() > 0 && prio.getText().length() == 1 && tot.getText().length() > 0 && prescrArea.getText().length() > 0){ if(notes.getText().equals("") || notes.getText().equals("Inserisci le tue note.")) MainPanel.prescr.setNotes("-"); ...
6
void sendByteArray(int pNumBytes, byte[] pBytes) { int checksum = 0; sendHeader(); //send the packet header for(int i=0; i<pNumBytes; i++){ outBuffer[i] = pBytes[i]; checksum += pBytes[i]; } //calculate checksum and put at end of buffer outBuffer[pNumBytes] = (byte)(0x100 - (...
3
public void testForInterference() { //check for packets that are interferred //PS: only check the packets for interference that are still alive // dead packets are still "int the air" as the sender does not know that it is disturbed. activePacketsIterator.reset(); while(activePacketsIterator.hasNext()){ ...
4
public RandomListNode copyRandomList(RandomListNode head) { if(head == null) return null; HashMap<RandomListNode, RandomListNode> map = new HashMap<RandomListNode, RandomListNode>(); RandomListNode newHead = new RandomListNode(head.label); map.put(head, newHead); RandomLis...
4
final void method2633(int i, int i_50_, r var_r, int i_51_) { anInt4120++; r_Sub1 var_r_Sub1 = (r_Sub1) var_r; i_51_ += ((r_Sub1) var_r_Sub1).anInt10474 + 1; i_50_ += 1 + ((r_Sub1) var_r_Sub1).anInt10468; if (i != 287) method2634(-49, -3, 16, -9, -115); int i_52_ = i_50_ + ((Class330) this).anInt4113 * i_51_...
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 T get(){ return this.t; }
0
public char nextClean() throws JSONException { for (;;) { char c = next(); if (c == 0 || c > ' ') { return c; } } }
3
public void write_buffer(int val) { int k = 0; int rc = 0; rc = outWave.WriteData(buffer, bufferp[0]); // REVIEW: handle RiffFile errors. /* for (int j=0;j<bufferp[0];j=j+2) { //myBuffer[0] = (short)(((buffer[j]>>8)&0x000000FF) | ((buffer[j]<<8)&0x0000FF00)); //my...
1
void input() { Properties prop = new Properties(); FileInputStream in = null; File f = null; File propertiesDir = Initializer.sharedInstance().getPropertyDirectory(); if (propertiesDir != null && propertiesDir.exists()) { f = new File(propertiesDir, "locationhistory.properties"); if (f.exists()) { ...
9
public static void main(String[] args) { List<Integer> numbers = new ArrayList<Integer>(); Collections.addAll(numbers, new Integer[] {1, 2, 3, 4, 5, 6, 7, 8, 9}); long startTimeMillis = System.currentTimeMillis(); List<Integer> products = new ArrayList<Integer>(); // Code is zero based, so position - 1 f...
7
public void setCampus(Campus campus) { if (this.campus != null && this.campus.getDocenten().contains(this)) { this.campus.removeDocent(this); } this.campus = campus; if (campus != null && !campus.getDocenten().contains(this)) { campus.addDocent(this); } }
4
@Test public void test() { //Set up connection //MongoHelper.setDB("iCrossFit"); MongoHelper.setDB("iCrossFit"); //Clear out DB MongoHelper.getCollection("gyms").drop(); MongoHelper.getCollection("users").drop(); MongoHelper.getCollection("trainingClasses").d...
9
public Estoque Abrir(int id) throws ErroValidacaoException,Exception{ try{ PreparedStatement comando = conexao .getConexao().prepareStatement("SELECT * FROM estoques"); ResultSet consulta = comando.executeQuery(); comando.getConnection().commit(); ...
2
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { Player player = null; if (sender instanceof Player) { player = (Player) sender; } if (args.length == 0) { long firstseen = player.getFirstPlayed(); @SuppressWarnings("static-a...
5
public ReportHighScoresPanel(FreeColClient freeColClient, GUI gui, String prefix) { super(freeColClient, gui, Messages.message("reportHighScoresAction.name")); // Display Panel reportPanel.removeAll(); List<HighScore> highScores = getController().getHigh...
6
@Override public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) { HttpRequest request = (HttpRequest) e.getMessage(); HttpResponseStatus status = OK; String stringResult; String phpResult; File filePath = new File(getURIRequest(request)); if(fileP...
6
public static GameObject getGameObjectFromFile(String filePath) { Document doc = getDoc(filePath); final String type = doc.getDocumentElement().getNodeName(); switch (type) { case "item": return getItem(doc); case "mob": return getMob(doc); case "player": return getPlayer(doc); default: System...
3
private boolean verifyChapPassword(String plaintext) throws RadiusException { if (plaintext == null || plaintext.length() == 0) throw new IllegalArgumentException("plaintext must not be empty"); if (chapChallenge == null || chapChallenge.length != 16) throw new RadiusException("CHAP challenge must be 16 bytes...
8
public static int longestRepeatingSubstr(String str) { int currLen = 1; int maxLen = 1; int prevIndex = 0; int[] visited = new int[256]; for (int i = 0; i < visited.length; i++) { visited[i] = -1; } visited[str.charAt(0)] ...
6
@Override public String execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { List<BankDeposit> deposits = ReaderFactory.getInstance().getStAXReader() .readXML(DataPath.XML_FILE); request.setAttribute("type...
1
public void turnLeft() { assertMe(); if(x == 0 && y == 1) { x = 1; y = 0;} else if(x == 1 && y == 0) { x = 0; y = -1;} else if(x == 0 && y == -1) { x = -1; y = 0;} else if(x == -1 && y == 0) { x = 0; y = 1;} assertMe(); }
8
public List<CategoryEnum> getCategorys() { if (categorys.isEmpty()) { categorys.addAll(Arrays.asList(CategoryEnum.values())); } return categorys; }
1
public void setWidth(int w){ if(w == 0) w = 1; //System.out.println("Setting Width: " + w); for(int i = 0; i < anim.getFrames().size(); i ++){ Image image = ((AnimFrame)anim.getFrames().get(i)).image; image = image.getScaledInstance(w, image.getHeight(null), 0); ((AnimFrame)anim.getFram...
2
public Date ceil(Date date, int field) { Calendar cal = Calendar.getInstance(); cal.setTime(date); for (int currentField : fields) { if (currentField > field) { if (currentField == Calendar.DAY_OF_MONTH && (field == Calendar.WEEK_OF_MONTH || field == Calendar.WEEK_OF_YEAR)) { continue; } ...
8
@Override public MapConnector<String, Integer> forceSynchronization() throws Exception { try (Connection con = getConnectorInfo().getConnection()) { forceClear(); int n = 0; StringBuilder values = new StringBuilder(); String stm; for (String s : ge...
5
public static boolean isAvaible(URLConnection connection) { if(connection instanceof JarURLConnection) return true; if(connection instanceof HttpURLConnection) try { return ((HttpURLConnection) connection).getResponseCode() == HttpURLConnection.HTTP_OK; } catch (IOException e) { e.printStackT...
4
private boolean verticalMove(int fromY, int toY, int x) { Board board = getBoard(); // define the direction by coordinates boolean isUpDirection = toY >= fromY; // bottom to top if (isUpDirection) { for (int i = fromY; i <= toY; i++) { if (exitFlag || Thread.currentThread().isInterrupted()) return f...
9
private void removeExternalEntry(TrieEntry<K, V> h) { if (h == root) { throw new IllegalArgumentException("Cannot delete root Entry!"); } else if (!h.isExternalNode()) { throw new IllegalArgumentException(h + " is not an external Entry!"); } TrieEntry<K,...
5
private String DecisionChart(Packet p) { // check in case it is a login packet being returned if (!Global.gLoggedIn) { return HandlePacketsWhenLoggedOut(p); } else { char destination = 'r'; char source = 'r'; if (p.GetDestination() == Global.gU...
7
private boolean upToDate (File verFile) { String storedVersion = getStoredVersion(verFile).replace(".", ""); int storedVersion_ = -1; if (!storedVersion.isEmpty()) { try { storedVersion_ = Integer.parseInt(storedVersion); } catch (NumberFormatException e) ...
6
@Override public void actionPerformed(ActionEvent e) { if(e.getActionCommand().equals("New")){ }else if(e.getActionCommand().equals("Add File")){ }else if(e.getActionCommand().equals("Add Folder")){ }else if(e.getActionCommand().equals("Open")){ }else if(e.getActionCo...
5
private void handlePhysicalInteract( PlayerInteractEvent event ) { if ( event.isCancelled() ) return; Location l = event.getClickedBlock().getLocation(); l.setY( l.getY() - 2 ); if ( l.getBlock().getState() instanceof Sign ) { Sign s = (Sign) l.getBlock().getState(); String[] msg = s.ge...
8
public static void unpack(Stream buffer) { Sound.aByteArray327 = new byte[0x6baa8]; Sound.buffer = new Stream(Sound.aByteArray327); Soundtrack.method166(); do { int j = buffer.getUnsignedShort(); if (j == 65535) { return; } Sound.sound[j] = new Sound(); Sound.sound[j].method242(buffer); So...
2
@Override public Question findOutlier() { //sort the list boolean done = false; int i = 1; while(i < eval.getDatapoints().size() && !done) { done = true;//gets changed IF a swap occurs for(int j = 0; j< eval.getDatapoints().size() - (i); ...
8
public HSQLDBRecordingManager(){ super(); _recordings = new ArrayList<Recording>(); try { Class.forName("org.hsqldb.jdbcDriver"); } catch (ClassNotFoundException ex){ return; } try { conn = DriverManager.getConnection("jdbc:hsqldb:file:" + _DB, "SA", ""); // conn.setAuto...
3
public boolean isColliding(GameObject object2) { if (!this.active || !object2.isActive()) { return false; } int x, y; for (int i = 0; i < object2.drawShape.npoints; i++) { x = object2.drawShape.xpoints[i]; y = object2.drawShape.ypoints[i]; ...
6
@Override public void documentRemoved(DocumentRepositoryEvent e) {}
0
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); ejbUsuario=new EjbUsuario(); ejbUsuario.getUsuario().setContrasenia(request.getParameter("passwo...
2
public ClassHolderType getClassHolderType() { if (rawClass == null) { // rawClass == null in the generic case such as T variable; return SINGLE; } else if (Collection.class.isAssignableFrom(rawClass)) { if (typeParams.size() > 0) { ClassHolderType innerType = typeParams.get(0).getClassHolderType(); ...
9