text
stringlengths
14
410k
label
int32
0
9
public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) { }
0
private static HashMap<String, Integer> getCollectionFrequency(String dirName, Normalizer normalizer) throws IOException { // Création de la table des mots HashMap<String, Integer> hits = new HashMap<String, Integer>(); File dir = new File(dirName); String wordLC; if (dir.isDirectory()) { // Liste des fich...
5
private void parseUrl(String urlStr) throws WebSocketException { try { URI uri = new URI(urlStr); if (!(uri.getScheme().equals("ws") || uri.getScheme().equals("wss"))) { throw new WebSocketException(E3007, uri.toString()); } if (uri.getScheme().equ...
9
Markers findClosestMarker(Marker queryMarker) { int initialExtension = 1000; Chromosome chr = queryMarker.getChromosome(); if ((chr != null) && (chr.size() > 0)) { // Extend interval to capture 'close' markers for (int extend = initialExtension; extend < chr.size(); extend *= 2) { int start = Math.max...
4
@Test public void deltaMatrices_test() { try{ double [][]mat1= {{1.0,2.0}, {3.0,1.0}}; double [][]mat2= {{2.0,1.0}, {1.0,3.0}}; double result = FastICA.deltaMatrices(mat1,mat2); double exp=1.5; Assert.assertEquals(result,exp,0.0); } catch (Exception e) { // TODO Auto-generated catch block fa...
1
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof Action)) return false; Action other = (Action) obj; if (tiles == null) { if (other.tiles != null) return false; } else if (!tiles.equals(other.tiles)) return fa...
9
private boolean isGameEnded() { boolean packEnded = (pack.getCardAmount() == 0); if (((first.getAmountOfCards() == 0) && packEnded) || ((second.getAmountOfCards() == 0) && (packEnded))) { return true; } else { return false; } }
4
public void setPersonId(String personId) { this.personId = personId; }
0
public boolean isAnswerCorrect() { boolean result = false; final ArrayList<Integer> currentlySelected = new ArrayList<Integer>(); // find the option selected for (int x = 0; x < _checkBoxOptions.size(); x++) { if (_checkBoxOptions.get(x).isSelected()) { currentlySelected.add(x); } } if (currentl...
9
public static void main(String[] args) { //object output stream being used for all output ObjectOutputStream out = null; //ArrayList used to holde classes and test the addClassesFromFile() method of the student class ArrayList<SchoolClass> classes = new ArrayList<SchoolClass>(); ...
6
public FreightCar(Integer grossWeight, String goodsType) throws TrainException{ super(grossWeight); if (!(goodsType.equals("G")|| goodsType.equals("R")|| goodsType.equals("D"))){ throw new TrainException("Invalid goods type for freight car"); } this.goodsType = goodsType; }
3
public ConnectionFactory(String archivoXML) { ParseadorDeXML parser = new ParseadorDeXML(); if (!parser.chequearSiExisteXML(archivoXML)) if (archivoXML.equals(ControladorServidor.ARCHIVO_FIREBIRD)) parser.crearXML(ControladorServidor.BACKUP_FIREBIRD, archivoXML); else if (archivoXML.equals(ControladorServ...
3
public void parse() { boolean success = false; // Keep trying if file not found while (!success) { System.out.print("Enter filename (or 000 to exit): "); this.file = in.nextLine(); if(file.trim().equals("000")) { System.out.println("Program Terminated"); System.exit(0); } try { /...
6
public static Menu parseMenu(String filePath, String XSDFilePath){ try { DocumentBuilderFactory documentBuilder = DocumentBuilderFactory.newInstance(); documentBuilder.setIgnoringElementContentWhitespace(true); Schema schema = SchemaFactory.newInstance( XMLConstants.W3C_XML_SCHEMA_NS_URI)....
3
public String put(final String key, final String value) { String result = null; if (diff.get().containsKey(key)) { result = diff.get().get(key); } else { readLock.lock(); try { if (old.containsKey(key)) { result = old.get(k...
3
public int getAnzahl(NamiConnector con, String gruppierungsnummer) throws NamiApiException, IOException { if (searches.size() < 1) { return 0; } else if (searches.size() == 1 && filters.isEmpty()) { // es gibt nur eine Suchanfrage und keine Filter // -> d...
9
public void render( GameObject object ) { glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glEnable( GL_BLEND ); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); object.renderAll( ambientShader, this ); glBlendFunc( GL_ONE, GL_ONE ); glDepthMask( false ); glDepthFunc( GL_EQUAL ); for ( Base...
1
@Override public String getOpponentChoix(String p) { if(p.equals(player1) && !choise1.isEmpty()) { return choise2; } else if(p.equals(player2) && !choise2.isEmpty()) { return choise1; } return "aucun"; }
4
public LectureFichier(String path) { try { FileReader reader = new FileReader(path); try(BufferedReader br = new BufferedReader(reader)) { StringBuilder sb = new StringBuilder(); String line = br.readLine(); while (line != null) { sb.append(line); li...
3
@Override public void userChangesNick(String oldNick, String newNick) { boolean isMe = getServerTab().getConnection().getNick().equals(oldNick); String message; if (isMe) { message = "Nyní vystupujete pod přezdívkou " + HTML.bold(newNick) + "."; } else...
1
@Override public void solve(DenseMatrix64F B, DenseMatrix64F X) { if( X.numRows != numCols ) throw new IllegalArgumentException("Unexpected dimensions for X"); else if( B.numRows != numRows || B.numCols != X.numCols ) throw new IllegalArgumentException("Unexpected dimensions ...
9
private void searchGuestButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchGuestButton2ActionPerformed guestModel.clear(); String firstName = searchFirstNameField2.getText(); String lastName = searchLastNameField2.getText(); ArrayList<Guest> foundGuests = new...
7
public boolean isStable() { boolean stable = true; boolean[][] nextGrid = this.nextGeneration(); for (int i = 0; i < grid.length; i++) { for (int j = 0; j < grid[0].length; j++) { stable = stable && (grid[i][j] == nextGrid[i][j]); } } retur...
3
protected double mass(int x) { if (x <= 0) { return 0; } else { return Math.exp(- mu * x) * Math.pow(mu * x, x - 1) / Utils.factorial(x); } }
1
public double generateNoise(double var1, double var3, double var5) { double var7 = var1 + this.xCoord; double var9 = var3 + this.yCoord; double var11 = var5 + this.zCoord; int var13 = (int)var7; int var14 = (int)var9; int var15 = (int)var11; if(var7 < (double)var13) { ...
3
@Override public Parameter getParameter(final int parameterIndex) { Parameter parameter; switch (parameterIndex) { case 0: case 1: parameter = super.getParameter(parameterIndex); break; case 2: parameter = time; ...
7
public ArrayList getProductionsForPushTwoTransition(Transition transition, Automaton automaton) { ArrayList list = new ArrayList(); String fromState = transition.getFromState().getName(); String toState = transition.getToState().getName(); PDATransition trans = (PDATransition) transition; String toPop = tr...
8
private void loadIcons( ) { try{ if( sPendingImageIcon == null ) sPendingImageIcon = getLoadingImageIcon(); if( sMissingImageIcon == null ) sMissingImageIcon = getNoImageIcon(); }catch( Exception x ) { System.err.println("ImageView: Couldn't load image icons"); } }
3
public int getCategoryId() { return categoryId; }
0
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof MavenEntity)) { return false; } MavenEntity other = (MavenEntity) obj; if (groupId.equals(other.getGroupId()) && (artifactId.equals(other.getArtifactId())) && (version.equals(other.getVersio...
7
@Override Integer redactEntity(Criteria criteria, AbstractDao dao) throws DaoException { Integer idTour = (Integer) criteria.getParam(DAO_ID_TOUR); if (idTour != null) { return updateTour(criteria, dao); } else { return createTour(criteria, dao); } }
1
public ContainerDispenser(IInventory var1, TileEntityDispenser var2) { this.tileEntityDispenser = var2; int var3; int var4; for(var3 = 0; var3 < 3; ++var3) { for(var4 = 0; var4 < 3; ++var4) { this.addSlot(new Slot(var2, var4 + var3 * 3, 62 + var4 * 18, 17 + var3 * 18)); ...
5
public void run() { Thread thisThread = Thread.currentThread(); while (playing == thisThread) { addOneToField(gui.drawings); int draw = Integer.parseInt(gui.drawings.getText()); float numYears = (float)draw / 104; gui.years.setText("" + numYears); int matches = 0...
9
public static void main(String[] args) { BinarySearchTree t = new BinarySearchTree(); final int NUMS = 4000; final int GAP = 37; System.out.println("Checking... (no more output means success)"); for (int i = GAP; i != 0; i = (i + GAP) % NUMS) t.insert(new Integer(i)); for (int i = 1; i < NUMS; i += 2)...
8
@Override public boolean equals(Object object) { if ( object == null) return false; if ( object == this ) return true; if ( !(object instanceof Operation) ) return false; Operation expression = (Operation) object; return expression.operator == this.operator && expre...
5
@After public void teardown () { try { if ( this.server != null ) this.server.close(); } catch ( IOException ignore ) {} if ( this.executor != null ) this.executor.shutdown(); }
3
public void renew() { timeout = (System.currentTimeMillis()/1000L)+10; }
0
@Override public synchronized void execute() { super.execute(); try { // Write requestBody if any if (this.urlRequest.getHTTPBody() != null) { this.urlRequest.setRequestProperty("Content-Length", "" + Integer.toString(this.urlRequest.getHTTPBody().length)); ...
4
public boolean serverCom(String portNumber) { Integer port = portNumber.isEmpty() ? 4502 : Integer.parseInt(portNumber); boolean status = false; try { if (available(port)) { ServerSocket serverSocket = new ServerSocket(port); serverTCPSocket = serverSo...
3
public JSONObject append(String key, Object value) throws JSONException { testValidity(value); Object object = this.opt(key); if (object == null) { this.put(key, new JSONArray().put(value)); } else if (object instanceof JSONArray) { this.put(key, ((JSONArray) obje...
2
public void trace() { Configuration[] configs = configurations.getSelected(); if (configs.length == 0) { JOptionPane.showMessageDialog(configurations, NO_CONFIGURATION_ERROR, NO_CONFIGURATION_ERROR_TITLE, JOptionPane.ERROR_MESSAGE); return; } for (int i = 0; i < configs.length; i++) { TraceWi...
3
public void updateWeight(int neuronWinner, Example ex) { //verificar a posição na matriz de vetores int line = neuronWinner/this.neuronsLine; int column = neuronWinner%this.neuronsColumn; System.out.println("Neurônio Vencedor: " + line + "," + column); System.out.println("Atualiz...
8
public void check_for_surrounded_ants(int[] p){ check_for_surrounded_ant_at(p); for (int d = 0; d <= 5; d++){ if(adjacent_cell(p,d)[0]>=0 && adjacent_cell(p,d)[0] < world.getRows() && adjacent_cell(p,d)[1]>=0 && adjacent_cell(p,d)[1] < world.getColumns()){ if(world.getCell(adjacent_cell(p,d)[0],a...
6
public E remove(int index) throws IndexOutOfBoundsException { if (index < 0 || index > length) { throw new IndexOutOfBoundsException(); } if (length == 1) { return removeOnly(); } if (index == 0) { return removeFirst(); } if (in...
5
private static void handleWarp(PrintWriter out, String map, String name, Rectangle bounds, Properties props) { if (out == null) return; String dest = getProp(props, "dest_map", null); if (dest == null) return; int x = getProp(props, "dest_x", -1); if (x < 0) return; int y...
4
public String recNombre(String Nick) { //verificar logueo String nombre=""; try { String queryString = "Select nick from Usuarios where nick = ?"; connection = getConnection(); ptmt = connection.prepareStatement(queryString); ptmt.setString(1, Nick); ...
6
public ArrayList<Employee> AllManagers() throws UnauthorizedUserException, BadConnectionException, DoubleEntryException { /* Variable Section Start */ /* Database and Query Preperation */ PreparedStatement statment = null; ResultSet results = null; ...
8
public DealsResponse getDeals(RequestBean request) throws InvalidRequestParametersException, CitysearchException { validate(request); //Initialize tracking Url's String originalDartTrackingUrl = request.getDartClickTrackUrl(); Properties apiProperties = PropertiesLoader.getAP...
8
private void lifeCycle() { String s = ""; String time1StringView = ""; String time2StringView = ""; while (isInputActive) { try { s = readInput(); if (s.length()==0) { break; } if (this.isValidInput(s)) { if (!isTimeSet1) { time1StringView = s; this.isTim...
6
public static void main(String[] args) { ArrayList<Integer> list = new ArrayList<Integer>(); // List, Collection // HashSet for (int i = 0; i < 10; ++i) list.add(i); //list.add(3); for (Integer i : list) System.out.println(i); }
2
public boolean createRandomField() { int count = 0; while (count < RANDOM_PLACEMENT_MAX_TRYS) { count++; // Fill field with zeros. for (int k = 0; k < SIZE; k++) { for (int l = 0; l < SIZE; l++) { fField[l][k] = VALUE_FREE; } } ...
9
public RoyalIRCBot(final RoyalIRC plugin, ConfigurationSection cs, ListenerManager<PircBotX> lm) { final String hostname = cs.getString("hostname"); final int port = cs.getInt("port", 6667); final String password = cs.getString("server_password", ""); Configuration.Builder<PircBotX> cb =...
5
@Override public void play(String audioType, String fileName) { // Java 8 can use Strings in switch switch (audioType) { case "VLC": advancedMediaPlayer.playVLC(fileName); break; case "Mp4": advancedMediaPlayer.playMp4(fileName); break; default: break; } }
2
public boolean instanceOf(Object obj, String className) throws InterpreterException { Class clazz; try { clazz = Class.forName(className); } catch (ClassNotFoundException ex) { throw new InterpreterException("Class " + ex.getMessage() + " not found"); } return obj != null && clazz.isInstance(obj...
2
public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ColorBar)) { return false; } ColorBar that = (ColorBar) obj; if (!this.axis.equals(that.axis)) { return false; } if (this.col...
8
@Override public void setVorname(String vorname) { this.vorname = vorname; }
0
private void resetLater(final ExprInfo exprInfo, final Phi phi) { phi.setLater(false); final Iterator blocks = cfg.nodes().iterator(); while (blocks.hasNext()) { final Block block = (Block) blocks.next(); final Phi other = exprInfo.exprPhiAtBlock(block); if (other == null) { continue; } fi...
5
public static void main( String[] args ) { StockSwag stockSwag = new StockSwag(); // GUI look and feel: /* Set the Nimbus look and feel */ // <editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6)...
6
public static boolean setShaderEnable(String clientName, boolean selected) { String ClientFolderPath = Utils.getWorkingDirectory() + File.separator + GlobalVar.itemsServers[GlobalVar.CurrentServer] + File.separator + ".minecraft" + File.separator; if (selected) { File f = new File(ClientFolderPath...
7
private void redirectOutputStreams() { //Redirect standard output OutputStream redirectedStdOutput = new OutputStream() { @Override public void write(final int b) throws IOException { updateTextPane(String.valueOf((char) b)); } @Override ...
6
public boolean isSolid(){ return false; }
0
@Override public Object execute(HttpServletRequest request, HttpServletResponse response) throws Exception { Contexto oContexto = (Contexto) request.getAttribute("contexto"); oContexto.setVista("jsp/mensaje.jsp"); HiloBean oHiloBean = new HiloBean(); HiloDao oHiloDao = new HiloDao(oC...
2
static final AbstractToolkit createOpenglToolkit(Canvas canvas, d var_d, IndexLoader loader, int i, int i_1_) { try { anInt1532++; if (!Class9.method215(27165)) throw new RuntimeException(""); if (!Class348_Sub40_Sub19.method3098(i ^ ~0x158f, "jaggl")) throw new RuntimeException(""); O...
8
private void updateCategory() { for (@SuppressWarnings("unused") boolean act : categories) { act = false; } for (ImageLabel act : objects) { if (act != null) { CategoryType tmp = act.getCategory(); switch (tmp) { case BASS: categories[0] = true; case BEATS: categories[1] = true; ...
8
public Object getValueAt(int rowIndex, int columnIndex) { switch (columnIndex) {// parcour par colonne case 0://colonne id_Stock return Pharmacies.get(rowIndex).getId_ph(); case 1://colonne id_Stock return Pharmacies.get(rowIndex).getNom_ph(); ...
8
private String readName() throws JSONException { byte[] bytes = new byte[65536]; int length = 0; if (!bit()) { while (true) { int c = this.namehuff.read(this.bitreader); if (c == end) { break; } bytes...
4
public Plant(Terrain terrain, Point position) { this.nodeRenderer = new NodeRenderer(); this.terrain = terrain; this.nodeConnectors = new ArrayList<>(); this.growths = new ArrayList<>(); this.removals = new ArrayList<>(); this.rootRemovals = new ArrayList<>(); this.r...
3
public static void main(String[] args) throws IOException { readData(); calculateAverageRatings(); calculateStandardDeviations(); File base = new File(outputDirectory + fileName); if (!base.exists()) base.createNewFile(); FileWriter bw = new FileWriter(base.getAbsoluteFile()); BufferedWriter baseWr...
5
public String getGroopString() { // Construct the groop string Collection<String> main = getMainGroops(); Iterator<String> gIt = main.iterator(); StringBuffer groop = new StringBuffer(""); while (gIt.hasNext()) groop.append(gIt.next() + " & "); // Remove the trailing & o...
2
@Override public GenreCollection fetchAllByAlbum(Album album) { GenreCollection genreColl = new GenreCollection(); try { CDOrganizer cdOrganizer = XmlDAOFactory.unmarschallFile(); for (AlbumXML a : cdOrganizer.getAllAlbums()) { if (a.getID() == album.getId()) { for (GenreXML b : a.getGenreList(...
4
private void btnCadastrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCadastrarActionPerformed if (txtNome.getText().equals("") || txtDescricao.getText().equals("") || txtDataInicio.getText().equals(" / / ") || txtDataFim.getText().equals(" / / ...
9
public boolean startGame() { boolean crashed = true; try { log("Creating game thread"); this.gameThread = new GameThread(this, "Game Thread"); this.gameThread.run(); while (this.gameThread.isAlive()) { //TODO Add stuff. } if (this.gameThread.didEncounterError()) { throw thi...
6
private void download(ProgressDownload fenProgression) { int valueProgress = 0, pasProgress = 5; fenProgression.setProgression(valueProgress); // Téléchargement des fichiers for (int i = 0; i < this.animaux.size(); i++) { this.animaux.get(i).telechargerFichier(); ...
1
public Inventory getInventory() { return inventory; }
0
protected Stage getStage() { return this.stage; }
0
@Override public <T> T processLine3D(int x0, int y0, int z0, int x1, int y1, int z1, PointHandler3D<T> handler) { int x = x0; int y = y0; int z = z0; T result = handler.handlePoint(x, y, z); if (result != null) return result; final int dx = x1 - x0; final in...
9
public static long measureSumPerf(Function<Long, Long> adder, long n) { long fastest = Long.MAX_VALUE; for (int i = 0; i < 10; i++) { long start = System.nanoTime(); long sum = adder.apply(n); long duration = (System.nanoTime() - start) / 1_000_000; System...
2
public String showHand(Player player) { String result = GameSocketServer.SHOW_PLAYERS_HAND + "@cards="; for (ItalianDeckCard card : playerHands[player.getSeatNumber() - 1]) { result += card + "/"; } result = result.substring(0, result.length() - 1); return result; }
1
private void assertCard(Card card) { int cardRank = card.getRank().ordinal(); Card[] rankList = ranks[cardRank]; if (rankList == null) { rankList = new Card[NUM_SUITS]; ranks[cardRank] = rankList; } int numRank = numRanks[cardRank]++; rankList[numR...
2
@EventHandler public void openShopGUI(PlayerInteractEvent event) { if (event.getAction() == Action.RIGHT_CLICK_BLOCK) { Player player = event.getPlayer(); Block block = event.getClickedBlock(); Cuboid cuboid = Cuboid.getCuboid(player.getLocation()); if (!Level.canUse(UserManager.getInstance().get...
6
public static String toString(JSONObject jo) throws JSONException { StringBuffer sb = new StringBuffer(); sb.append(escape(jo.getString("name"))); sb.append("="); sb.append(escape(jo.getString("value"))); if (jo.has("expires")) { sb.append(";expires="); s...
4
@Override public int Register(String hostAdress, String workerName, int rmiPort) throws RemoteException { ServerNodeInterface newWorker=null; int newId=0; //Import ServerNodeInterface Object try { newWorker = loadServerNodeStub(hostAdress,workerName, rmiPort); } catch (NotBoundException e) {...
8
public int getModifiers() { if ((status & HIERARCHY) == 0) loadInfo(HIERARCHY); return modifiers; }
1
@Override public ArrayList<Object> ifPackage(SalesReceiptPO receipt) { // TODO Auto-generated method stub ArrayList<Object> returnPromotions=new ArrayList<Object>(); ArrayList<SalesListItemPO> listItems=receipt.getSalesList(); ArrayList<String> goodsIds=new ArrayList<String>(); for(int i=0;i<listItems.size()...
7
private boolean r_mark_suffix_with_optional_s_consonant() { int v_1; int v_2; int v_3; int v_4; int v_5; int v_6; int v_7; // (, line 143 // or, line 145 lab0: do { ...
9
@Test public void testUseMessageQueuesFalseWithSockets() { LOGGER.log(Level.INFO, "----- STARTING TEST testUseMessageQueuesFalseWithSockets -----"); try { server1.setUseMessageQueues(true); } catch (TimeoutException e) { exception = true; } try { ...
4
public boolean loadPixelMappingsFromResource(String resourceName) { boolean isSuccessful = false; if (pixelMap.size() == 0) { // Attempt to read the data from the file InputStream resourceStream = Thread.currentThread(). getContex...
5
@Transactional public void deleteItemTemplate(String id) { List<Recipe> recipes = getAllRecipes(); for (Recipe recipe : recipes) { if (recipe.getResult().getId().equals(id)) { deleteRecipe(recipe.getId()); continue; } for (ItemTempl...
6
public Map<PII,StateBuffer> executeSingleAttack(StateBuffer in, DelayableMoveFactory moveFactory, AttackActionSegment actionSegment, int goalValue, int minValue, boolean noBins, boolean isB) { AttackActionSegment dummyActionSegment = null; AttackActionSegment aActionSegment = isB ? dummyActionSegment : actionSegmen...
8
public JSONArray toJSONArray(JSONArray names) throws JSONException { if (names == null || names.length() == 0) { return null; } JSONArray ja = new JSONArray(); for (int i = 0; i < names.length(); i += 1) { ja.put(this.opt(names.getString(i))); } re...
3
public FixedStrategy(int fixed_value){ if(fixed_value<2 || fixed_value>100){ throw new UnauthorizedValue(); } this.fixed_value=fixed_value; }
2
@Override public void initializeService() throws Exception { IRailwayRepository repo = this.getSite().getRequiredService(IRailwayRepository.class); LocalDate tom = new LocalDate().plusDays(1); LocalDate dat = tom.plusDays(1); int flag = 1; for(TrainNumber tn : repo.getTrainNumbers()) { Loc...
2
public RegularGrammar() { super(); setLinearity(-1); }
0
public static byte[] decodeLines(String s) { char[] buf = new char[s.length()]; int p = 0; for (int ip = 0; ip < s.length(); ip++) { char c = s.charAt(ip); if (c != ' ' && c != '\r' && c != '\n' && c != '\t') buf[p++] = c; ...
5
private void showAlbums(Scanner scanner, Application app) { String input = scanner.nextLine(); int selection = -1; try { selection = Integer.parseInt(input); } catch (NumberFormatException e) { // e.printStackTrace(); } System.out.println(); switch (input) { case "exit": { intro(app); break;...
7
public static List<PropertiesFile> findFiles(String srcFilename) throws IOException { String dirName = FilenameUtils.getFullPath(srcFilename); final String filename = FilenameUtils.getName(srcFilename); final String baseName = findBasename(filename); File dir = new File(dirName); File[] files = dir.list...
3
public void actionPerformed(final ActionEvent e) { if (e.getSource() == timer) { progressBar.setValue(getProgress()); } else { if ("Play".equals(e.getActionCommand())) { playIt(); } else if ("Record".equals(e.getActionCommand())) { recordIt(); } else if ("...
7
public static void makeGrid(Container parent, int rows, int padding) { SpringLayout layout; try { layout = (SpringLayout)parent.getLayout(); } catch (ClassCastException exc) { System.err.println("The first argument to makeGrid must use SpringLayout."); return;...
6
public void reset() { for (int i=0; i<delayBuffer.length; i++) { delayBuffer[i] = 0; } delayBufferPos = 0; }
1
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(false); if (session == null) { session.setAttribute("CurrAct", CAppConsts.LinkLoginPage); RequestDispatcher rd...
8