text
stringlengths
14
410k
label
int32
0
9
public void setRef5(String ref) { if (ref != null && ref.length() > 256) throw new IllegalArgumentException("Ref cannot be longer than 256 characters!"); this.ref5 = ref; }
2
public static void complementaryGraph(mxAnalysisGraph aGraph) { ArrayList<ArrayList<mxCell>> oldConnections = new ArrayList<ArrayList<mxCell>>(); mxGraph graph = aGraph.getGraph(); Object parent = graph.getDefaultParent(); //replicate the edge connections in oldConnections Object[] vertices = aGraph.getChild...
9
public void setAuther(String auther) { this.auther = auther; }
0
public void run(){ System.out.println("DownloadQueueProcessor Running"); while(parent.getRunning()){ //make sure program is still running while(parent.queue.isEmpty()){ try { Thread.sleep(TIME_SLEEP_IF_EMPTY); //if DL Queue is empty, pause for half a second before trying again } catch (InterruptedE...
5
public void setData(int newData) { data = newData; }
0
private void wilidingBattleResolution() { if(playerChoices.getWildingsCard().equals("PreemptiveRaid") && ((BiddingAgainstWild)model.getBidding()).victory()){ Family winFamily=model.getBidding().getTrack()[0]; model.preemptiveRaid(winFamily); if(getSeatNum()!=winFamily.getPlayer()){ playerChoices.bidding(...
7
public void setPrenom(String prenom) { this.prenom = prenom; }
0
CarItf deserializeFromJson(String json) { AutoBean<CarItf> bean = AutoBeanCodex.decode(factory, CarItf.class, json); return bean.as(); }
0
@Override public void importScan(NessusClientData scan) { PreparedStatement pstmt = null; try { String scanUuid = UUID.randomUUID().toString(); pstmt = connection.prepareStatement("INSERT INTO scans (UUID, NAME) VALUES(?,?)"); pstmt.setString(1, scanUuid); pstmt.setString(2, scan.getPolicy().getName()...
5
private String getLastResponse() throws Exception { if ( !formValues.containsKey(LAST_RESPONSE_KEY) ) throw new Exception("Last response was not found."); return formValues.get(LAST_RESPONSE_KEY); }
1
public FSAAction(String string, Icon icon) { super(string, icon); }
0
private void startButtonclick() { view.startServer.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { view.startServer.setEnabled(false); server.startServer(view.portText.getText()); } }); }
0
private synchronized void checkGridletCompletion() { ResGridlet obj = null; int i = 0; // NOTE: This one should stay as it is since gridletFinish() // will modify the content of this list if a Gridlet has finished. // Can't use iterator since it will cause an exception ...
3
private void leerCoches(){ ArrayList<String> list = disco.leerArchivo("coches/coches"); String[] aux; for(int i=0; i<list.size(); ++i){ aux = list.get(i).split("\t"); if(!cjtClientes.containsKey(aux[5])) aux[5]="-NA-"; else cjtClientes.get(aux[5]).addCoche(aux...
2
public String execute( String input ) { try { return (String) ( this.proMethod.invoke( this.executor.newInstance(), input)); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace...
4
public Object peek() { return getFirst(); }
0
private static boolean isEmptyOrWhitespace(final String target) { if (target == null) { return true; } final int targetLen = target.length(); if (targetLen == 0) { return true; } final char c0 = target.charAt(0); if ((c0 >= 'a' && c0 <= 'z'...
9
public void asignarColumnaLetrasA(String nombreRespuesta, int numeroRespuesta){ switch(numeroRespuesta){ case 0: _jlbl1.setText(nombreRespuesta); break; case 1: _jlbl2.setText(nombreRespuesta); break; case 2: _jlbl3.setText(nombreRespuesta); ...
5
@Override public long spawnBoss(String bossData) { super.spawnBoss(bossData); GameActor a = Application.get().getLogic().createActor(bossData); PhysicsComponent pc = (PhysicsComponent)a.getComponent("PhysicsComponent"); pc.setLocation(x + 100, y + Display.getHeight() + 200); ...
1
public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = ""; StringBuilder out = new StringBuilder(); HashMap<String, String> map = new HashMap<String, String>(); d: do { line = br.readLine(); if (line.length() ==...
7
private FlowToken readNextTokenTextMode() throws SnuggleParseException { /* Look at first character to decide what type of token we're going to read. * * NB: If adding any trigger characters to the switch below, then you'll need to add * them to {@link #readNextSimpleTextParaMode()} ...
9
public int[] agileCarMove(int x, int y, Direction direction, Car movingCar) { //Precondition: direction != null; movingCar != null; x & y are coordinates on the map //Postcondition: returns int[] with 2 elements which has coordinates on the map int returnX, returnY; int[] tmpInt = direction.moveRight(); re...
4
@Override protected void initCentroids(int k) { final int size = this.docs.size(); final Random rand = new Random(); final Double firstCendroid = rand.nextDouble() * size; this.centroids.add(firstCendroid.intValue()); Map<Integer, Double> distances; Double distanceSum; for (int i = 0; i < k - 1; i++) { ...
7
@SuppressWarnings("deprecation") private void processDirectoryRequest(OMMSolicitedItemEvent event) { System.out.println(_instanceName + " Received Directory request"); OMMMsg msg = event.getMsg(); Token token = event.getRequestToken(); int msgType = msg.getMsgType(); sw...
6
@SuppressWarnings("unchecked") public ArrayList<Integer> getCorrectChoiceIndexes() { ArrayList<Integer> indexList = new ArrayList<Integer>(); ArrayList<String> questionList = (ArrayList<String>) question; ArrayList<String> answerList = (ArrayList<String>) answer; for (int i = 1; i < questionList.size(); i++) ...
3
public String getContentType(File file) { String fileName = file.getName(); String contentType; if (fileName.endsWith(".htm") || fileName.endsWith(".html")) contentType = "text/html"; else if (fileName.endsWith(".jpg") || fileName.endsWith(".jpeg")) contentType = ...
8
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { RequestDispatcher dispatcher = request.getRequestDispatcher(VIEW); //een boolean om te controleren of de testCookie aanwezig is boolean testCookieTest = false; //nagaan of er wel cookies...
4
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Section other = (Section) obj; if (this.id != other.id && (this.id == null || !this.id.equals(other.id)))...
8
private void utters(Actor a, String s) { boolean picked = false ; for (Dialogue d : sides()) { if (BaseUI.isPicked(d.actor())) picked = true ; } if (! picked) return ; final Actor opposite = a == actor ? other : actor ; final boolean onRight = onRight(a, opposite) ; final int side = on...
5
static Map<Package, List<Class<?>>> categorize(Collection<Class<?>> comp) { Map<Package, List<Class<?>>> packages = new HashMap<Package, List<Class<?>>>(); for (Class<?> c : comp) { Package p = c.getPackage(); List<Class<?>> tos = packages.get(p); ...
9
public void add(String word) { char[] wordChars = word.toCharArray(); for (int i = 0; i < wordChars.length; i++) { char before = wordChars[i]; wordChars[i] = (char) 0; String key = String.valueOf(wordChars); HashSet<String> valueSe...
2
@Override public int indexOf(Object o) { // TODO Auto-generated method stub if (o == null) { for (int i = 0; i < size(); i++) if (get(i)==null) return i; } else { for (int i = 0; i < size(); i++) if (((String)o).equalsIgnoreCase(ge...
5
public void listMouseClicked(MouseEvent e) { if(e.getClickCount() == 2) { ArrayList<GeometricObject> temp; if(mytabbedpane.getSelectedIndex()==0) { temp=geomListleft; } else { temp=geomListright; } switch (list.getSelectedValue()) { case "Kreis" : temp.add(new Kreis(1, 1...
6
public static void setFileBase(FileDataBase data){ fileBase = data; }
0
private int calculateNextOrderIndex() { int followingOrderIndex = 0; for (List<QualifiedValue<?>> vals : fields.values()) { for (QualifiedValue<?> val : vals) { if (val.getOrderIndex() >= followingOrderIndex) { followingOrderIndex = val.getOrderIndex() + 1...
5
public void computeRoutingTables(int iterations,boolean splitHorizon){ String msg = "Calculating "+iterations+" iteration(s)."; if(splitHorizon){ msg += "\nSplit Horizon enabled."; } else { msg += "\nSplit Horizon disabled."; } System.out.println(msg); for(int i=0;i<iterations;i++){ ...
6
public ArrayList<Handler> getHandlersList() throws ClassNotFoundException, IllegalAccessException, InstantiationException, IOException { ArrayList<Handler> outList = new ArrayList<Handler>(); Gson json = new Gson(); JsonReader jReader = new JsonReader(jFileReader); ArrayList<String> hand...
1
public Email Abrir(int id){ try{ PreparedStatement comando = banco.getConexao() .prepareStatement("SELECT * FROM emails WHERE id = ? AND ativo = 1"); comando.setInt(1, id); ResultSet consulta = comando.executeQuery(); comando.getConnection().co...
3
public static String[] getMaps() { File file = new File(CFG.DIR, "maps"); if (!file.exists() || !file.isDirectory()) { file.delete(); file.mkdir(); } String[] names = new String[file.list().length]; for (int i = 0; i < names.length; i++) { names[i] = file.list()[i].substring(0, file.list()[i].last...
3
public void push(E element) { stack.insert(element); }
0
@Override public void insert(String value) { // Keeps track if the value has a collision. boolean collisioned = false; // Gets rid of the values that are not words. if (value == null || !value.matches("^[a-zA-Z]+$")) return; int hashVal = hashFunc(value); // Iterate over the items until an openi...
9
public void combination(List<Integer> list,int[] candidates,int index, int target ){ if(target <= 0){ if(target == 0){ result.add(new ArrayList<Integer>(list)); } return; } for(int i =index; i < candidates.length;i++){ if(i > 1 && c...
5
public String toString() { return "valve1 = " + valve1 + " " + "valve2 = " + valve2 + " " + "valve3 = " + valve3 + " " + "valve4 = " + valve4 + "\n" + "i = " + i + " " + "f = " + f + " " + "source = " + source; }
0
public void disconnect() { boolean disconnected = false; synchronized(CONNECTION_LOCK) { if(isConnected) { logger.fine("Disconnecting from " + serverAddress + ":" + serverPort); disconnectQuietly(); disconnected = true; } else if(isAttemptingToConnect) { logger.fine("Cancelling connect requ...
3
public void setOption( String op, String val ) { if( op.equals( "lblAlign" ) ) { // ctr, l, r if( val.equals( "ctr" ) ) { at = 2; } else if( val.equals( "l" ) ) { at = 1; } else { at = 3; } } else if( op.equals( "lblOffset" ) ) { // 0-100 wOffset = (sho...
4
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub JSONObject jb = new JSONObject(); String userId = request.getParameter("userId"); String groupId = request.getParameter("groupId"); Mongo mongo = new Mon...
8
private void initJoyStick(){ stick = new Joystick(screen, Vector2f.ZERO, (int)(screen.getWidth()/6)) { @Override public void onUpdate(float tpf, float deltaX, float deltaY) { float dzVal = .2f; // Dead zone threshold if (deltaX < -dzVal) { stateManager.getState(Inter...
4
@Override public void draw(Graphics page) { shipImage.drawImage(page, xLocation, yLocation);//Draws the plane on the component //Draws the collision Border if(this.getBorderVisibility()) { drawCollisionBorder(page,xLocation,yLocation,shipImage.getWidth(),shipImage.getHeight()); } }
1
public static void main(String [] args) throws FileNotFoundException { //Read in all the possible data points into the arrayList that will hold them ArrayList<DataPoint> d = new ArrayList<DataPoint>(); Scanner s = new Scanner(new File("bitvals.txt")); //int i = 0; //p vals are bitvals all of which are collated int...
9
public static void main(String[] args) { long[]arr = new long[]{2,3,4}; arr[0] = 1; System.out.println(arr[0]); System.out.println(arr[1]); System.out.println(arr[2]); System.out.println(arr[3]); }
0
public static String readFile(String path){ //System.out.println("path : " + path + " reading..."); String sCurrentLine; String sJSON = ""; BufferedReader bReader = null; try{ FileReader fReader = new FileReader(path); bReader = new BufferedReader(fReader,16000); while ((sCurrentLine = bReader.readLine()) != nu...
4
private boolean boardIsFull() { for (int x=0; x < boardWidth; x++) { for (int y=0; y < boardWidth; y++) { if (sudokuTextFields[y][x].getText() == null || sudokuTextFields[y][x].getText().isEmpty() || boardVals[y][x] == NULL_VAL) return false; } } return true; }
5
public void close(){ this.vue.setVisible(false); }
0
private void enableUpdater() { if(config.getBoolean("Updater.check-for-updates")) { Updater updater = new Updater(this, 55348, this.getFile(), Updater.UpdateType.NO_DOWNLOAD, false); if(config.getBoolean("Updater.notify-console")) { if(updater.getResult() == UpdateResult.NO_UPDATE) console.sendMessag...
9
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
private void addCall(final Instruction inst, final int kind) { final MemberRef method = (MemberRef) inst.operand(); final Type type = method.nameAndType().type(); final Type[] paramTypes = type.paramTypes(); final Expr[] params = new Expr[paramTypes.length]; for (int i = paramTypes.length - 1; i >= 0; i--) ...
3
public int[] sort() { int length; length = array.length; this.tempMergArr = new int[length]; doMergeSort(0, length - 1); return array; }
0
private static ImageProcessor yGradient(ImageProcessor ip){ ImageProcessor result = ip.duplicate(); int[] Gy = {-1, -2, -1, 0, 0, 0, 1, 2, 1}; result.convolve3x3(Gy); return result; }
0
public Map<String,String> toParameterMap() { Map<String,String> parameters = new LinkedHashMap<String,String>(); parameters.put("merchant_id",getMerchantId()); if (GoCoin.hasValue(getStatus())) { parameters.put("status",getStatus()); } if (GoCoin.hasValue(getStartTs())) { param...
5
@Override public Value evaluate(Value... arguments) throws Exception { // Check the number of argument if (arguments.length == 1) { // get Value Value value = arguments[0]; // If numerical if (value.getType().isNumeric()) { return new Value(new Double(Math.sin(value.getDouble()))); } if (val...
4
private static Line below(LinkedList<Line> tLines, Line l) { int index = -1; for (Line l0 : tLines) { if (l0 == l) { index = tLines.indexOf(l); break; } } if (index < tLines.size() - 1) { return tLines.get(index + 1); ...
4
public void parseMethod(Parser parser, CompilationUnitDeclaration unit) { //connect method bodies if (unit.ignoreMethodBodies) return; //members if (this.memberTypes != null) { int length = this.memberTypes.length; for (int i = 0; i < length; i++) this.memberTypes[i].parseMethod(parser, unit); } //meth...
8
@Override public void recieveEvent(Event event) { if(event.getEventType() == EventType.OUTPUT) { String text = (String) event.getData(); voice.speak(text); } // System.out.println(this.getClass().toString() + " recieved event:"); // System.out.println(event); ...
1
public static void main(String[] args) throws Exception { MakeHandsOns prog = new MakeHandsOns(); if (args.length == 0) { System.err.printf("Usage: %s directory [...]%n", MakeHandsOns.class.getSimpleName()); } else if (args[0].equals("-h")) { doHelp(); } else for (String arg : args) { if (".".equals(...
4
public String [] getOptions() { String [] options = new String [12]; int current = 0; if (m_unpruned) { options[current++] = "-U"; } if (m_reducedErrorPruning) { options[current++] = "-R"; } if (m_binarySplits) { options[current++] = "-B"; } options[current++] = "...
7
private void punizione(CalcioPiazzato a){ a.tipo="punizione"; match.scout.addTiro(a.team); Giocatore p=null;//portiere //selezione tiratore e portiere if(a.team.equals("casa")){ a.tiratore=match.getCasa().getRigorista(); p=match.getOspiti().getGiocatore(Ruolo.GK).get(0); }else{ a.tira...
6
@Override public void execute(double t) { Matrix data = new ColumnMatrix(output.getDim()); if (input.isConnected() && input.getSource() != null) { data = input.getInput(); } try { output.setOutput(data); } catch (OrderException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
3
public static void main(String[] args) { try { BrickGame.path = args[0]; Master.setConfig(); FieldGame.init_sub(10, 8); Status.ifWin = -1; BrickGame.error = new String[2]; BrickGame.error[0] = "fatal"; BrickGame.error[1] = "writeproblem"; String[] names = new String[4]; names[0]="Test1"; ...
3
public void setWarmerPlateStatus(int status) { this.warmerPlateStatus = status; }
0
public void drawCircuit(String output, String output_file) { GraphViz gv = new GraphViz(); gv.addln(gv.start_graph()); gv.addln("rankdir=LR;"); String[] lines = output.split("\n"); int max_lines = lines.length; Matcher matcher = Pattern.compile("STATES_NO:([0-9]+)").matcher( lines[0]); matcher.find()...
6
private void movePlayer(){ if(!inside){ checkCollisionsOut(); }else{ checkCollisionIn(); } playerRect.x += xDirection; playerRect.y += yDirection; playerLeft.x += xDirection; playerLeft.y += yDirection; playerRight.x += xDirection; playerRight.y += yDirection; playerTop.x += xDirection; play...
5
public static void main(String[] args) { Primes primes = new Primes(); ConsecPrimeSum s = new ConsecPrimeSum(); ArrayList<Integer> list = new ArrayList<>(); //System.out.println(s.primeSumBelow(1000000)); //List<Integer> list = primes.getPrimes(1000000); long num = 0; long largestConsec = 2; boolean b...
7
protected int backfillGridlets() { int nStarted = 0; if(jobOrder != null) { Collections.sort(waitingJobs, jobOrder); } Iterator<SSGridlet> it = waitingJobs.iterator(); while(it.hasNext()) { SSGridlet gl = it.next(); if(gl.getStartTime() > 0) { continue; ...
5
@Override public Class getColumnClass(int column) { Class returnValue; if ((column >= 0) && (column < getColumnCount())) { if(getValueAt(0, column)==null) return Object.class; returnValue = getValueAt(0, column).getClass(); ...
3
public static void print(Object obj) { Class<?> c = obj.getClass(); if (!c.isArray()) { return; } System.out.println("\nArray length: " + Array.getLength(obj)); for (int i = 0; i < Array.getLength(obj); i++) { System.out.print(Array.get(obj, i) + " "); } }
3
public String createSQL() throws SQLException { String returnValue = "select "; String where = ""; boolean first = true; for (Field field : getXmlline().getFields()) { if (!field.isUse()) continue; if (first) { first = false; returnValue += field.getName(); }...
9
public boolean hasStatistics() { for (StatMethod m : methods) { if (m.invocations != 0) { return true; } } return false; }
2
private void jButtonCompresserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCompresserActionPerformed if (!this.jTextFieldNameFile.getText().isEmpty() && !this.jTextAreaChaineACompresser.getText().isEmpty()) { JOptionPane d = new JOptionPane(); d.showM...
5
@Override public void actionPerformed(ActionEvent e) { Object s = e.getSource(); if (s==Save) { Game.map.parse.encode(Game.edit.mapname); } else if (s==Load) { new LoadMap(); } else if (s==Change) { ValidateMapSize(Integer.parseInt(Height.getText()),Integer.parseInt(Width.getText())); ValidateMa...
5
void removePredecessor(Instruction pred) { /* Hopefully it doesn't matter if this is slow */ int predLength = preds.length; if (predLength == 1) { if (preds[0] != pred) throw new alterrs.jode.AssertError( "removing not existing predecessor"); preds = null; } else { Instruction[] newPreds = ne...
3
public Image getCompoundTerrainImage(TileType type, double scale) { // Currently used for hills and mountains Image terrainImage = getTerrainImage(type, 0, 0, scale); Image overlayImage = getOverlayImage(type, 0, 0, scale); Image forestImage = type.isForested() ? getForestImage(type, sca...
7
private void addItemOkPressed(String itemName, String itemPrice, String itemQuantity) { StringBuffer errorMessage = new StringBuffer(); double price = 0.0; int quantity = 0; boolean nameValid = false; boolean priceValid = false; boolean quantityValid = false; nam...
9
public void analyze(Reader input, Writer output) throws IOException { Analyzer analyzer = Morfeusz.getInstance().getAnalyzer(); int words = 0; long start = System.currentTimeMillis(); StreamTokenizer tokenizer = new StreamTokenizer(input); int token; whi...
7
public boolean getPlayerName(String josh) { try { FileInputStream fStream = new FileInputStream("playernames.txt"); DataInputStream in = new DataInputStream(fStream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String line; while ((line = br.readLine()) != null) { if (line....
3
public boolean setParameterString(String paramString) { try { int i = Integer.parseInt(paramString); if (i < 1) { return false; } setTimes(i); this.random = false; return true; } catch (NumberFormatException localNumberFormatException1) { try ...
9
public void doEmote(Tickable ticking, String emote) { MOB emoter=null; emote=CMStrings.replaceAll(emote,"$p",ticking.name()); emote=CMStrings.replaceAll(emote,"$P",ticking.name()); if(ticking instanceof Area) { emoter=CMClass.getMOB("StdMOB"); emoter.setName(ticking.name()); emoter.charStats().setSt...
8
private void LogInButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LogInButtonActionPerformed try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:VideoStore", "", ""); Statement stat = con.create...
6
private void setGameOverMessage() { long formattedScore = (long) (mPlayer.getScore() - mPlayer.getScore() % 5); String text = "GAME OVER! Level: " + mLevel + ", Score: " + formattedScore + ". "; if (mLevel < 6) { text += "Keep practicing!"; } else if (mLevel < 12) { ...
5
public void ponerPrimerFicha() { int tlt = Domino.listaTablero.size(); while (true) { for (int i = 0; i < Domino.listaFichaPc.size(); i++) { if (Domino.listaFichaPc.get(i).getCabeza() == Domino.listaTablero.get(0).getCola()) { Domino.listaFichaPc = mst.ad...
8
public Histogram getGaussianSmoothed(double standardDeviation) { if(standardDeviation < 0.0) { throw new IllegalArgumentException(JaiI18N.getString("Histogram8")); } else if(standardDeviation == 0.0) { return this; } // Create a new, identical but empty Histogram...
9
public Simulation(String[] config, boolean verbose) { //set the output Person file outPerson = new OutputFile("personCreated.txt"); //set the output BusStop file outBusStop = new OutputFile("busstopCreated.txt"); //set the output Person file outBus = new OutputFile("b...
1
public void writeToAdjacencyMatrix(String file){ int[][] A = new int[network.size()][network.size()]; for(Node N:network) { for(int i=0;i<N.getDegree();i++) { A[N.id][N.getNeighbour(i).id] = 1; } } try { Buff...
5
@Override public long computeCostOfAllocation(BaseInterval<Integer> allocation) { long cost = 0; // next walk thgrought edges and compute for all new added occurrences for (ValuedInterval<Integer, IntervalMultimap.MultimapEdge<Occurrence>> valuedInterval : this.solution.allocations...
3
public void sellTower(int x, int y) { if (map.getTile(x, y).getTower() != null) { Tower t = map.getTile(x, y).getTower(); towerList.remove(t); for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { map.getTile(t.getTileX() + i, t.getTi...
4
public DefaultComboBoxModel<String> buildVariableModel() { DefaultComboBoxModel<String> model = new DefaultComboBoxModel<String>(); BufferedReader reader; try { reader = new BufferedReader(new FileReader(System.getProperty("resources") + "/database/variables")); String line; while((line = reader.r...
3
public void check_random(RandomNumberGenerator generator, int seed) { // set the seed of the random number generator generator.set_seed(seed); clear_histogram(); // test odd/even of numbers // test average number for (int i = 0; i < this.max_size; i++) { int value = generator.next_int...
8
public SettingsHandler(final GenericTestMonitorApplication application, final PreselectionPanel preselectionPanel) { _application = application; final String kvPid = _application.getConnection().getLocalConfigurationAuthority().getPid(); _preferences = Preferences.userRoot().node("/gtm").node(kvPid); // durch An...
8
protected Iterator configKeys() { return props.keySet().iterator(); }
0
@Override public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) { Player player = (Player)sender; if (command.getLabel().toLowerCase().equals("favor")) { if (player.hasPermission("favordisfavor.favor") || player.isOp()) { this.fdInterface.favor(args[0]); ...
9
private static void render(String s) { if (s.equals("{")) { buf_.append("\n"); indent(); buf_.append(s); _n_ = _n_ + 2; buf_.append("\n"); indent(); } else if (s.equals("(") || s.equals("[")) buf_.append(s); else if (s.equals(")") || s.equals("]")) ...
9