text
stringlengths
14
410k
label
int32
0
9
public void output() { ListElement current = head; while (current != tail.next()) { System.out.print(current.getValue() + " "); current = current.next(); } System.out.println(); }
1
private int calculateMinN(List<Predicate> predicates) { count = new HashMap<String, Integer>(); for(Predicate predicate : predicates) { if(predicate instanceof BinaryContains) { // ignore them for the time being } else if(predicate instanceof Contains) { this.addToCount(((Contains) predicate).ge...
9
private static void appendJSONPair(StringBuilder json, String key, String value) throws UnsupportedEncodingException { boolean isValueNumeric = false; try { if (value.equals("0") || !value.endsWith("0")) { Double.parseDouble(value); isValueNumeric = true; } } catch (NumberFormatException e) { ...
5
public static void main(String[] args) { MyClass myClass = new MyClass(); }
0
@Override public String toString(){ return monster.toString(); }
0
private void talkCommand(String input) { if (currentRoom.getNPCsInRoom() != null) { boolean pass = false; if (input.equals("")) { //If the player doesn't specify someone currentRoom.getNPCsInRoom()[0].printDefaultDialogue(); } else { ...
5
@Override public void setBounds(int x, int y, int width, int height) { if (mIgnoreResizeOK || mResizeOK) { super.setBounds(x, y, width, height); } }
2
public double getAllweight() { double weights = 0; for(ValueFace vf : this.valuesFaces){ weights += vf.weight; } return weights; }
1
private void createItems() { //Create all items from XML file and set all properties Map<Integer, HashMap<String, String>> parentMap = itemsXML.getXMLData(); Iterator<Map.Entry<Integer, HashMap<String, String>>> parentXML = parentMap.entrySet().iterator(); int itemRoomID = 0...
6
public final static void main(final String[] args) { Random rnd = new Random(); int len = rnd.nextInt(90)+10; System.out.print("Test Counting Bloom Filter\n"); System.out.print("==========================\n"); CountingBloomFilter cbf = new CountingBloomFilter(len); System.out.print("Created empty filter.\n"...
7
private void fillBoxes() { for (int i = -5; i <= 5; i++) { cmbYear.addItem(calendar.get(Calendar.YEAR) + i); } for (int j = 1; j <= 12; j++) { cmbMonth.addItem(j); } cmbYear.setSelectedItem(calendar.get(Calendar.YEAR)); cmbMonth.setSelectedItem(cal...
2
public static void printDarsSection(final DARSInfo.CLASS[] darsClass) { try { File file = new File("bwskfcls.P_GetCrse.htm"); final BufferedReader br = new BufferedReader(new FileReader(file)); String input = null; M: while ((input = br.readLine()) != null) { if(input.startsWith(VAR.CLASSKEY)) {...
8
public AnnotationVisitor visitAnnotation( final String desc, final boolean visible) { AnnotationVisitor av = super.visitAnnotation(desc, visible); if (mv != null) { ((TraceAnnotationVisitor) av).av = mv.visitAnnotation(desc, visible); } return av; }
1
ParticipantListItf deserializeFromJson(String json) { AutoBean<ParticipantListItf> bean = AutoBeanCodex.decode(factory, ParticipantListItf.class, "{\"participants\": " + json+ "}"); return bean.as(); }
0
public AddTrapStatePane(AutomatonEnvironment environment) { myAutomaton = (FiniteStateAutomaton) environment.getAutomaton().clone(); JFrame frame = Universe.frameForEnvironment(environment); setLayout(new BorderLayout()); JPanel labels = new JPanel(new BorderLayout()); JLabel mainLabel = new JLabel(); J...
0
public void ControlMaster(Vector<String> labels, Vector<String> instruct, Vector<String> operator, Vector<String> comments, Vector<String> machCod, Vector<String> contLoc) { for(int i = 0 ; i < 24; i++) { ((JTextField) a [i]).setText(labels.elementAt(i)); } for(int j = 0 ; j < 24; j++) { ((JTextF...
6
private static int buildLeavesSet(final String filePath) throws IOException{ File leavesFile = new File(filePath); FileReader leavesFileReader = new FileReader(leavesFile); BufferedReader br = new BufferedReader(leavesFileReader); int count = 0; String line; while((line = br.readLine()) != null){ count++...
1
public int solve() { int wordLength = myCombinations[0].length(); // if myLength is even less than wordLength, return 0 (impossible) if (myLength < wordLength) return 0; preprocess(); // rolling array int currentBeadLength = wordLength; // length for dp1 int[] dp1 = new int[myCombinations.length]; in...
5
@Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (SampleRoundingContext.class.isInstance(obj)) { final SampleRoundingContext other = (SampleRoundingContext) obj; if (currencyPair.equals(other.currencyPair) && tenor.equals(other.tenor)) { if (getRole() == nu...
5
public void addRow(Object[] array) { // data[rowIndex][columnIndex] = (String) aValue; // add row to database EntityTransaction userTransaction = manager.getTransaction(); userTransaction.begin(); Project newRecord = projectService.createProject((String) array[0], (String) array[1], (String) array[2], (S...
1
public void render(int xMovement, int yMovement, Renderer gfx) { gfx.setOffset(xMovement, yMovement); int x1 = xMovement / Tile.SIZE; int x2 = (xMovement + gfx.getWidth() + 16) / Tile.SIZE; int y1 = yMovement / Tile.SIZE; int y2 = (yMovement + gfx.getHeight() + 16) / Tile.SIZE; ...
3
public boolean canDeselect(DefaultMutableTreeNode node) { boolean permission = true; if (node instanceof NumberNode) { NumberNode iteratorChild = (NumberNode) m_TreeModel.getChild(this, 1); NumberNode maxChild = (NumberNode) m_TreeModel.getChild(this, 2); //the one case whe...
7
@Override public void actionPerformed(ActionEvent event) { Component comp = getFocusOwner(); if (comp instanceof JTextComponent) { ((JTextComponent) comp).cut(); } else { Cutable cutable = getTarget(Cutable.class); if (cutable != null && cutable.canCutSelection()) { cutable.cutSelection(); } } ...
3
public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int sum = 0; String bin = Integer.toBinaryString(n); for(int i = 0; i < 32; i++) { if((n&1) == 1) { sum++; } n=n>>1; } System.out.printf("%s - %s",bin,sum); }
2
private String formatCreateTable(String sql) { StringBuffer result = new StringBuffer().append( "\n " ); StringTokenizer tokens = new StringTokenizer( sql, "(,)'[]\"", true ); int depth = 0; boolean quoted = false; while ( tokens.hasMoreTokens() ) { String token = tokens.nextToken(); if ( isQuote( t...
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...
7
public int cdlShootingStarLookback( ) { return ((( ((( (this.candleSettings[CandleSettingType.BodyShort.ordinal()].avgPeriod) ) > ( (this.candleSettings[CandleSettingType.ShadowLong.ordinal()].avgPeriod) )) ? ( (this.candleSettings[CandleSettingType.BodyShort.ordinal()].avgPeriod) ) : ( (this.candleSettings[Ca...
3
public void findMainLabels() { clusters = new int[nLabels + 2]; nClusters = 0; /* only one label */ if (nLabels == 1) { nClusters++; clusters[nClusters] = 1; clusters[nClusters + 1] = Integer.MAX_VALUE; } else { boolean reached[] = new boolean[nLabels+1]; int...
8
private void gameLoop() { // This value would probably be stored elsewhere. final double GAME_HERTZ = 30.0; // Calculate how many ns each frame should take for our target game // hertz. final double TIME_BETWEEN_UPDATES = 1000000000 / GAME_HERTZ; // At the very most we will update the game this many times b...
9
public String getFolderPath() { return folderPath; }
0
public void leaveClan (int playerId, int clanId) { Client c = (Client)PlayerHandler.players[playerId]; if(clanId < 0) { c.sendMessage("You are not in a clan!"); return; } if(clans[clanId] !=null) { if(PlayerHandler.players[playerId].playerName.equalsIgnoreCase(clans[clanId].owner)) { messageToClan...
6
public void setInstances(Instances ins) throws Exception { if (ins.numAttributes() > 512) { throw new Exception("Can't display more than 512 attributes!"); } if (m_span == null) { m_span = new JPanel() { private static final long serialVersionUID = 7107576557995451922L; public void pa...
7
public Object nextValue() throws JSONException { char c = nextClean(); String string; switch (c) { case '"': case '\'': return nextString(c); case '{': back(); return new JSONObject(this); case '[': ...
7
@Override public int compareTo(VideoSection o) { int startCompare = this.start.compareTo(o.start); return startCompare != 0 ? startCompare : this.end.compareTo(o.end); }
1
public void moveEntityLeft() { for (Entity entity : entitys) { boolean blocked = false; for (Entity platform : platforms) { if (platform.entityType == EntityType.Solid) { if (platform.intersects(new Square(entity.getX() -6, entity.getY(), entity.getWid...
5
public void setMsgID(String msgID) { this.msgID = msgID; }
0
String forgotPass() throws ClassNotFoundException, InstantiationException, IllegalAccessException, SQLException { Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection con = DriverManager.getConnection(url, dbUser, dbPass); Statement stm = con.createStatement(); String q2 = "...
1
public Key delMin() { if (N == 0) throw new RuntimeException("Priority Queue Underflow"); Key min = pq[1]; pq[1] = pq[N]; // half exchange pq[N--] = null; sink(1); // resize if (N == pq.length / 4) pq = resize(pq, pq.length / 2); return min; }
2
public List findBySampleInput(Object sampleInput) { return findByProperty(SAMPLE_INPUT, sampleInput); }
0
public static void main(String[] args) throws IOException{ DBInterpreter interpreter; DBUserController userController; DBExecutor executor; Query query; InputStream input; if (args.length != 1) { System.out.println("Use: minidbms <...
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
public static void deplacement(int posxa,int posya,int direction) { int ppf= 5; for(int i=0; i<2; i++) { switch(direction) { case 1: posxa+=ppf; break; case 2: posxa-=ppf; break; case 3: posya+=ppf; break; case 4: posya-=ppf; break; ...
5
public boolean entityFree(int x, int y) {//Free for entities (meaning no blockable entities or tiles currently here) int key = genKey(x, y); boolean tileFree = false; if (tileHashMap.containsKey(key)) { tileFree = tileHashMap.get(key).isPassable(); } boolean entFree =...
6
private void goRoom(Command command) { if(!command.hasSecondWord()) { // if there is no second word, we don't know where to go... System.out.println("Go where?"); return; } Direction direction = null; try { direction = Directi...
6
public void printBreadthFirst() { NoeudRN z= racine; Queue<NoeudRN> noeuds= new LinkedList<NoeudRN>(); if(z != sentinelle){ noeuds.add(z); while(!noeuds.isEmpty()){ z= noeuds.remove(); System.out.println(z.toString()); if(z.getGauche() != sentinelle) noeuds.add(z.getGauche()); if(z....
4
public void scrollCellToView(JTable table, int rowIndex, int vColIndex) { if (!(table.getParent() instanceof JViewport)) { return; } JViewport viewport = (JViewport) table.getParent(); Rectangle rect = table.getCellRect(rowIndex, vColIndex, true); Rectangle viewRect =...
9
@Override public String getOnePersonAsJson(long id) { for (Person person : persons) { if (person.getId() == id) { return trans.toJson(person); } } return null; }
2
public boolean equals(Object var1) { if(this == var1) { return true; } else if(var1 != null && this.getClass() == var1.getClass()) { J_JsonStringNode var2 = (J_JsonStringNode)var1; return this.field_27224_a.equals(var2.field_27224_a); } else { return false; } ...
3
public void setTimeout(long timeout) { if (timeout < 1) { throw new ComponentException("Illegal timeout value: " + timeout); } this.timeout = timeout; }
1
public boolean _setLevel(int level) { if(level > 0) { this.level = level; return true; } else { return false; // Invalid level given. } }
1
public void setOperandAt(final Block block, final Def def) { if (def != null) { operands.put(block, def); } else { operands.remove(block); } }
1
public static void cppOutputSignatures(Keyword accesscontrolmode, Cons signatures) { Stella.cppIndent(); if (accesscontrolmode == Stella.KWD_PUBLIC) { ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.println("public:"); } else if (accesscontrolmode == Stella.KWD_PRIVATE) { ((Outp...
6
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
@Override public List<Tile> getDiscardCandidates(Set<Tile> aliveTiles, Collection<Tile> candidates) { // 先保证顺子刻子的定义都是3张牌、将牌是2张牌 if (SHUNZI.size() != 3 || KEZI.size() != 3) throw new RuntimeException(); if (JIANG.size() != 2) throw new RuntimeException(); if (aliveTiles.isEmpty()) return emptyList(); ...
7
@Override protected void lock() { while (true) if (!calcLocker.isWriteLocked() && calcLocker.writeLock().tryLock()) if (calcLocker.getWriteHoldCount() != 1) calcLocker.writeLock().unlock(); else if (hasAdjustment() == PRO_ADJ_PAR ...
6
public synchronized void addPlayer(String data) { try { boolean exists = false; int count = 1; String log = ""; StringTokenizer ST = new StringTokenizer(data); ST.nextToken(); // Zieladresse, ist hier uninteressant String name = ST.nextToken(); int min = Integer.parseInt(ST...
6
public void performSorting() { for(Racer r : racers) { int bucketIndex = (Math.abs(r.getStart() - minStartTime)) % racers.length; for(int i = 0/* bucketIndex*/ ; i < bucket.length ; i++) { if(bucket[i].maxEndTime < r.getEnd()) { ...
8
public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = 0, cnt = 1; HDOJ1069 hdoj1069 = new HDOJ1069(); while ((n = scanner.nextInt()) > 0) { hdoj1069.init(); while (n-- > 0) { hdoj1069.handleInput(scanner.nextInt...
2
@Override public void ejecutar(Stack<Valor> st, MemoriaDatos md, Cp cp) throws Exception { if (st.size() < 2) throw new Exception("RESTA: faltan operandos"); Valor op1 = st.pop(); Valor op2 = st.pop(); if (op1 instanceof Entero && op2 instanceof Entero) { st.push(new Entero(((int) op2.getValor()) -...
3
public static void handlePart(String channel) { if ( channel.isEmpty() ) { channel = getActiveTab().getTabName(); if ( !isChannelTabActive() ) { showNotActiveChannelWarning(); return; } } ChannelTab channelTab = getCurrentServe...
3
private Rectangle getBounds(PaddlePosition pos) { Rectangle r = null; if(pos == PaddlePosition.BOTTOM){ this.bounds = new Rectangle(GamePanel.GAMEWIDTH/2, GamePanel.GAMEHEIGHT/2, 100,20); r = new Rectangle(0,GamePanel.GAMEHEIGHT-50,GamePanel.GAMEWIDTH,50); col = n...
4
public static String balance(String s) { StringBuilder sb = new StringBuilder(); boolean valid[] = new boolean[s.length()]; char[] str = s.toCharArray(); Stack<Integer> st = new Stack<Integer>(); for (int i = 0; i < str.length; i++) { if (str[i] == '(') { st.push(i); } else...
9
public Map<String, Integer> call() throws Exception { Map<String, Integer> tmpMap = new HashMap<>(); // Tant qu'il reste des données à traiter while (i < stringArray.length) { try { if ((i+intervalle)>=stringArray.length) { tmpMap = proxy.calcul(Arrays.copyOfRange(stringArray, i, stringArray....
4
public static void setBreedingProbability(double breeding_probability) { if (breeding_probability >= 0) Grass.breeding_probability = breeding_probability; }
1
@Override public boolean containsAll( Collection<?> collection ) { for (Object element : collection) { if (!trie.containsKey( element )) { return false; } } return true; }
3
public synchronized void setMyLunchTime(double arrivalTime) { if(arrivalTime < 300) { lunchTime = (randNumber.nextInt(300 - (int)arrivalTime) + 300); } else if (arrivalTime == 300) { lunchTime = 300; // represents 30 minutes simulated time (300ms) } }
2
public static boolean isValidType(String type, Symtab st) { if (!(type.equals("int") || type.equals("decimal") || type.equals("String") || type.equals("message") || type.equals("boolean") || type.startsWith("list") || st.lookup(type) != null)) return false; if (type.startsWith("list")) return ...
8
public void act() { if (backToMenuButton.wasClicked()) { // go to start state gameScreen.setState(gameScreen.getStartState()); } String key = gameScreen.getKey(); if (arrowLeftButton.wasClicked() || (key != null && key.equals("left"))) { currentHighscoreLevel--; if (currentHighscoreLevel < 1) { ...
9
public boolean importData(JComponent receiverComp, Transferable t) { if (canImport(receiverComp, t.getTransferDataFlavors())) { try { for (int i = 0; i < GridMouseResultsModelTransferable.flavors.length; i++) { if (t.isDataFlavorSupported(GridMouseResultsModelTran...
6
@Override public void characters(char ch[], int start, int length) throws SAXException {}
0
public void PrintSetupSimple(Layout setup) { for (int i = setup.getGenMin(); i <= (setup.getGenMax() * 1.5) - 2; i++) { System.out.print(" "); } System.out.println("[" + setup.RoomCount() + "]"); for (int i = setup.getGenMin(); i <= (setup.getGenMax() * 3) + 1; i++) { System.out.print("■"); } Sys...
8
@Override public String toString() { return "fleming.entity.Historialclinico[ idHistorialClinico=" + idHistorialClinico + " ]"; }
0
public Channel(ResultSet rs, ChannelStyle style) throws SQLException { clients = new ArrayList<Client>(); name = rs.getString("name"); size = rs.getShort("size"); topic = rs.getString("topic"); String gameName = rs.getString("game"); if (gameName == null) { game = null; } else if (gameName.equals("MAF...
2
public void loadDays(String[] input, int day) { int index = 0; for (int j = 0; j < 6; j++) { for (int i = 0; i < 7; i++) { if(days[i][j] != null) { day--; if(day == 0) { days[i][j].loadData(input); } } } } }
4
@Override public Shape getShape(String shapeType){ if(shapeType==null){ return null; } if (shapeType.equalsIgnoreCase("CIRCLE")){ return new Circle(); } else if (shapeType.equalsIgnoreCase("RECTANGLE")){ return new Rectangle(); } ...
4
public boolean next(Buffer _buf) throws Exception{ int i,j; switch(state){ case SSH_MSG_KEXDH_REPLY: // The server responds with: // byte SSH_MSG_KEXDH_REPLY(31) // string server public host key and certificates (K_S) // mpint f // string signature of H j=...
8
public ArrayList<Double> getSeparateDurations() { ArrayList<Double> durations = new ArrayList<Double>(); for (Edge edge : edges) durations.add(edge.getTravelTime()); return durations; }
1
public static boolean isReservedAnd(String candidate) { int START_STATE = 0; int TERMINAL_STATE = 3; char next; if (candidate.length()!=3){ return false; } int state = START_STATE; for (int i = 0; i < candidate.length(); i++) { ...
9
public RecordDialog(LogicSystem logicSystem, boolean isAddAction, boolean isDeleteAction) { super(); setTitle("Add/delete record"); this.logicSystem = logicSystem; boolean addAction = isAddAction; boolean deleteAction = isDeleteAction; categoryList = new JComboBox<>(); ...
3
@Override public void onMessage(WebSocket socket, String decoded) { SessionHandler handler = new SessionHandler(null); Client client = Server.get().getClient(socket); // Client does not exists if(client == null) { client = new Client(null); client.setToWebsocket(socket); Server.get().addClient(cl...
2
public void endFortify() { for (AbstractMatter u : playerList.getCurrentPlayer().getUnitList().getAbstractMatterList()) { ((Unit)u).setFortify(false); } }
1
public void move(int x, int y){ if (moveCheck()){ pos = pos.add(new Vector3f(x,y,0)); changed = true; } }
1
public void login(String userName, String password) { try { String parameters = "user=" + URLEncoder.encode(userName, "UTF-8") + "&password=" + URLEncoder.encode(password, "UTF-8") + "&version=" + 13; String result = Util.excutePost("https://login.minecraft.net/", parameters); if (...
5
public Plateau(int largeur, int longueur, Case[][] casesDonjons) { this.caseDonjons = new Case[largeur][longueur]; this.mobile = new ArrayList<>(); this.largeur = largeur; this.longueur = longueur; for (int y1 = 0; y1 < longueur; y1++) { for (int x1 = 0; x1 < largeur ; x1++) { this.ca...
4
@Override public final void start() { if (anInt4 >= 0) { anInt4 = 0; } }
1
public boolean obtainWord(String wordStr) { boolean ret = false; Iterator<Word> ite = wordList.iterator(); while ( ite.hasNext() ) { Word w = (Word)ite.next(); if ( w.getString().equals(wordStr) ) { ret = true; obtainedList.add(w); /*lςݕ\쐬ENjL*/ int dx=0; int dy=0; switch ( w.getOrien...
5
@Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof Cuenta)) { return false; } Cuenta other = (Cuenta) object; if ((this.id == null && other.id != null) || (this.i...
5
private synchronized void toBuffer(int s,Object a){ a1.add(s);a2.add(a); if(s==clear){clearBuffer();} if(s==opaque) theOpaque=(Boolean) a; if(s==setBackground)theBackground=(Color) a; if(inBuffer)return; if(isSetter(s))return; Graphics g=getGraphics(); if(g==null)return; Gra...
8
protected boolean fireAndHandleEvent(WordTokenizer tokenizer, SpellCheckEvent event) { fireSpellCheckEvent(event); String word = event.getInvalidWord(); //Work out what to do in response to the event. switch (event.getAction()) { case SpellCheckEvent.INITIAL: break; case SpellCheckEv...
9
public void setRandomValidValue() throws NoMoreValuesException { if (this.size() == 1) { if (this.index_actual_argument == -1) { this.setStateIndex(0); } else { throw new NoMoreValuesException(); } } else if (this.size() > 1) { ...
5
public TraceWindow(Configuration last) { super("Traceback"); getContentPane().setLayout(new BorderLayout()); getContentPane().add(getPastPane(last)); pack(); if (getSize().height > MAXHEIGHT) setSize(getSize().width, MAXHEIGHT); setVisible(true); }
1
public static double deltaMatrices( double[][] mat1, double[][] mat2 ) { double[][] test = Matrix.sub(mat1, mat2); double delta = 0.0; int m = Matrix.getNumOfRows(mat1); int n = Matrix.getNumOfColumns(mat1); for ( int i = 0; i < m; ++i ) for ( int j = 0; j < n; ++j ) delta += Math.abs(test[i][j]); return(d...
2
protected static String getTextContent(String str, Element elem){ NodeList nodelist = elem.getElementsByTagName(str); if (nodelist.getLength() > 0) { Node node = nodelist.item(0).getFirstChild(); if (null != node) { String nodeValue = node.getNodeValue(); ...
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 feel. * For details see http://down...
6
@Test public void itShouldDeserializeLineString() throws Exception { LineString lineString = mapper.fromJson("{\"coordinates\":[[100.0,0.0],[101.0,1.0]],\"type\":\"LineString\"}", LineString.class); assertNotNull(lineString); List<LngLatAlt> coordinates = lineString.getCoordinates(); PointTest.assertLngLatAlt...
0
@Override public void initVelocityConstraints(TimeStep step) { Body b1 = m_bodyA; Body b2 = m_bodyB; m_localCenterA.set(b1.getLocalCenter()); m_localCenterB.set(b2.getLocalCenter()); Transform xf1 = b1.getTransform(); Transform xf2 = b2.getTransform(); // Compute the effective masses. final Ve...
9
public void play() { Iterator<Roll> it = rolls_list.iterator(); while (it.hasNext()) { Roll r = it.next(); r.doRound(this); notifyObservers(r); } Historical.deleteInstance(); }
1
private void setJPaneKompetenser() { ArrayList<HashMap<String, String>> a1 = null; try { String query = "select KOMPETENSDOMAN.BENAMNING KOMPBENAMNING, HAR_KOMPETENS.KOMPETENSNIVA KOMPNIVA, PLATTFORM.BENAMNING PLATTBENAMNING from KOMPETENSDOMAN" + " join HAR_KOMPETENS on ...
3
public void run() { if (D) Log.d(TAG, "Socket Type: " + mSocketType + "BEGIN mAcceptThread" + this); setName("AcceptThread " + mSocketType); BluetoothSocket socket = null; // Listen to the server socket if we're not connected while (true) { try { ...
6
public boolean voikoLiikuttaa(Palikka uusiPala, int uusiX, int uusiY) { for (int i = 0; i < 4; ++i) { int x = uusiX + uusiPala.x(i); int y = uusiY - uusiPala.y(i); if (x < 0 || x >= RuudunLeveys || y < 0 || y >= RuudunKorkeus) { return false; } ...
6