text
stringlengths
14
410k
label
int32
0
9
protected MdctFloat(int n) { bitrev=new int[n/4]; trig=new float[n+n/4]; int n2=n>>>1; log2n=(int)Math.rint(Math.log(n)/Math.log(2)); this.n=n; int AE=0; int AO=1; int BE=AE+n/2; int BO=BE+1; int CE=BE+n/2; int CO=CE+1; // trig lookups... for(int i=0;i<n/4;i++){ ...
5
protected static String trimBracket(final String text, final char kind) { int left = 0; int right = text.length() - 1; char close = '}'; switch (kind) { case '[': close = ']'; break; case '(': close = ')'; ...
4
public int getHighestX() { int x = a[0]; if(b[0] > x) { x = b[0]; } if(c[0] > x) { x = c[0]; } if(d[0] > x) { x = d[0]; } return(x); }
3
void mergeSuccessors(FlowBlock succ) { /* * Merge the successors from the successing flow block */ Iterator iter = succ.successors.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); FlowBlock dest = (FlowBlock) entry.getKey(); SuccessorInfo hisInfo = (Success...
5
@Override public Group findGroupByGroupId(int groupId) { Group group = null; Connection cn = null; PreparedStatement ps = null; ResultSet rs = null; try { cn = ConnectionHelper.getConnection(); ps = cn.prepareStatement(QTPL_SELECT_BY_GROUP_ID); ...
5
private boolean horizontalMove(int fromX, int toX, int y) { Board board = getBoard(); // define the direction by coordinates boolean isRightDirection = toX >= fromX; // left to right if (isRightDirection) { for (int i = fromX; i <= toX; i++) { if (exitFlag || Thread.currentThread().isInterrupted()) ...
9
public void setjTextFieldNumRapport(JTextField jTextFieldNumRapport) { this.jTextFieldNumRapport = jTextFieldNumRapport; }
0
public final JSONArray getJSONArray(int index) throws JSONException { Object o = get(index); if (o instanceof JSONArray) { return (JSONArray)o; } throw new JSONException("JSONArray[" + index + "] is not a JSONArray."); }
1
public ArrayList viewMyBookingCheckout() { ArrayList temp = new ArrayList(); Query q = em.createQuery("SELECT t from BookingEntity t"); for (Object o : q.getResultList()) { BookingEntity p = (BookingEntity) o; temp.add(sdf.format(p.getCheckoutDate())); System.out.println...
1
public boolean saveBitStreamDialogBox () { if (theApp.isBitStreamOut()==true) return false; String file_name; // Bring up a dialog box that allows the user to select the name // of the saved file JFileChooser fc=new JFileChooser(); // The dialog box title // fc.setDialogTitle("Select the bit stream output...
6
public void increaseKey(int index, int key){ if(index >= size) System.out.println("Invalid index"); else if(maxHeap[index] >= key) System.out.println("New key is not greater than current key."); else{ maxHeap[index] = key; int parent = (index - 1)/2; int temp; while(parent >= 0 && maxHeap[index...
4
public void removeEventListener(String type, ipsilonS3ToolEngineListener listener) { if(type.equals(ipsilonS3ToolEvent.TYPE_DELETING)){ listenerDeleting.remove(ipsilonS3ToolEngineListener.class, listener); } if(type.equals(ipsilonS3ToolEvent.TYPE_UPLOADING)){ li...
8
public void add(PropertyTree nextMatchingNode) { // TODO: remove check to improve performance if(nodes.get(0).getValue().equals(nextMatchingNode.getValue())) { nodes.add(nextMatchingNode); } else { throw new RuntimeException("Attempted to store non-consistent result in PropertySearchResults.Result"); ...
1
private static void sieve(int[] p){ for(int i=2;i<N;i++){ if(p[i]==1){ for(int j=i+i;j<N;j+=i){ p[j]=0; } } } }
3
protected void addNode(DataNode node, DataNode parent) { for (DataSourceListener listener : getListeners()) { DataSourceEvent event = new BasicDataSourceEvent(this, node, parent); try { listener.onNodeCreate(event); } catch (ResourceException e) { listener.onError(event, e); } } if (parent ...
5
public String getItemString() { if (!items.isEmpty()) { String returnString = new String(""); Set<String> keys = items.keySet(); for (String key : keys) { returnString += "\n- " + this.items.get(key).getLongDescription(); } return ret...
2
@Test public void moveToStringTest() { Move move = new Move(Player.Rom, 4); assertEquals("R 4", move.toString()); }
0
public void MDeleteDirectory(Message msg, int opID) { String filePath = msg.filePath; if (NamespaceMap.containsKey(filePath)) { // now that have the node in the NamespaceTree, you iterate through // it's children if(AddExclusiveParentLocks(filePath, opID)) { if (NamespaceMap.get(filePath).children.s...
9
public RowAdder(String ip) { final JTextField textField = new JTextField(); setLayout(new BorderLayout()); multicast = ip; JButton startButton = new JButton(new AbstractAction("start") { @Override public void actionPerformed(ActionEvent e) { info...
6
private boolean isMaxAttempts(HttpServletRequest paramHttpServletRequest) { Integer attempts = (Integer)paramHttpServletRequest.getSession().getAttribute(SESSION_ATTR_LOGIN_ATTEMPT); return attempts != null && attempts >= MAX_LOGIN_ATTEMPTS; }
1
public String nextToken() throws JSONException { char c; char q; StringBuffer sb = new StringBuffer(); do { c = next(); } while (Character.isWhitespace(c)); if (c == '"' || c == '\'') { q = c; for (;;) { c = next(); ...
9
public void displayFrnds(){ try { txtArea.setText(""); database.getFriendsList(); ResultSetMetaData met = database.resultSet.getMetaData(); int numberOfColumns = met.getColumnCount(); PrintStream printStream = new PrintStream(...
5
private void loadLevel(String path, int level) throws IOException { ArrayList<String> lines = new ArrayList<String>(); int width = 7; int height = 0; BufferedReader reader = new BufferedReader(new FileReader(path + "level" + level + ".txt")); while (true) { String line = reader.readLine(); // no more l...
8
@Override public void keyPressed(KeyEvent e) { if (e.isControlDown()) { if (e.getKeyCode() == KeyEvent.VK_S) { lunchSettings(); } else if (e.getKeyCode() == KeyEvent.VK_R) { rand.chageStat(3, rand.getIgnor(3)); } else if (e.getKeyCode() == KeyEvent.VK_E) { rand.chageStat(2, rand.getIgnor...
7
private Tile getground(Coord tc) throws Loading { Tile r = map.getground(tc); if (r == null) throw (new Loading()); return (r); }
1
public String getCheckType() { return checkType; }
0
public void saveGuardsConfig() { if (GuardsConfig == null || GuardsConfigFile == null) { return; } try { getGuardsConfig().save(GuardsConfigFile); } catch (IOException ex) { this.getLogger().log(Level.SEVERE, "Could not save config to " + GuardsConfigFile,...
3
public void upgradeStreet(Player p) { if (houses >= 5) JOptionPane.showMessageDialog(null, name+" is already fully upgraded.", "Cannot Upgrade.", JOptionPane.ERROR_MESSAGE); else { if (checkMonopoly()) { int i = group.indexOf(this); boolean upgradabl...
6
public void addStandingsList(StandingsList standingsList) { if (standingsList.getName().equals("agents")) agentStandings = standingsList; else if (standingsList.getName().equals("NPCCorporations")) npcCorporationStandings = standingsList; else if (standingsList.getName().equals("factions")) factionStandi...
3
public ParallaxMapping() throws Exception { Config.maxPolysVisible = 1000; Config.lightMul = 1; Config.glTrilinear = true; Config.glUseVBO = true; world = new World(); TextureManager tm = TextureManager.getInstance(); Texture face = new Texture("data/face.png"); Texture normals = new Texture("data/fa...
0
public ArrayList<Integer> inorderTraversal(TreeNode root) { ArrayList<Integer> result = new ArrayList<Integer>(); Stack<TreeNode> q = new Stack<TreeNode>(); HashSet<TreeNode> visited = new HashSet<TreeNode>(); if (root == null) return result; q.push(root); ...
5
public E next() { return this.enumeration.nextElement(); }
0
public Monster(Transform transform) { if(rand == null) { rand = new Random(); } if(animation == null) { animation = new ArrayList<Texture>(); animation.add(ResourceLoader.loadTexture("SSWVA1.png")); animation.add(ResourceLoader.loadTexture("SSWVB1.png")); animation.add(ResourceLoader.lo...
3
public void loadConfigFiles() throws FileNotFoundException { //System.out.println("Opening files."); String line = null; String[] legend; //Scanner layout = readFile("Out_Board.csv"); //Scanner legend = readFile("ClueLegend.txt"); Scanner scanner = readFile("Out_Board.csv"); try{ while(scann...
6
protected int calculateBreakPosition(int p0, Token tokenList, float x0) { //System.err.println("------ beginning calculateBreakPosition() --------"); int p = p0; RSyntaxTextArea textArea = (RSyntaxTextArea)getContainer(); float currentWidth = getWidth(); if (currentWidth==Integer.MAX_VALUE) currentWidth = ge...
6
private int getLeastWorkingDriver(int[] driversList, Date day, service serv) { int minMins = 3000; int driver = 0; boolean temp = false; boolean found = false; for(int i=0; i<driversList.length; i++) { temp = false; found = false; if(minutesDriverWorked[i] < minMins && Driver...
8
public int compareNames(Location dest1, Location dest2) { Player player = getMyPlayer(); String name1 = ""; if (dest1 instanceof Settlement) { name1 = Messages.message(((Settlement) dest1).getLocationNameFor(player)); } else if (dest1 instanceof Europe || dest1 instanceof Map...
6
public Color getTrueColor() { if (this.type == TypeC.YELLOW) return ColorCreator.YELLOW; if (this.type == TypeC.GREEN) return ColorCreator.GREEN; if (this.type == TypeC.RED) return ColorCreator.RED; return ColorCreator.BLUE; }
3
public void communcation(Socket socket){ try { PrintWriter pw = new PrintWriter(socket.getOutputStream(),true); BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream())); BufferedReader localReader = new BufferedReader(new InputStreamReader(System.in)); String msg = null; w...
7
protected Constructor<? extends ConfigurationSerializable> getConstructor() { try { return clazz.getConstructor(Map.class); } catch (NoSuchMethodException ex) { return null; } catch (SecurityException ex) { return null; } }
3
public void run() { while (active) { int mod = timeElapsed % 7; switch(mod) { case 0: log.info("info level log."); break; case 1: log.debug("debug level log."); break; case 2: log.error("error level log"); break; case 3: log.warn("warn level log"); break; case 4...
9
public final void des_set_odd_parity(byte[] key) { for (int i=0; i < DES_KEY_SZ; i++) key[i]=odd_parity[key[i]&0xff]; }
1
@EventHandler public void EnderDragonNausea(EntityDamageByEntityEvent event) { Entity e = event.getEntity(); Entity damager = event.getDamager(); String world = e.getWorld().getName(); boolean dodged = false; Random random = new Random(); double randomChance = plugin.getEnderDragonConfig().getDouble("Ender...
6
public static String unescape(String string) { int length = string.length(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < length; ++i) { char c = string.charAt(i); if (c == '+') { c = ' '; } else if (c == '%' && i + 2 < length) { ...
6
public Branch getBranchById(int id) { Branch brh=null; Connection con=null; Statement stmt=null; try { DBconnection dbCon=new DBconnection(); Class.forName(dbCon.getJDBC_DRIVER()); con = DriverManager.getConnection(dbCon.getDATABASE_URL(), dbCon.getDB_USERNAME(), dbCon.g...
3
public List<Product> getBest(BagOfWords query, long queryTime, int k) { TreeSet<Comp> set = Sets.newTreeSet(); for (Indexed<Product> doc : docs.keySet()) { double tfIdf = getTfIdf(query, doc); if (query.getWords().contains(Tag.also(doc.getKey().getSku()))) { tfId...
6
public void progress() { this.iterationCounter++; for (int i = 0; i < this.computers.length; i++) { for (int j = 0; j < this.computers.length; j++) { // check connection and infection for virus attack possibility if ((this.connection[i][j] == 1) && (this.compu...
6
protected void fireSwipeEvent(SwipeEvent e) { if (_capturingSwipeEventsHandler != null) { e.dispatch(_capturingSwipeEventsHandler); return; } if (_capturingDragEventsHandler != null) { return; } EventTarget target = e.getNativeEvent().getEventTarget(); Node node = Node.as(target); if (!Element.is...
9
private void dct(double[][] a, double[][] b, double[][] c, int n) { double x; double[][] af = new double[n][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { x = 0.0; for (int k = 0; k < n; k++) { x += a[i][k] * b[k][j]; } af[i][j] = x; } } for (int i = 0; i < n; i++)...
6
private void addEntry(TrieSymbolTable table, int code) throws SymbolException { if (table == null) { throw new SymbolException("Symbol table cannot be found. "); } if (cachedValueEntry == null) { if (code != -1) { cachedValueEntry = code; //new TrieEntry(code,true); table.updateValueCounter(code); ...
7
private static void doFindTest() { try { System.out.print("Testing find command "); String folderName = TEST_DATA+File.separator+BLESSED_DAMOZEL; File folder = new File( folderName ); String mvdName = createTestMVD( folder ); File mvdFile = new File( mvdName ); MVD mvd = MVDFile.internalise( mvdF...
3
@Override public boolean onMouseDown(int mX, int mY, int button) { if(button == 0 && mX > x && mX < x + width && mY > y && mY < y + height) { Application.get().getEventManager().queueEvent(new GameStateChangeEvent(state)); return true; } return false; }
5
public Token checkNextToken(Enum<?>... expected) throws ScriptException { Token next = getNextToken(); if (next != null) { for (Enum<?> exp : expected) { if (next.getType() == exp) return next; } } throw error("\"" +...
5
private void expand(Node crt) { while (crt != null && !crt.isVisited()) { crt.setVisited(true); for (Cord c : crt.getNb()) { if (c == null) continue; Node nd = nodes[c.i][c.j]; if (nd == null) continue; Integer dist = nd.costFrom(crt, panel, to.getDirectP()); if (dist == null) ...
8
public Contact getContactFromID(int id) { Iterator contactIterator = allContacts.iterator(); Contact nextContact; while(contactIterator.hasNext()) { nextContact = (Contact) contactIterator.next(); if(nextContact.getId() == id) { return nextContact; ...
2
@Override public boolean accept(File f) { if (f.isDirectory()) { return true; } String suffix = f.getAbsolutePath(); suffix = suffix.substring(suffix.lastIndexOf(".") + 1); if (filesType == FileChooser.FILES_TYPE_IMAGE) { ...
5
public boolean compile(MdJspfBundle<?> jspfBundle, String labelName) throws JspfException { boolean result = true; File scriptDir = jspfBundle.getScriptDir(); if (scriptDir == null) { result = false; } File scriptFile = null; if (result) { scriptFile = new File(scriptDir.getAbsoluteFile()+File....
8
public static final Object getFieldContent(Class<?> objectClass, Object object, String fieldName) { System.out.println("Reflection Access: " + objectClass + " @--> " + fieldName); try { Field field = objectClass.getDeclaredField(fieldName); field.setAccessible(true); try { return field.get(...
5
public void trackMouse(MouseInfo mouse){ double x = mouse.getX(); double y = mouse.getY(); float snapRealX = Math.round((x-22)/20f) * 20f + 22; float snapRealY = Math.round((y-25)/20f) * 20f + 25; int snapX = Math.round(( (float) x-22) /20f); //these are the coordinates...
3
@Override public void dragOver(DropTargetDragEvent dtde) { if (mDragDockable != null) { updateForDragOver(dtde.getLocation()); dtde.acceptDrag(DnDConstants.ACTION_MOVE); } else { dtde.rejectDrag(); } }
1
protected List<List<Talk>> getScheduleConferenceTrack(List<Talk> talksList) throws Exception { // Find the total possible days. int perDayMinTime = 6 * 60; int totalTalksTime = getTotalTalksTime(talksList); int totalPossibleDays = totalTalksTime/perDayMinTime; // Sort the talkLis...
8
public static Constructor<?> getConstructor(Class<?> clazz, Class<?>... paramTypes) { Class<?>[] t = toPrimitiveTypeArray(paramTypes); for (Constructor<?> c : clazz.getConstructors()) { Class<?>[] types = toPrimitiveTypeArray(c.getParameterTypes()); if (equalsTypeArray(types, t)) return c; } return nu...
8
private void unfilterPaeth(byte[] curLine, byte[] prevLine) { final int bpp = this.bytesPerPixel; int i; for(i=1 ; i<=bpp ; ++i) { curLine[i] += prevLine[i]; } for(int n=curLine.length ; i<n ; ++i) { int a = curLine[i - bpp] & 255; int b = pre...
8
public String getPrice() { return this.price; }
0
private void render() { BufferStrategy bs = getBufferStrategy(); if (bs == null) { createBufferStrategy(3); return; } screen.clear(); xScroll = (int) ((Mob) player).getX() - WIDTH / 2 + 16; yScroll = (int) ((Mob) player).getY() - HEIGHT / 2 + 16; if (xScroll < 0) { xScroll = 0; } if (yScroll ...
7
public void decreaseStock() { ProductDAO dao = DAOFactory.getInstance().getProductDAO(); int id; for (ProductInBasket product : basket.getAllProductsInBasket()) { id = product.getProduct().getId(); dao.decreaseStock(id, basket.getProductInBasket(id).getQuantity()); } }
1
public boolean equal(CPA someCpa) { if(cpa.length==someCpa.length()){ for(int i=0; i<cpa.length; i++){ if(cpa[i]==null && someCpa.getAssignment(i) !=null || cpa[i]!=null &&someCpa.getAssignment(i)==null ) return false; if(cpa[i]==null && someCpa.getAssignment(i)==null) return true; if(!cpa[i]...
9
public String getDescription() { return description; }
0
private static char [] zzUnpackCMap(String packed) { char [] map = new char[0x10000]; int i = 0; /* index in packed string */ int j = 0; /* index in unpacked array */ while (i < 110) { int count = packed.charAt(i++); char value = packed.charAt(i++); do map[j++] = value; while (--co...
2
public EmployeeService(){ SellXMLHandler sl=new SellXMLHandler(); BookXMLHandler bk=new BookXMLHandler(); sellFactory = new ObjectFactory(); try { sellList=(SellListRoot)sl.readFromFile(); bookList=(BookListRoot)bk.readFromFile(); } catch (JAXBException e) { // TODO Auto-generated catch block e.pr...
3
public CustomFilter(String pattern, String format, String level, String separator){ this.pattern = Pattern.compile(pattern); this.level = level.isEmpty() || level == null ? null : Level.valueOf(level); this.separator = separator.isEmpty() || separator == null ? null : separator; this.f...
6
public void readConfigValues() { boolean exceed = false; boolean invalid = false; if(getConfig().isSet("debug")){debug = getConfig().getBoolean("debug");}else{invalid = true;} // HTTP request if(getConfig().isSet("scriptURL")){scriptURL = getConfig().getString("scriptURL");}else...
5
public void deleteItem(long id) { Connection con = null; Statement stmt = null; try { DBconnection dbCon = new DBconnection(); Class.forName(dbCon.getJDBC_DRIVER()); con = DriverManager.getConnection(dbCon.getDATABASE_URL(), dbCon.getDB_US...
4
public int characterAt(int at) throws JSONException { int c = get(at); if ((c & 0x80) == 0) { return c; } int character; int c1 = get(at + 1); if ((c1 & 0x80) == 0) { character = ((c & 0x7F) << 7) | c1; if (character > 0x7F) { ...
8
protected HttpURLConnection openConnection(String url, HttpMethod method, String contentType) throws IOException { HttpURLConnection conn; try { conn = (HttpURLConnection) new URL(url).openConnection(); } catch (MalformedURLException e) { throw new IllegalArgumentExceptio...
4
public boolean type(char ch, KeyEvent ev) { if(cmdline == null) { return(super.type(ch, ev)); } else { cmdline.key(ev); return(true); } }
1
public boolean operate(T t1, T t2) { boolean isValid = true; try { ValidationHelper.validateValue(t1).against(t2).usingValidator(ValidationHelper.isEqual()); } catch (IllegalStateException iSE) { isValid = false; } return isValid; }
1
@Override public UserVo detail(int no) throws Throwable { Connection con = null; PreparedStatement stmt = null; ResultSet rs = null; try { con = dataSource.getConnection(); stmt = con.prepareStatement( "select UNO, EMAIL, PWD, NAME, TEL, FAX, POSTNO, ADDR, " + "PHOT_PATH from SE_USERS" + " wher...
5
private void computeTopicMustsetWordDistribution() { if (param.sampleLag > 0) { for (int t = 0; t < param.T; ++t) { for (int ms = 0; ms < MS; ++ms) { int size = mustsets.getMustSet(ms).size(); for (int i = 0; i < size; ++i) { eta[t][ms][i] = etasum[t][ms][i] / numstats; } } } } el...
7
public static void main(String[] args) { IntTreeBag tree1 = new IntTreeBag(); IntTreeBag tree2 = new IntTreeBag(); IntTreeBag tree3 = new IntTreeBag(); tree1.add(55); tree1.add(50); tree1.add(8); tree1.add(61); tree1.add(100); tree1.add(2); tree1.add(2)...
0
public byte[] toByteArray(){ try{ ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutput out = null; out = new ObjectOutputStream(bos); out.writeObject(this); byte[] yourBytes = bos.toByteArray(); try{ bos.close(); out.close(); }catch(Exception e){System.out.println("A M...
2
@Override public boolean closeRequested() { return true; }
0
private static Properties getProperties(final URL url) { PrivilegedAction action = new PrivilegedAction() { public Object run() { try { InputStream stream = url.openStream(); if (stream != null) { ...
3
public int disconnect() { //System.out.println("Disconnecting..."); // disconnect MySQL connection, statement, resultset // --- 5) clean up statement and connection int errorCode = 0; try { if(rset != null){ rset.close(); } if (stmt != null){ stmt.close(); } if(...
4
@Override public TypeOfValue pop() throws EmptyStackException { if (null == this.firstNode) { throw new EmptyStackException(); } TypeOfValue pop = (TypeOfValue) this.firstNode.getObject(); this.firstNode = this.firstNode.getNextNode(); return pop; }
1
public boolean save() { Preferences prefs = Preferences.userNodeForPackage(Joculus.class); boolean save_ok = true; save_ok = save_general_prefs(prefs); save_ok = save_editor_prefs(prefs); save_ok = save_window_prefs(prefs); save_ok = save_processor_prefs(prefs); ...
1
public void setjSplitPane1(JSplitPane jSplitPane1) { this.jSplitPane1 = jSplitPane1; }
0
@Override public void redo() { // Remove the Node node.getTree().removeNode(node); undoable.getParent().removeChild(node); // Insert the Node undoable.getTargetParent().insertChild(node,targetIndex); node.getTree().insertNode(node); // Set depth if neccessary. if (undoable.getTargetParent().getDepth(...
1
private int rollToHit(int attackerUID, int defenderUID) { if (org.getAttackTarget(attackerUID) == lookup.missCode) { // then he was stunned org.setAttackTarget(lookup.headCode, attackerUID); // un-stun him return lookup.missCode; // do the actual stu...
5
public Employee(String first, String last, double monthly) { firstName = first; lastName = last; if(monthly < 0) { // you can also use setMonthlySalary(m) monthlySalary =0; } else monthlySalary = monthly; }
1
public void addBlock(int x, int y) { Piece block = new Block(x, y); if (this.numberOne==null && this.numberTwo==null) { this.numberOne=block; } else if (numberOne!=null && numberTwo==null){ this.numberTwo=block; } }
4
protected void updateTable() { dataTable.clear(); for(Object o : historicoAluno){ if(o instanceof MatriculaAlunoTurma){ MatriculaAlunoTurma alunoTurma = (MatriculaAlunoTurma) o; Object tableRow[] = new Object[this.getColumnCount()]; if(alunoTur...
5
public void update(Graphics g){ elapsedTime = System.currentTimeMillis() - lastUpdate; lastUpdate = System.currentTimeMillis(); world.update(elapsedTime); if(waitToRed){ tempTime += elapsedTime; if(tempTime >= Main.pedestrian_time){ tempTime = 0; waitToRed = false; world.suddenChange(World.Sta...
4
@Override public void findSuggestions(String text, Callback callback) { if (selectBoxTags != null && !selectBoxTags.isEmpty()) { List<T> suggestions = new ArrayList<T>(); if (text == null || text.trim().length() == 0) { suggestions.addAll(selectBox...
6
@Override public void update(Observable o, Object arg) { TouchPacket packet = (TouchPacket)arg; if(packet.id == 800) { // discard, special packet return; } // translate x and y... int x = (int)(((double)packet.x / 32768d) * (double)getWidth()); int y = (int)(((double)packet.y / 32768d) * (do...
8
@Override public synchronized String chooseClientAlias(final String[] keyType, final Principal[] issuers, Socket socket) { if (CacHookingAgent.DEBUG) { System.out.println("chooseClientAlias: "); } if (choosenAlias != null) { if (CacHookingAgent.DEBUG) { System.out.println("cached chooseClientAlias: " +...
8
public synchronized void print(String name) { for (int i = 0; i < 20; i++) { System.out.printf("%s %s\n", name, i); try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } }
2
private static String initialise(Token currentToken, int[][] expectedTokenSequences, String[] tokenImage) { String eol = System.getProperty("line.separator", "\n"); StringBuffer expected = new StringBuffer(); int maxSize = 0; for (int i = 0; i < expe...
8
private void publicationCountStatistics() { Iterator i = Person.iterator(); Person p; int l = Person.getMaxPublCount(); int countTable[] = new int[l+1]; int j, n; System.out.println(); System.out.println("Number of publications: Number of persons"); while ...
4
public int getVerboseLevel() { return this.verbose_level; }
0