text
stringlengths
14
410k
label
int32
0
9
public static int getRandomNumber(int min, int max) { int num = random.nextInt(max); int mod = num % (max - min); return mod + min; }
0
public final void actualiser() { try { remplissageComboBox(lesPraticiens); indicePraticienCourant = 0; System.out.println(indicePraticienCourant); praticienCourant = lesPraticiens.get(indicePraticienCourant); afficherPraticien(praticienCourant); ...
1
protected static Ptg calcCoupNum( Ptg[] operands ) { if( operands.length < 2 ) { return new PtgErr( PtgErr.ERROR_NULL ); } debugOperands( operands, "COUPNUM" ); try { GregorianCalendar sDate = (GregorianCalendar) DateConverter.getCalendarFromNumber( operands[0].getValue() ); GregorianCalendar mDa...
9
public void initializeTime(HardwareSet hardwareSet) { for(HardwareSetAlternative hardwareSetAlternative : hardwareSystem.getHardwareSetAlternatives()) if(hardwareSetAlternative.getHardwareSet().equals(hardwareSet)){ hardwareSetAlternative.initializeTime(); } }
2
public static int findDepth( String s ) { int countLeft = 0; int countLeftTotal = 0; int countZero = 0; int depth = -1; // countLeft - 1 for( int i = 0; i < s.length(); i++) { char a = s.charAt( i ); switch( a ){ case '0': countZero++; break; ...
6
public static int countCells(Board board, int x, int y, int radius) { int result = 0; for (int px = x-radius; px <= x+radius; px++) if (px >= 0 && px < board.w) for (int py = y-radius; py <= y+radius; py++) if (py >= 0 && py < board.h) if (board.cells[px][py]) result++; return result; }
7
@Override public <S> Result<S> find(Class<S> serviceClass) throws ServiceInstantiationException { Result<S> result=null; // S provider=null; // Scope scope=null; // If it still doesn't exist, get the provider class, see what scope // it prefers, and create it in that scope. Syncyhronization should // onl...
7
@Override public String getColumnName(int columnIndex) { switch (columnIndex) { case VENDOR: return "Производитель"; case NUMBER: return "№"; case MODEL: return "Модель"; case NOTE: return "Примеч...
5
public static boolean equal(boolean[][] a, boolean[][] b) { if(a != null && b != null) { if(a.length == b.length) { for(int i = 0; i < a.length; i++) { if(a[i].length == b[i].length) { for(int j = 0; j < a[i].length; j++) { ...
9
private static JCheckBox[] getAssetCheckBoxes(AIProject project) { List<AIAsset> tempAssetsList = project.getAssetsList(); JCheckBox[] assetCheckBoxLabels = new JCheckBox[tempAssetsList.size()]; for (int i = 0; i < tempAssetsList.size(); i++) { assetCheckBoxLabels[i] = new JCheckBox(tempAssetsList.get...
1
public void read(String txt) { if (txt.length() > MAX_TXT_LENGTH) { Iterator<String> i = splitToChunks(txt).iterator(); while (i.hasNext()) { playText(i.next()); } } else { playText(txt); } }
2
public void terminated(Pipe pipe_) { // Remove the pipe from the list; adjust number of matching, active and/or // eligible pipes accordingly. if (pipes.indexOf (pipe_) < matching) matching--; if (pipes.indexOf (pipe_) < active) active--; if (pipes.index...
3
public static void printGrade(double score) { if(score < 0 || score > 100) { System.out.println("Invalid Score"); return; } if (score >= 90.0) { System.out.println('A'); } else if(score >= 80.0) { System.out.println('B'); } else if(score >= 70.0) { System.out.println('C'); } else if(score ...
6
public Object [][] getDatos(){ Object[][] data = new String[getCantidad_Cuentas ()][colum_names.length]; //realizamos la consulta sql y llenamos los datos en "Object" try{ if (colum_names.length>=0){ r_con.Connection(); String ca...
8
public void addLast(E e) { if (e == null) throw new NullPointerException(); elements[tail] = e; if ( (tail = (tail + 1) & (elements.length - 1)) == head) doubleCapacity(); }
2
public void add(int x, int y) { int[] tmp = new int[2]; for(int i = 0; i < index; i++) if(x < line[i][0] || y < line[index][1]) { tmp[0] = line[i][0]; tmp[1] = line[i][1]; line[i][0] = x; line[i][1] = y; x = tmp[...
3
@Override public void runStartupChecks() throws EngineException { Engine eng = FreeForAll.getInstance().getEngineManger().getEngine("Storage"); if (eng != null) { if (eng instanceof StorageEngine) { this.SE = (StorageEngine) eng; } } if (SE == null) { throw new EngineException("Missing Storage -De...
4
@Override public PilotAction findNextAction(double s_elapsed) { if (target_unit == null || !target_unit.isInMap() || !target_unit.isHomable() || !target_unit.getRoom().equals(target_unit_room)) { updateTarget(); return PilotAction.MOVE_FORWARD; } double angle_to_target = MapUtils.a...
7
private int BFS(Graph graph, String start, String end) { int length = 1; if (start.equals(end)) return 0; HashSet<String> visited = new HashSet<String>(); HashSet<String> outGoing = new HashSet<String>(); HashSet<String> reaching = new HashSet<String>(); reac...
7
public List<Component> loadDatabase(){ List<Component> database = new ArrayList<Component>(); try { File fXmlFile = new File("database.xml"); DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); Document doc = dBuilder.pars...
8
public int getCount() { return count; }
0
@Override public Object getValueAt(int indiceLinha, int indiceColuna) { //Verifica o índice da linha e obtém o valor através da posição na lista RegistroNaoConformidadeApontado registroNaoConformidadeApontado = linhas.get(indiceLinha); //Verifica o índice da coluna e obtém o valor ...
9
public void func_73188_b(int par1, int par2, byte par3ArrayOfByte[], BiomeGenBase par4ArrayOfBiomeGenBase[]) { for (int i = 0; i < 16; i++) { for (int j = 0; j < 16; j++) { int k = 1; int l = -1; byte byte0 = (byte)Block.whiteSt...
9
private void trickleUp(int index) { int parent = (index - 1) / 2; BTPosition<T> bottom = heap.get(index); while (index > 0 && comp.compare(heap.get(parent).element(), bottom.element()) < 0) { heap.set(index, heap.get(parent)); index = parent; parent = (parent - 1) / 2; } heap.set(index, bottom)...
2
public static void main (String args[]){ Scanner s = new Scanner(System.in); System.out.println("Enter with a value!"); while(s.hasNext()){ if(s.hasNextInt()){ System.out.println("Int.:"+s.nextInt()); }else { System.out.println("String.:"+s.next()); } } System.out.println...
2
private void genererEntete(File fichier) { String type =""; //PROTOCOLE + message réussite AFFICHÉ PLUS HAUT Date dateM = new Date(fichier.lastModified()); if(fichier.isFile()) { String extension = (fichier.getName().split("\\."))[1]; type = get...
3
public void rankSelection() { // calculate fitness, filter invalid elements List<Individual> okList = new ArrayList<Individual>(); for (Individual ind : individuals) { if (ind.fitness(MIN_G)) okList.add(ind); } // sort in preparation to calculate rank Collections.sort(okList, new Comparator<Individ...
7
public void disable() { if(RealWeather.isDebug()) RealWeather.log("Disabling features."); for (Feature feature : features.values()) { try { if(RealWeather.isDebug()) RealWeather.log("DIS: " + feature.getName()); try { configs.get(feature.ge...
8
private double find(int A[], int B[], int l, int r) { int m = A.length, n = B.length; if (l > r) { return find(B, A, Math.max(0, (n - m) / 2), Math.min(B.length - 1, (m + n) / 2)); } int i = (l + r) / 2; int j = (m + n) / 2 - i - 1; int Bj = j < 0 ? Integer.MIN_VALUE : B[j]; int Bj1 = ...
9
public Tile getCurrentDestination() { final Tile start = Players.getLocal().getLocation(); int minDist = Integer.MAX_VALUE; for (Tile t : destinations) { minDist = Math.min(minDist, MapUtil.dist(start, t)); } if (minDist > 100) return null; int pangle = -1; for (int i = destinations.length - 1; i >=...
7
private void initGui() { getContentPane().setBackground(backgroundColor); setTitle("BATTLEBOTS ARENA"); ArrayList<Image> icons = new ArrayList<Image>(); icons.add(new ImageIcon(getClass().getResource("icon16.png")).getImage()); icons.add(new ImageIcon(get...
8
private HttpURLConnection getFetchConnection(WebThumbFetchRequest webThumbFetchRequest) throws WebThumbException { Validate.notNull(webThumbFetchRequest, "webThumbFetchRequest is null!"); if (LOGGER.isLoggable(Level.FINE)) { LOGGER.fine("Attempting to send webThumbFetchRequest: " + webThumbFetchRequest); } W...
7
@Override public void startTransfer() throws TransferException { Runnable readRunner = new Runnable() { public void run() { try { logger.debug("Socket ready for read.. " + socket); logger.debug("Local port:" + socket.getLocalSocketAddress().toString()); // 初始化缓冲区和一些变量 byte[] buff =...
6
public EncryptCezar(String text, int k) { this.k = k; String input = text; StringBuilder output = new StringBuilder(); for (int i = 0; i < input.length(); ++i) { char c = input.charAt(i); if (isEnglish(c)) { int y = (findInEnglish(c) + k) % nEng; if (Character.isUpperCase(c)) { output.appe...
7
@Test public void testConstructor_IllegalArgumentException() { boolean exceptionThrown = false; try { new PaymentResponse(null, 1, ServerResponseStatus.SUCCESS, null, "buyer", "seller", Currency.BTC, 12, System.currentTimeMillis()); } catch (IllegalArgumentException e) { exceptionThrown = true; } asse...
9
public int size( ) { return manyItems; }
0
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
public static CardCombination getSameCardsOrHighestCard( ArrayList<Card> tempHandCards) { CardCombinationEnum cardCombinationEnum = null; // Sort the given hand cards just to be sure that the order is correct sortHand(tempHandCards); // Make a copy of the list, so that the given list can be manipulated Ar...
8
public static void main(String[] args) { int max = (int)(6*Math.pow(9, P)); ArrayList<Integer> ans = new ArrayList<Integer>(); for(int i = 2; i < max; i++) { int x = i; ArrayList<Integer> digits = getDigits(i); while( digits.size() > 0 && x >= 0 ) x -= Math.pow(digits.remove(digits.size()-1), P); ...
6
public void borrarRegistrosIndice(String nombreTabla,String indice, int id) { try { this.bd.open(); this.table = this.bd.getTable(nombreTabla); this.bd.beginTransaction(SqlJetTransactionMode.WRITE); // Esta función busca por calve primaria aquel id que concue...
2
public BaseMethodPanel(JFrame frame, QueryDefinition query, T instance) throws MalformedURLException { super(false); this.frame = frame; this.query = query; this.query.setRequest(instance); try { this.setName(query.getName()); this.setLayout(new BorderLayout()); JPanel panel = new JPanel(); ...
2
public static void main(String[] args) throws URISyntaxException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); TestAlgorithm test = new TestAlgorithm(); try { System.out.println("Please enter algorithm name, file name and minimal support level, separate by space."); String inpu...
8
public String[][] execSelectQuery(String pSQL){ String SQL = pSQL; try{ Statement stmt = this.con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); ResultSet rs = stmt.executeQuery(SQL); rs.last(); int colu...
8
private Set<Card> sixFlushWithStraight() { return convertToCardSet("JS,4S,8S,3S,9S,TS,7H"); }
0
public void askClientConnectionToServer(String clientId) { try { getLogger().info("Demande d'information client : " + clientId); // On recherche si on a déjà démarré un dialogue avec le client. boolean alreadyDone = false; for (ClientDialog dialog : this.dialogs) { if (dialog.getClients().size()...
8
public void setPcaGenerico(Integer pcaGenerico) { this.pcaGenerico = pcaGenerico; }
0
public BlockMap(String ref)throws SlickException{ entities = new ArrayList<Object>(); tmap = new TiledMap(ref, "res"); mapWidth = tmap.getWidth() * tmap.getTileWidth(); mapHeight = tmap.getHeight() * tmap.getTileHeight(); for(int x = 0; x < tmap.getWidth(); ++x) ...
3
public void create_idx( String idxFileName, String indexOnKeyString ) { if(isReadOnly()) return; if(canIfNoCdx()) { order = "[idx]"; Idx = new idx(); try { Idx.fidx = new RandomAccessFile( new File( g_idxname(idxFileName) ), fmode()); } catch (FileNotFoundException e1) { e1.printStackTrace(); } try...
5
public static HashMap<Integer, Double> getFinalScores(List<TestResult> results){ HashMap<Integer, PriorityQueue<Integer> > id_scores = new HashMap<Integer, PriorityQueue<Integer> >(); for(TestResult res : results) { PriorityQueue<Integer> queue = null; if(id_scores.containsKey( res.studentId ) ) { queue ...
8
public static void print(Vector<MP3> sublist) { for (Iterator<MP3> it = sublist.iterator(); it.hasNext();) { MP3 s = it.next(); System.out.println(s.getPath()); } }
1
private String decode999( int num ) { String s = ""; // work out hundreds : numbers 100-900 int n = num % 1000; // extract the first 3 digits from num if ( n >=100 ) s += units[ n / 100 ] + " hundred"; if ( n>=100 && n % 100 != 0 ) s+= " and "; // numbers 1-99 n = num % 100; // extract the first...
9
public boolean update(Prestamos p){ PreparedStatement ps; try { ps = mycon.prepareStatement( "UPDATE Prestamos "+ "SET fecha=?, estado=?, id_libro=?, id_usuario=? "+ "WHERE id=?" ); ps.setDate(1, p.getFecha()); ...
1
private void createTreeView(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 1; gridLayout.marginHeight = gridLayout.marginWidth = 2; gridLayout.horizontalSpacing = gridLayout.verticalSpacing = 0; composite.setLayout...
6
@Override public void setAttenuation( int model ) { super.setAttenuation( model ); // make sure we are assigned to a channel: if( channel != null && channel.attachedSource == this && channelOpenAL != null && channelOpenAL.ALSource != null ) { // attenuatio...
5
@Override public void insertString(int offs, String str, AttributeSet a) throws BadLocationException { String texto = getText(0, getLength()); for (int i = 0; i < str.length(); i++) { char c = str.charAt(i); if (!Character.isDigit(c)) { return; } ...
9
public void body() { int resourceID[] = new int[this.totalResource_]; String resourceName[] = new String[this.totalResource_]; LinkedList resList; ResourceCharacteristics resChar; // waiting to get list of resources. Since GridSim package uses // multi-threaded envi...
3
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Record other = (Record) obj; if (this.recordId != other.recordId) { return false; } ...
7
public void setId(long Id) { this.Id = Id; }
0
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed // TODO add your handling code here: String d = jTextField2.getText(); String id = jTextField1.getText(); String tgl1 = String.valueOf(jTable1.getValueAt(0, 4)); int no...
9
private boolean inBounds(int y, int x) { return x >= 0 && y >= 0 && x < BOARD_LENGTH && y < BOARD_LENGTH; }
3
@Override public void play(int objectId) { AudioChannel channel = getAudioChannel(objectId); AudioObject object = objects.get(objectId); int source = channel.source; alSourcei(source, AL_BUFFER, object.dataId); alSourcef(source, AL_PITCH, (float) object.pitch); alSourcef(source, AL_GAIN, (float) object.vol...
1
int insertKeyRehash(long val, int index, int hash, byte state) { // compute the double hash final int length = _set.length; int probe = 1 + (hash % (length - 2)); final int loopIndex = index; int firstRemoved = -1; /** * Look u...
9
private int findBaseHeightForLogo(int target, int associationNameLength) { int base = 1; double height = getLogoHeight(associationNameLength, base); while (height < target) { base *= 2; height = getLogoHeight(associationNameLength, base); LOG.debug(String.form...
8
protected String getGlobalArchiverFlags() { final StringBuilder builder = new StringBuilder(); if (globalOverrideArchiverFlags == null || globalOverrideArchiverFlags.isEmpty()) { if (parent != null) builder.append(parent.getGlobalArchiverFlags()); else builder.append(config.aflags()); } else { ...
8
public String selectionSortStable(String s) { char[] a = s.toCharArray(); for (int i = 0; i < a.length - 1; i++) { insert(a, i, getMinIndex(a, i)); } return new String(a); }
1
public static EXIT_COMMAND getCommand(String str) { for(EXIT_COMMAND exit: EXIT_COMMAND.values()) { if(exit.cmd.equalsIgnoreCase(str)) { return exit; } } return CONTINUE; }
2
private final String inlineCommentFilter( String line ) { //assert !inJavadocComment; //assert !inMultiLineComment; if ( line == null || line.equals( "" ) ) { return ""; } int index; if ( ( index = line.indexOf( "//" ) ) >= 0 && !isInsideString( l...
4
public boolean move(Direction direction) throws InvalidMoveException { // Max gameboard positions int left = 0; int top = 0; int bottom = board.length - 1; int right = board[0].length - 1; Tokens temp; switch(direction) { // Move up case UP: if(emptyRow == top) throw new InvalidMoveExcept...
8
public long getAverage() { long sum = 0; for (int i = 0; i < duur.size(); i++) { sum += duur.get(i).longValue(); } return sum / duur.size(); }
1
protected HsqlDaoBase(HsqlUnitOfWork uow) { super(uow); try { Connection connection = uow.getConnection(); ResultSet rs = connection.getMetaData().getTables(null, null, null, null); boolean exist = false; stmt =connection.createStatement(); while(rs.next()) { if(rs.getString("TABLE...
4
public int getMaxFPS() { return this.maxFPS; }
0
public SquareType getSquareType(Coord c) { int squareValue = mat.getSquareValue(c); if (squareValue == -1) { return SquareType.OUTSIDE; } else if (squareValue == 0) { return SquareType.OBSTACLE; } else if (squareValue == 1) { return Sq...
7
@Override public void startSetup(Attributes atts) { JTextArea list = new JTextArea(); list.setRows(4); list.setColumns(15); list.setLineWrap(false); JScrollPane component = new JScrollPane(list); setComponent(component); super.startSetup(atts); list.addFocusListener(new TextAreaListener(list, getPre...
0
private void run() { // repita ate que a lista de algum homem esteja vazia ou todos estejam casados while(!someManListEmpty() && !everyoneEngaged()) { boolean existFreeMan = true; // enquanto existir homem solteiro while(existFreeMan) { Person currentM...
9
public void keyPressed(KeyEvent e) { /* Pressing a key in the title screen starts a game */ if (board.titleScreenB) { board.titleScreenB = false; return; } /* Pressing a key in the win screen or game over screen goes to the title screen */ else if (board.w...
8
public BufferedImage greenRGBFilter() { this.greenImage = originalImage; Color actualPixel; int actualRedValue; int actualGreenValue; int actualBlueValue; float numberOfGreenPixels = 0f; for (int i = 0; i < originalImage.getWidth(); i++) { for (int j = 0; j < originalImage.getHeight(); j++) { actua...
9
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Delta other = (Delta) obj; if (original == null) { if (other.original != ...
9
private Object fireReceiveQueryEvent(ReceiveQueryEvent evt) throws Exception { try { if (invokeHandler == null) { throw new Exception("InvokeHandler not assigned on server side."); } localConnectionInfo.remove(); localConnectionInfo.set(evt.getConnectionInfo()); return new Ref...
2
private static void begin() { Scanner sc = new Scanner(System.in); int nTestCases = Integer.parseInt(sc.nextLine()); sc.nextLine(); // process empty line. /* @formatter:off * Decides how to search the word in the matrix. * 0,1 -> horizontally to the right * 1,...
9
@Override public boolean equals(Object o) { if(o == null) return false; if(o == this) return true; if(!(o instanceof Angebot)) return false; Angebot a = (Angebot)o; if(a.getKundeNr()!= kundeNr || a.getNr() != nr || a.getPreis() != preis...
9
@Override public int compareTo(Node o) { if (this.evaluation > o.evaluation) { return 1; } else if (this.evaluation < o.evaluation) { return -1; } else { return 0; } }
2
private void generateWorld() { int initSize = 10; for(int j = initSize/(-2); j < initSize/2.0; j++) { for (int k = initSize/(-2); k < initSize/2.0; ++k) { chunkLoader.queueLoad(new Point(k, j)); } } }
2
public boolean inCheck(Player player) { // Is player's king in check? return this.fieldInCheck(this.getKingField(player), player); }
0
protected ArrayList<Coordinate> takeMove(Coordinate xy) { boolean test = false; if (test || m_test) { System.out.println("Othello :: takeMove() BEGIN"); } /* if (!isValidMove(xy)) { throw new IllegalStateException( "Given move is invalid but should be valid"); } */ // I...
4
protected void loadFields(com.sforce.ws.parser.XmlInputStream __in, com.sforce.ws.bind.TypeMapper __typeMapper) throws java.io.IOException, com.sforce.ws.ConnectionException { super.loadFields(__in, __typeMapper); __in.peekTag(); if (__typeMapper.isElement(__in, Contract__typeInfo)) { ...
9
public void mouseClicked(MouseEvent e) { if (e.getSource() == cur) { int s = 20; int f1 = 8; int f2 = f1 + (int) (s * 0.6); Rectangle lRect = new Rectangle(f1, f1, s, s); Rectangle rRect = new Rectangle(f2, f2, s, s); if (lRect.contains(e.getPoint())) { Color c = JColorChooser.show...
5
public HelloWorldOGL() throws Exception { world = new World(); world.setAmbientLight(0, 255, 0); TextureManager.getInstance().addTexture("box", new Texture("box.jpg")); box = Primitives.getBox(13f, 2f); box.setTexture("box"); box.setEnvmapped(Object3D.ENVMAP_ENABLED); box.build(); world.addObject(box)...
0
public void ordena() { for (int i=0; i<cads.length - 1; i++) { for (int j=0; j<cads.length-1-i; j++) { if (cads[j].compareTo(cads[j+1]) > 0) { String aux = cads[j]; cads [j] = cads [j+1]; ...
3
public void addAll(IntTreeBag addend){ IntBTNode addroot; if(addend == null){ throw new IllegalArgumentException(" bag is empty"); } if(root == addend.root){ addroot = IntBTNode.treeCopy(addend.root); addTree(addroot); }else{ addTree(addend.root); ...
2
public Set getClassNames() { HashSet result = new HashSet(); LongVector v = items; int size = numOfItems; for (int i = 1; i < size; ++i) { String className = ((ConstInfo) v.elementAt(i)).getClassName(this); if (className != null) result.add(clas...
2
private synchronized void defaultSend(Sim_event ev, int gisID, int statID, int shutdownID) { IO_data io = (IO_data) ev.get_data(); int destId = io.getDestID(); /***** // DEBUG info System.out.println(super.get_name() + ".defaultSend(): Send to " + GridS...
4
private void processFile() { if(settings.cur_processor != null) { processFileExternal(); } }
1
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){ if(cmd.getName().equalsIgnoreCase("uhc")) { if (args.length == 0) { if (!sender.isOp()) { sender.sendMessage(ChatColor.BOLD + "" + ChatColor.RED + "UltraHardcore: " + ChatColor.RESET + "Custom coded for ThePark"); ...
7
private JsonParser moveToPath(String json, String path) { try { JsonFactory f = new MappingJsonFactory(createMapper()); JsonParser jp = f.createJsonParser(json); jp.nextToken(); //go to start_object if (path == null) return jp; String pathParts[]; if (path.contains(".")) { ...
5
protected void controlMovement() { // Reset movement speed speedModifier = 1f; // Basic "run" actions // Modify the entity's movement speed by 150% if(Keybind.RUN.held()) { speedModifier = 1.5f; } // Fire a movement event on the player if any movement key presses have occured if(Keybind.movement()...
6
public void start() { // A new thread pool is created... ThreadPoolExecutor executor = testThreadPoolExecutorService .createNewThreadPool(); executor.allowCoreThreadTimeOut(true); // Created executor is set to ThreadPoolMonitorService... threadPoolMonitorService.setExecutor(executor); // ThreadPoolMo...
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 fe...
6
public Set<OneMutation> loadMutationList(String fName, int numMutable, boolean PEMcomp) { BufferedReader bufread = null; try { File file = new File(fName); FileReader fr = new FileReader(file); bufread = new BufferedReader(fr); } catch (FileNotFoundException e) { System.out.println(" ... no mutat...
8
public void run() { try { long outSize = 0; if (LzmaOutputStream.LZMA_HEADER) { final int n = in.read(props, 0, propSize); if (n != propSize) { throw new IOException("input .lzma file is too short...
9
public boolean equals(Object o) { if (o instanceof Key) { Key k = (Key) o; return tag == k.tag && intData == k.intData && objData.equals(k.objData); } return false; }
3