text
stringlengths
14
410k
label
int32
0
9
public boolean isSyncMark(int headerstring, int syncmode, int word) { boolean sync = false; if (syncmode == INITIAL_SYNC) { //sync = ((headerstring & 0xFFF00000) == 0xFFF00000); sync = ((headerstring & 0xFFE00000) == 0xFFE00000); // SZD: MPEG 2.5 } else { sync = ((headerstring & 0xFFF80C00) ==...
5
public RBMParameters(String data_file) { int line_num = 1; try { BufferedReader br = new BufferedReader(new FileReader(data_file)); String line = br.readLine(); String[] ar = line.split("\\s+"); m = Integer.parseInt(ar[0]); n = Integer.parseInt(ar[1]); T = Integer.parseInt(ar[2]); _weights = ne...
9
public void setLoginno(String loginno) { this.loginno = loginno; }
0
public void testCompareTo() { YearMonth test1 = new YearMonth(2005, 6); YearMonth test1a = new YearMonth(2005, 6); assertEquals(0, test1.compareTo(test1a)); assertEquals(0, test1a.compareTo(test1)); assertEquals(0, test1.compareTo(test1)); assertEquals(0, test1a.compareTo...
3
public boolean noticeChan(String chan, String msg){ boolean success = true; String[] msgSplit = msg.split("\n"); for(int i=0;i<msgSplit.length;i++) { if(!sendln("NOTICE " + chan + " :" + msgSplit[i]) ) { success = false; } } return success; }
2
private List<PartyResults> internalCalculations(List<Party> list){ int chair = 0; int votes = 0; int counter = 0; if (!(list.size()>0)) return results; // Set to 0 totalVotes, not already calculated totalVotes=0; totalChairs=0; results.clear(); for (Iterator it = list.iterator(); it.hasNext();) {...
6
private ArrayList<Sprite> makeNewSpriteArray(int sheepNum, int snailNum, int raccoonNum, int pandaNum , int amountToAdd) { ArrayList<Sprite> makeObstacle = new ArrayList<Sprite>(); for(int i = 0; i < sheepNum; i++){ Sprite makeSheep = new Sheep(CountryRunnerTitleScreen.difficulty); makeObstacle.add(...
8
public void actionPerformed(ActionEvent ae){ String message = jtxtfldEnterMessage.getText(); if(validateMessage(message)){ ChatMessage chatMessage = new ChatMessage(user.getNick(), user.getID(), channel.getChannelID(), jtxtfldEnterMessage.getText()); writtenMessages.add(chatMessage); jtxtfldEnterMessa...
1
public boolean fire(int r, int c) throws IOException { if (1 > r || 1 > c || 10 < r || 10 < c) { invalidShot = true; } else { switch (board[r][c]) { case "x": case "!": return unavailibleShot(); case "-": return missedShot(r, c); ...
8
public boolean run() { int i; ok = false; stdout.clear(); stderr.clear(); try { String line; String[] cmd = command.split(" "); ProcessBuilder pb= new ProcessBuilder(cmd); pb.redirectErrorStream(true); ...
6
public List<?> list(Class<?> clazz) { String simpleName = clazz.getSimpleName(); String hql = "from " + clazz.getName() + " " + simpleName; return getSession().createQuery(hql).list(); }
2
public double ranGamma(double k, double theta) { boolean accept = false; if (k < 1) { // Weibull algorithm double c = (1 / k); double d = ((1 - k) * Math.pow(k, (k / (1 - k)))); double u, v, z, e, x; do { u = rand.nextDouble(...
6
public void setNeighbors( int[] truckdrivin){ for(int g = 0; g <= truckdrivin.length-1; g++){ switch(inmode){ case 0: break; case 1: if(truckdrivin[g] > 0){neighborstate[g] = 1;} else{neighborstate[g] = 0;} break; case 2: neighborstate[g] = truckdrivin[g]; break; default: neighborstate[g] = t...
5
@Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { final MOB target=this.getTarget(mob,commands,givenTarget); if(target==null) return false; if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; final boolean success=prof...
9
private void processFunctions(FileData coverageData, StringBuilder lcov) { int total = 0; int hit = 0; for (int functionNumber = 0; functionNumber < coverageData.getFunctions().size(); functionNumber++) { total++; Integer functionHits = coverageData.getFunctions().get(fun...
2
private RequestDispatcher goRegistrazione(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (request.getParameter("username") == null || request.getParameter("password") == null || request.getParameter("password2") == null) { return getServletContext...
5
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final EventsType other = (EventsType) obj; if (this.row != other.row) { return false; } ...
9
public boolean mousedown(Coord c, int button) { for (Widget wdg = lchild; wdg != null; wdg = wdg.prev) { if (!wdg.visible) continue; Coord cc = xlate(wdg.c, true); if (c.isect(cc, (wdg.hsz == null) ? wdg.sz : wdg.hsz)) { if (wdg.mousedown(c.add(cc.inv()), button)) { return (true); } } }...
5
public void setLineEndingAtEnd(boolean lineEndingAtEnd) { this.lineEndingAtEnd = lineEndingAtEnd; }
0
public static String escapeIllegalXpathSearchChars(String s) { StringBuilder sb = new StringBuilder(); sb.append(s.substring(0, (s.length() - 1))); char c = s.charAt(s.length() - 1); // NOTE: keep this in sync with _ESCAPED_CHAR below! if (c == '!' || c == '(' || c == ':' || c ==...
9
String token() { if (idx == null && val.getClass().isArray()) { int len = Array.getLength(val); StringBuilder b = new StringBuilder(); for (int i = 0; i < len - 1; i++) { b.append(token + "[" + i + "],"); } b...
3
static void parcoursArbre(Element e) { String s = ""; if (e.getAttributeValue("type").equals("node")) { //l'élément est un noeud Element question = e.getChild("question"); s += question.getAttributeValue("name") + "<"; s += question.getAttributeValue("patron") + " ?"; System.out.p...
5
private void doFirstStep(Vertex<Text, Text, NullWritable> vertex) { // First superstep is special, because we can simply look at the neighbors // On first step value is not set, so using id Text currentComponent = vertex.getId(); for (Edge<Text, NullWritable> edge : vertex.getEdges()) {...
4
private static BeanInfo getExplicitBeanInfo(Class<?> beanClass) { String beanInfoClassName = beanClass.getName() + "BeanInfo"; //$NON-NLS-1$ try { return loadBeanInfo(beanInfoClassName, beanClass); } catch (Exception e) { // fall through } int index = bea...
9
@Override public AcknowledgementService handle(LocalDevice localDevice, Address from, OctetString linkService) throws BACnetException { AtomicWriteFileAck response; BACnetObject obj; FileObject file; try { // Find the file. obj = localDevice.getOb...
9
public void increment(int by) { // if given value is negative, we have to decrement if (by < 0) { decrement(Math.abs(by)); return; } // check if we would overflow int space_up = max - value; if (by > space_up) { // we simply use max value = max; } else { // no overflowing, this is easy ...
2
@Override public Iterator<T> iterator() { return new Iterator<T>() { boolean hasNext; T next; final Iterator<? extends T> i1 = s1.iterator(); Iterator<? extends T> i2; @Override public boolean hasNext() { if (i1.hasNex...
7
public String getQuery() { if (_query == null) throw new java.util.NoSuchElementException(); return _query; }
1
public void setWalkable(int x, int y, boolean bool) { if(x < 0 || x > width || y < 0 || y > height){ throw new IllegalArgumentException("X & Y must be more than 0, but less than w/h"); } nodes[x][y].setWalkable(bool); }
4
public static void main(String[] args) { // Nature creates two new animals, gives sparrow the ability to fly. System.out.println("Nature provides birdy the ability to fly."); System.out.println("Nature doesn't give kitty the abilty to fly."); Cat kitty = new Cat("kitty", 6f, new NoFlyingAbilty()); Sparrow bir...
0
protected String toXMLFragment() { StringBuffer xml = new StringBuffer(); if (isSetTokenId()) { xml.append("<TokenId>"); xml.append(escapeXML(getTokenId())); xml.append("</TokenId>"); } if (isSetFriendlyName()) { xml.append("<FriendlyName>"...
8
public String getContent() { return mContent; }
0
public void Email(JTextField a) { a.addKeyListener(new KeyAdapter() { public void keyTyped(KeyEvent e) { char c = e.getKeyChar(); if (Character.isLetterOrDigit(c) || c == '_' || c == '-' || c == '@' || c == '.' || c == 'ñ') { }else...
6
public void update(long deltaMs) { ArrayList<BaseProcess> toAttach = new ArrayList<BaseProcess>(); Iterator<BaseProcess> it = processes.iterator(); while(it.hasNext()) { BaseProcess current = it.next(); if(current.getState() == BaseProcess.P...
9
public void mouseDragged(MouseEvent e) { mouseMoved(e); }
0
public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D) g; super.paintComponent(g2); // Draw randomly generated nodes for (Node p : myGraph.getNodes()) drawPoint(g2, p.x, p.y); //Draw selected Nodes g2.setColor(Color.blue); if (fromNode != null) ...
4
@SuppressWarnings("SleepWhileInLoop") private Repository forkAndWait(GitHubClient gitHubClient, Repository masterRepository) throws IOException { Properties properties = ApplicationProperties.getProperties(); RepositoryService repositoryService = new RepositoryService(gitHubClient); Reposito...
3
public Class getTypeClass() throws ClassNotFoundException { switch (typecode) { case TC_LONG: return Long.TYPE; case TC_FLOAT: return Float.TYPE; case TC_DOUBLE: return Double.TYPE; default: throw new AssertError("getTypeClass() called on illegal type"); } }
3
@Override public void e(float sideMot, float forMot) { if (this.passenger == null || !(this.passenger instanceof EntityHuman)) { super.e(sideMot, forMot); this.W = 0.5F; // Make sure the entity can walk over half slabs, // instead of jumping return; } EntityHuman human = (EntityHuman) this.passe...
8
public boolean equals(Object o) { if ( !(o instanceof DTNode) ) return false; if ( o == this ) return true; DTNode n = (DTNode)o; if ( n.left_bit != left_bit ) return false; if ( n.right_bit != right_bit ) return false; if ( !n.label.equals(label) ) return false; ...
8
public void checkType(Symtab st) { exp1.setScope(scope); exp1.checkType(st); exp2.setScope(scope); exp2.checkType(st); String exp1Type = exp1.getType(st); String exp2Type = exp2.getType(st); if (!exp1Type.equals(exp2Type)) { if (!(st.lookup(exp1Type) != null && exp2Type.equals("null"))) { if (!exp1...
7
public void setProduct(Product product) { this.product = product; }
0
public boolean collision(int index1, int index2) { if (getImage(index1) == null || getImage(index2) == null) { return false; } if (getImage(index1).getBounds().intersects( getImage(index2).getBounds())) { return (getImage(index1).isActive() && getImage(index2).isActive()); } return false; }
4
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 String expresion(Nodo chk){ String tem=new String(); Iterator e=chk.getNodo().iterator(); switch(chk.getToken()){ case Suma: tem+=this.expresion(((Nodo)e.next())); tem+=this.expresion(((Nodo)e.next())); tem+="\n...
7
@Override public void restart() throws MusicPlayerException { if ( this.mStreamPlayerRunnable == null ) { throw new IllegalStateException( "can't restart. not started yet" ); } if ( this.mStreamPlayerRunnable.isStopped() ) { try { this.mStreamPlayerRunnable.join(); } catch (InterruptedException e...
3
private int pickAmount() { Random rand = new Random(); if (itemQuality == quality.poor) { return rand.nextInt(config.getPoorMaxAmount() - config.getPoorMinAmount() + 1) + config.getPoorMinAmount(); } else if (itemQuality == quality.average) { return rand.nextInt(config.ge...
4
public static List<Mixer> getMixers() { Info[] infos = AudioSystem.getMixerInfo(); List<Mixer> mixers = new ArrayList<Mixer>(infos.length); for (Info info : infos) { Mixer mixer = AudioSystem.getMixer(info); mixers.add(mixer); } return mixers; }
1
private void btnAceptarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAceptarActionPerformed if (inicio.principal.datos == null) { try { inicio.d.setAntiguedad(Integer.parseInt(txtAntiguedad.getText())); inicio.d.setHoraArma(Double.parseDouble(t...
3
public HashMap<String,String> getConfigurationData() { HashMap<String,String> l_tmp_map; Scanner l_reader; Scanner l_line_scanner; String l_tmp_key; String l_tmp_val; if( this.configuration_file == null) return null; l_tmp_map = new HashMap<String,String>(); l_reader =...
7
public JSONObject getJSONObject(int index) throws JSONException { Object o = get(index); if (o instanceof JSONObject) { return (JSONObject)o; } throw new JSONException("JSONArray[" + index + "] is not a JSONObject."); }
1
public State getOldBlock() { return myOldBlock; }
0
public String consumeToIgnoreCase(String seq) { int start = pos; String first = seq.substring(0, 1); boolean canScan = first.toLowerCase().equals(first.toUpperCase()); // if first is not cased, use index of while (!isEmpty()) { if (matches(seq)) break; ...
5
public void setId(String id) { this.id = id; }
0
public void setBullet(int id, int x, int y){ switch (id) { case 1:{ this.id = 1; this.pointX = x; this.pointY = y; this.bulletSpeed = 2; this.shotSpeed = 4; this.damage = 1...
3
public void setComments(String comments) { if (comments != null && comments.trim().length() > 256) { comments = comments.substring(0, 256); } this.comments = comments; }
2
public String getPassword() { return this.password; }
0
public int put(int key, int n) { int pos, t = 1; while (t < m) { pos = toHash(key, t); if (table[pos] == null) { table[pos] = new HashEntry(key, t); // ???????????????????????????????????????????????????????????????????????????????????? // ...
3
public int getScore() { return score; }
0
public void loppuukoPeli() { if (this.logiikka.tarkistaVoitto(1)) { this.tekstiKentta.setText("Risti on voittaja!"); this.logiikka.setPelinTila(0); } else if (this.logiikka.tarkistaVoitto(2)) { this.tekstiKentta.setText("Nolla on voittaja!"); this.logiikka...
3
private void loadHighScore(){ try{ File f = new File(saveDataPath, fileName); if(!f.isFile()){ createSaveData(); } BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(f))); highScore = Integer.parseInt(reader.readLine()); reader.close(); } catch(Exception...
2
private synchronized void seek(RandomAccessFile randomaccessfile, int pos) throws IOException { if (pos < 0 || pos > 0x3c00000) { System.out.println("Badseek - pos:" + pos + " len:" + randomaccessfile.length()); pos = 0x3c00000; try { Thread.sleep(1000L); } catch (Exception exception) { } } ran...
3
public void nextPermutation(int[] num) { List<Integer> list = new ArrayList<Integer>(); int length = num.length; if(num == null||length == 0) return ; int big = num[length-1]; int target = num[length-1]; int index = -1; for(int i =num.length-1 ;i>0;i-...
9
public boolean SetAnnounced(String player, Date newdate) { String datestr = ""; if (newdate != null) { datestr = new SimpleDateFormat("yyyy-MM-dd").format(newdate); } String query = "UPDATE birthdaygift SET lastAnnouncedDate=? WHERE player=?"; dbcon.PreparedUpdate(query, new String[]{datestr, player.toLowe...
1
private boolean testeSiegInReihe(Spieler spieler) { for (int reihennummer = 1; reihennummer <= Spielfeld.ANZAHL_REIHEN; reihennummer++){ int sequenceCounter = 0; for (int spaltennummer = 1; spaltennummer <= Spielfeld.ANZAHL_SPALTEN; spaltennummer++){ Stein steinfarbe = spielfeld.getSteinfarbe(spaltennummer,...
5
@Override public boolean accept(File dir, String name) { try{ if (name.substring(name.lastIndexOf(".")).equalsIgnoreCase(".dat")) return true; } catch (Exception e){ } return false; }
2
public void configureAction(Map<String, Object> config) { if (config == null) { this.task = null; this.gruntFile = null; this.page = null; } else { this.task = (String) config.get(Activator.KEY_TASK); this.gruntFile = (IFile) config.get(Activator.KEY_FILE); this.page = (IWorkbenchPage) config.get(...
1
public Dysk produkujemyDysk(){ return new DyskDlaLaptopa(); }
0
public void print(ArrayList<Double> values, String fileName, ArrayList<String> description) { String outString = ""; if(!_titlesPrinted){ outString += "\n"; _titlesPrinted = true; for (int i = 0 ; i < description.size(); i ++){ outString += description.get(i)+","; } outString += "\n"; } for(i...
3
@Override public long getMass() { final long mass=this.mass; if(mass<0) { int newMass=phyStats().weight(); for(final Enumeration<Room> r=getProperMap(); r.hasMoreElements();) { final Room R=r.nextElement(); if(R!=null) { for(int i=0;i<R.numItems();i++) { final Item I=R.getIt...
7
@Override public void onDraw(Graphics G, int viewX, int viewY) { if (X>viewX&&X<viewX+300&&Y>viewY&&Y<viewY+300) { G.setColor(Color.DARK_GRAY); G.fillArc((int)(X-radius/2)-viewX, (int)(Y-radius/2)-viewY, radius, radius, 0, 360); G.setColor(Color.GRAY)...
4
@Override @SuppressWarnings("unchecked") protected <E> E getApiResponse(AbstractContentHandler contentHandler, InputStream inputStream, Class<E> clazz) throws ApiException { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); if (logger.isInfoEnabled()) { inputStream = new InputStreamSplitter(inp...
2
protected void householder( int j ) { // find the element with the largest absolute value in the column and make a copy int index = j+j*numCols; double max = 0; for( int i = j; i < numRows; i++ ) { double d = u[i] = dataQR[index]; // absolute value of d ...
7
public void update(String key){ synchronized(this.cache){ U fromCache = cache.get(key); if(!(fromCache == null)){ ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream objOut; try{ objOut = new ObjectOutputStream(baos); objOut.writeObjec...
2
@SuppressWarnings("unchecked") private void parseQuery(String query, Map<String, Object> parameters) throws UnsupportedEncodingException { if (query != null) { String pairs[] = query.split("[&]"); for (String pair : pairs) { String param[] = pair.split("[=]"); String key = null; String value = n...
8
@Override public void update(Document document) { NodeList node = null; NodeList items = null; Element element = null; node = document.getElementsByTagName("SomaticContext"); element = (Element) node.item(0); items = element.getElementsByTagName("FrameState"); if (!synchronizeMode && !updateFlag) ret...
8
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final PeopleInfo other = (PeopleInfo) obj; if (this.id != other.id && (this.id == null || !this.id.equals(other...
5
private void readExcelFile(){ ArrayList<String> readTmp = new ArrayList<String>(); //儲存讀Excel用 Train tmp = new Train(); //儲存單筆火車用 try { InputStream excelFile = new FileInputStream("src/data_readme/Input_data_set_1.xls"); //要讀的檔案 jxl.Workbook readWorkBook = Workbook.getWorkbook(excelFile); //將其讀入work...
6
@Test public void testFailingAssumptionWithoutTestLinkAnnotation() { assumeNoException(new IllegalStateException("Could not connect to server")); }
0
private void pop(char c) throws JSONException { if (this.top <= 0) { throw new JSONException("Nesting error."); } char m = this.stack[this.top - 1] == null ? 'a' : 'k'; if (m != c) { throw new JSONException("Nesting error."); } this.top -= 1; ...
5
private int jjMoveStringLiteralDfa1_0(long active0) { try { curChar = input_stream.readChar(); } catch(IOException e) { jjStopStringLiteralDfa_0(0, active0); return 1; } switch(curChar) { case 97: return jjMoveStringLiteralDfa2_0(active0, 0x30000L); case 100: ret...
7
private boolean isValidState(String state){ if(state.equals(WumpusConsts.STATE_ALIVE) || state.equals(WumpusConsts.STATE_DEAD) || state.equals(WumpusConsts.STATE_GOAL)) { return true; } return false; }
3
@Override public int castingQuality(MOB mob, Physical target) { if(mob!=null) { if(mob.isInCombat()) return Ability.QUALITY_INDIFFERENT; if(CMLib.flags().isSitting(mob)) return Ability.QUALITY_INDIFFERENT; if(!CMLib.flags().isAliveAwakeMobileUnbound(mob,false)) return Ability.QUALITY_INDIFFER...
9
public static void main(String[] args) { RendezvousObject robj = new RendezvousObject(); CallerThread cth = new CallerThread(robj); ServiceThread sth = new ServiceThread(robj); new Thread(cth, "Caller").start(); new Thread(sth, "Service").start(); }
0
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; TimeStamp other = (TimeStamp) obj; if (procName == null) { if (other.procName != null) return false; } else if (!procName.equals(other.p...
7
@Override public void applyTemporaryToCurrent() { copyHashMap(tmp,cur); }
0
public static double quantile(double[] vals, double phi) { if (vals.length == 0) { return 0.0; } double[] sortedElements = Arrays.copyOf(vals, vals.length); Arrays.sort(sortedElements); int n = sortedElements.length; double index = phi * (n - 1); int...
2
protected JTable createTable(final Transition transition) { TableModel model = createModel(transition); final TipLambdaCellRenderer[] renders = new TipLambdaCellRenderer[model .getColumnCount()]; for (int i = 0; i < model.getColumnCount(); i++) renders[i] = new TipLambdaCellRenderer(model.getColumnName(i))...
5
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page ...
5
public void render(int xMovement, int yMovement) { if(RenderWallSprite) { for (int y = 0; y < height; y++) { int yp = y + yMovement; if (yp < 0 || yp >= height) continue; for (int x = 0; x < width; x++) { int xp = x + xMovement; if (xp < 0 || xp >= width) continue; int PR = wall.SIZE - 1...
9
@Override public Vector2 mapSample(Vector2 sample) { sample.setX(sample.getX() * 2 - 1); sample.setY(sample.getY() * 2 - 1); double r; double phi; if (sample.getX() > -sample.getY()) if (sample.getX() > sample.getY()) { r = sample.getX(); phi = sample.getY() / sample.getX(); } else { r = sample.getY(); p...
5
public boolean makeMove(String move) { Field[][] fields = gameboard.getFields(); int centerX = fields.length/2; int centerY = fields[centerX].length/2; if((move.equals("N") && !gameboard.isMoveable(centerX, centerY-1)) || (move.equals("E") && !gameboard.isMoveable(centerX+1, centerY)) || (move.eq...
9
private boolean addIfNeededToPruneSet(TagNode tagNode, CleanTimeValues cleanTimeValues) { if ( cleanTimeValues.pruneTagSet != null ) { for(ITagNodeCondition condition: cleanTimeValues.pruneTagSet) { if ( condition.satisfy(tagNode)) { addPruneNode(tagNode, cleanTim...
8
public void draw(Graphics2D g2) { BufferedImage image = animation.getImage(action); if (lookingRight) { g2.drawImage(image, (int) xPos, (int) yPos, width, height, null); } else { g2.drawImage(image, (int) xPos + width, (int) yPos, -width, height, null); } }
1
* @throws Exception */ private JMethod generateCommandSignature(JDefinedClass jClusterInterface, ZclCommandDescriptor zclCommandDescriptor, boolean addContext) throws Exception { if (zclCommandDescriptor.isResponse()) return null; // FIXME: the return type depends on the returned response!!!! JType jR...
9
public void set(int index, int datum) { RangeCheck(index); data[index] = datum; }
0
private int[] getStyle(int index) { if (m_styleOffsets==null || m_styles==null || index>=m_styleOffsets.length) { return null; } int offset=m_styleOffsets[index]/4; int style[]; ...
9
public void insert(Pnode node){ count++; if(pq==null){ pq=node; } else if(pq.freq>node.freq){ node.next=pq; pq=node; } else{ Pnode temp = pq; Pnode prev = null; while(temp.next!=null && temp.freq<=nod...
5
public void setWindow(LatLng center, double deltaLat, double deltaLng) { if (deltaLat == Double.NaN || deltaLat == Double.POSITIVE_INFINITY || deltaLat == Double.NEGATIVE_INFINITY) throw new IllegalArgumentException("Invalid latitude delta."); if (deltaLng == Double.NaN || deltaLng == Double.POSITIVE_INFINIT...
6
public void palyaEpites(Mezo[][] mezok, List<List<Mezo>> utvonalak) { this.utvonalak = utvonalak; createPrototypes(); karakterek = new ArrayList<GyuruSzovetsege>(); ellensegeSzama = 0; for (int x = 0; x < getMezok().length; x++) { for (int y = 0; y < getMezok()[x].length; y++) { getMezok()[x][y].setSzo...
8