text
stringlengths
14
410k
label
int32
0
9
public ArrayList<String> readFinnKinoXML() { DateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd"); Date date = new Date(); String url = "http://www.finnkino.fi/xml/Schedule/?area="+kaupunki+"&dt="+dateFormat.format(date); finnK...
3
public static void main(String[] args) { try { Args arg = new Args("a, c*", args); boolean displayFullFeed = arg.getBoolean('a'); String currencyRule = arg.getString('c'); String rssUrl = "http://rss.nbp.pl/kursy/TabelaA.xml"; ...
9
@Override public void mousePressed(MouseEvent e) { if (!tabPane.isEnabled()) { return; } tabPressed = tabForCoordinate(tabPane, e.getX(), e.getY()); if (tabPressed != -1) { tabPane.repaint(getTabBounds(tabPane, tabPressed)); ...
2
@Override public boolean equals(Object obj) { if (obj == null) return false; if (!(obj instanceof CacheTuple)) return false; if (!root.equals(((CacheTuple) obj).root)) return false; if (!slug.equals(((CacheTuple) ob...
5
@Override public void documentRemoved(DocumentRepositoryEvent e) {}
0
@Override public boolean adapt(ClassNode node) { if (!node.superName.equals("java/awt/Canvas")) return false; System.out.println("Found Canvas Class: " + node.name); node.superName = "com/omrlnr/bot/hooks/Canvas"; ListIterator<?> mli = node.methods.listIterator(); while (mli.hasNext()) { MethodNode ...
7
public ParseException generateParseException() { jj_expentries.clear(); boolean[] la1tokens = new boolean[48]; if (jj_kind >= 0) { la1tokens[jj_kind] = true; jj_kind = -1; } for (int i = 0; i < 17; i++) { if (jj_la1[i] == jj_gen) { for (int j = 0; j < 32; j++) { i...
9
public boolean validateUniqueNickname(String nickname){ boolean isUniqueNickname = false; try { Socket loginSocket = new Socket(SERVER_ADDRESS_LOGIN, LOGIN_PORT); loginSocket.setSoTimeout(TIMEOUT); OutputStream outputStream = loginSocket.getOutputStream(); ObjectOutputStream objectOutputStream =...
3
public void listen(){ _log("listening to new client..."); Socket client = null; try{ _serverSocket = new ServerSocket(_server.listenPort()); _serverSocket.setSoTimeout(1000*100); while(true) { client = _serverSocket.accept(); _log("Get connection from " + client.getInet...
9
private void CheckButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CheckButtonActionPerformed String flightno = FlightNoTextField.getText(); if (flightno.equals("")) { return; } StatusPanel.setVisible(true); try { Connection con; ...
8
public static final String clean(String path) { if(StringUtils.isBlank(path)){ return EMPTY_STRING; } path = stripDots(path); return path; }
1
public boolean isBlocked() { if (emptyTiles().size() > 0) return false; for (int x = 0; x < 3; x++) for (int y = 0; y < 4; y++) if (getTile(x, y).getValue() == getTile(x + 1, y).getValue()) return false; for (int x = 0; x < 4; x++) ...
7
public void charge(long deltaMs) { charged += deltaMs; if(charged >= chargeTime) { timeSinceLastShot = 0; charged = 0; charging = false; weapon.fire(); } }
1
public int getCurrentFrame() { return currentFrame; }
0
public static synchronized EmployeeRepositorySingleton getRepository() { //TODO implement method that returns repository instance if(instance == null){ instance = new EmployeeRepositorySingleton(); } return instance; }
1
protected void _dealCmd() { String cmd = null; boolean needStartTask = false; //添加到命令行队列中,并判断是否需要开启任务 _lockCmd(); if(!_m_lCmdList.isEmpty()) { //取第一个命令行 cmd = _m_lCmdList.getFirst(); } _unlockCmd(); ...
7
void loadCheckpoint() throws FileNotFoundException{ /* * load index info back into the index from the checkpoint file */ Scanner indexSave = new Scanner(new File("testData/indexCheckpoint/index")); while(indexSave.hasNextLine()){ String indexEntry[] = indexSave.nextLine().split(","); String key = ind...
3
@Override public void changedMostRecentDocumentTouched(DocumentRepositoryEvent e) { if (e.getDocument() == null) { setEnabled(false); } else { setEnabled(true); } }
1
public void movePiece(Piece chosenPiece) { Piece gonnaMovePiece; System.out.println("움직일 위치의 좌표값을 입력하세요."); Position gonnaMovePos = inputPos(); while (!chosenPiece.moveAblePosList.contains(gonnaMovePos)) { if(isKing(chosenPiece) && isCastling(gonnaMovePos)) break; //캐슬링 처리 System.out.println("접근할...
4
public Object getValue(Object target, Class<?> type, long fieldOffset) { if (type == int.class) return unsafe.getInt(target, fieldOffset); else if (type == long.class) return unsafe.getLong(target, fieldOffset); else if (type == short.class) return unsafe.getShort(target, fieldOffset); else if (type =...
9
@Override public void windowClosing(WindowEvent arg0) { Object[] object = {"Yes", "9 9 9"}; int answer = JOptionPane.showOptionDialog(null, "Are you sure you want to exit the JGame Collection?", "Exit", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, null, object, object[1]); if(answer == 0) { ...
1
private void searchFlights() { if (checkBoxRoundTrip.getChecked() && dateFieldReturn.getDate() < dateFieldDeparture.getDate()) { Dialog.alert("Return date should be greater or equals to departure date"); return; } if (searchParameters.getFromAirportId() == null || searchParameters.getToAirportId() == null) ...
6
private static String getImageThunb(Element work) throws Exception{ try{ Elements tmp = work.getElementsByClass("work_thumb"); if(tmp==null || tmp.size()==0) return "http://www.dlsite.com/images/web/home/no_img_sam.gif"; Element thumb = tmp.get(0).child(0); Elements tmp1 = thumb.getElementsByTag("img"); ...
5
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 synchronized List<ChunkInFilePosition> getChunks() { final List<ChunkInFilePosition> res = new ArrayList<ChunkInFilePosition>(); try { for(int x = 0; x < 32; x++) { for(int z = 0; z < 32; z++) { if(regionSource.hasChunk(x, z)) { final DataInputStream regionChunkInputSt...
5
@Override public void handleClick(int x, int y) { if((x >= (2 * Sidebar.HORIZONTAL_SPACING)) && (x <= (getWidth()))) { double topY = getHeight() - Sidebar.VERTICAL_SPACING; double height = (getHeight() - (3 * Sidebar.VERTICAL_SPACING)) / 2; if((y < (topY)) && (y > (topY - height))) { double pos =...
6
public void setLocale(final String localeKey) { if (localeKey != null || !localeKey.isEmpty()) { String[] parts = localeKey.split("[_\\.]"); if (parts.length == 1) { currentLocale = new Locale(parts[0]); } else if (parts.length == 2) { current...
7
public static Rectangle2D createRectangle(Size2D dimensions, double anchorX, double anchorY, RectangleAnchor anchor) { Rectangle2D result = null; final double w = dimensions.getWidth(); final double h = dimensions.getHeight(); if (anchor == RectangleAnchor.CENTER) { ...
9
private void saveDictionnaire(PrintStream out) throws IOException { out.println("<dictionnaire>"); for (int i = 0; i < dico.getRowCount() - 1; i++) { out.println("<information code=\"" + dico.getID(i) + "\" nom=\"" + dico.getVa...
2
public void setTitle(String title, String format) { if (format != null) { titleMap.put(title.toLowerCase(), format); } else { titleMap.remove(title.toLowerCase()); } }
1
public void render() { player.render(); shader.bind(); shader.updateUniforms(transform.getTransformation(), transform.getProjectedTransformation(), material); mesh.draw(); for(Door door : doors) door.render(); for(MedKit medkit : medkits) medkit.render(); rou...
2
@Override public String getDesc() { return "Default"; }
0
@Override public void controllerUpdate(ControllerEvent evt) { if (evt instanceof ConfigureCompleteEvent || evt instanceof RealizeCompleteEvent || evt instanceof PrefetchCompleteEvent) { synchronized (this) { stateTransitionOK = true; this.notifyAll(); } } ...
5
public void setExp(PExp node) { if(this._exp_ != null) { this._exp_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } ...
3
public void setShopAddress(String shopAddress) { this.shopAddress = shopAddress; }
0
public void stClickKey(int sleepTime, String... args) { try { Interpreter In = new Interpreter(); try { In.set("rb2", new Robot()); In.eval("rb2.mouseMove(70,515" + ");"); for (String s : args) In.eval("rb2.keyPress(java.awt.event.KeyEvent." + s + ");"); for (String s : args) In.eval("...
5
public void unload(int y){ if(section[y] != null)section[y].removeFromParent(); section[y] = null; System.gc(); }
1
private void paintImage(GodImage chosenImage, Rectangle rect) { int width = rect.width; int height = rect.height; if(rect.x > frame.getWidth() || rect.y > frame.getHeight() || rect.x+width < 0 || rect.y+height < 0 ) return; graphic.drawImage(chosenImage.getImage().getBufferedImage(), rect.x, rect.y, widt...
4
public final void removalTask() { try { if (!player.getAllBuffs().isEmpty()) { player.cancelAllBuffs_(); } if (!player.getAllDiseases().isEmpty()) { player.dispelAllDebuffs(); } if (player.getTrade() != null) { MapleTrade.cancelTrade(player.getTrade()); } NPCScriptManager.getIn...
8
private static <T> T enhance(Type typeToWrap, MethodEntry methodEntry) { try { net.sf.cglib.proxy.Enhancer e = new net.sf.cglib.proxy.Enhancer(); Map<String, Class<?>> parameterizedTypeMap = null; if (typeToWrap instanceof ParameterizedType) { parameterizedTyp...
8
private boolean isFull() { return full?true:(full=o0!=null&&o0.isFull()&&o1!=null&&o1.isFull()); }
4
@SuppressWarnings("unchecked") public FollowingGraph(String dir) { this.dir = dir; try { FileInputStream fin = new FileInputStream(dir); ObjectInputStream oos = new ObjectInputStream(fin); map = (TreeMap<Integer, UserFollowers>) oos.readObject(); oos.close(); } catch (Exception e) { e.printStackTr...
1
public int checkPresence(){ int loop; for (loop = 0; loop < enemiesPresent.size(); loop++){ if (!enemiesPresent.get(loop).stillPresent() && !enemiesPresent.get(loop).gotChecked() && enemiesPresent.get(loop).portalPassing()){ enemiesPassed++; enemiesPresent.get(loop).nowChecked(); } } return en...
4
public static LinkedListNode findloop(LinkedListNode n) { if(n==null || n.next == null) return null; LinkedListNode quick=n, slow=n; while(true) { if(quick == null || quick.next == null) return null; quick = quick.next.next; slow = slow.next; if(quick == slow) break; } quick = ...
8
public static boolean getKeyDown(int keyCode) { return getKey(keyCode) && !lastKeys[keyCode]; }
1
@Override public TLValue evaluate() { TLValue a = lhs.evaluate(); TLValue b = rhs.evaluate(); if(a.isNumber() && b.isNumber()) { return new TLValue(a.asDouble() < b.asDouble()); } if(a.isString() && b.isString()) { return new TLValue(a.asString().compareTo(b.asString()) < -1); }...
4
private Class<?> getConstraintValidatorClass( TypeElement memberAnnotationTypeElement, Class<? extends Annotation> constraintAnnotationClass) { AnnotationMirror constraintAnnotation = AnnotationProcessingUtils .findAnnotationMirror(processingEnv, memberAnnotationTypeElement, constraintAnnotationClass)...
5
public boolean equals(Object other){ if(other instanceof LogEvent){ LogEvent otherEvent = (LogEvent)other; return otherEvent.getLevel().equals(getLevel()) && otherEvent.getMessage().equals(getMessage()) && otherEvent.getOriginalLogger().equals(getO...
5
public String describeNode() { return "["+(getNodeProperty()==null?"null":StringUtils.stripControlCharacters(getNodeProperty().toString())) +"]";//+"="+ toString() /*+ (isValueValid()?"":" (invalid)")*/; }
1
public Player (boolean color, Board field ){ myColor=color; this.field=field; }
0
public boolean isBalancedRec(TreeNode root, TreeNode tmp){ if(root == null) { return true; } TreeNode tmpL = new TreeNode(0); boolean isLeft = isBalancedRec(root.left, tmpL); TreeNode tmpR = new TreeNode(0); boolean isRight = isBalancedRec(root.right, tmpR); ...
3
public void setVistingHourId(int vistingHourId) { this.vistingHourId = vistingHourId; }
0
private void test() { System.out.println("Input IP-address of active node"); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String ipAddress = null; String message = "Fuck"; try { ipAddress = br.readLine(); } catch (IOException e) {...
4
private boolean r_verb() { int among_var; int v_1; // (, line 136 // [, line 137 ket = cursor; // substring, line 137 among_var = find_among_b(a_4, 46); if (among_var == 0) { return false; } // ], line 137 bra = cursor; switch (among_var) { case 0: return false; case 1: // (, line 1...
8
public static void Classic_Cannit(){ System.out.print("INFO: Welcome to " + Name); System.out.println("INFO: The version you are running is " + Version); try{ prop.load(new FileReader("server.properties")); }catch (Exception localException2){ System.out.println("WARNING: Failed to load server.properties!"...
8
public static void main(String [ ] args) { player player1 = new player("x"); player player2 = new player("o"); boolean cont = true; int input = -1; String continput = ""; String winner = null; boolean player = true; while(cont){ Board playBoard = new Boar...
7
public boolean init_sentinel(aos.jack.jak.agent.NameSpace __a) { ev = (peer.Init) __a.findEvent("peer.Init"); if (ev == null) { warning("Init ev: is not found in the capability/agent this plan comes from"); return false; } authentication = (peer.Authentication...
5
int gjYearFromFixed(long date) { long d0 = date - 1; long n400 = div(d0, 146097); long d1 = mod(d0, 146097); long n100 = div(d1, 36524); long d2 = mod(d1, 36524); long n4 = div(d2, 1461); long d3 = mod(d2, 1461); long n1 = div(d3, 365); long year =...
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
public ResultSet Funcionarios() throws SQLException { Connection conexao = null; PreparedStatement comando = null; ResultSet resultado = null; try { conexao = BancoDadosUtil.getConnection(); comando = conexao.prepareStatement(SQL_SELECT_TODOS_funcionarios); ...
6
@Override public void ParseIn(Connection Main, Server Environment) { Room Room = Environment.RoomManager.GetRoom(Main.Data.CurrentRoom); if (Room == null) { return; } if (!Room.CheckRights(Main.Data, false)) { return; } R...
3
public void simplify() { block.simplify(); if (nextByAddr != null) nextByAddr.simplify(); }
1
public void pickUp(String object, ArrayList<String> inv) { if (object.equalsIgnoreCase("floor")) { System.out.println("You can't pick up the floor...\n"); } else if (object.equalsIgnoreCase("wall") || object.equalsIgnoreCase("walls")) { System.out.println("You can't pick up the w...
7
private void readMethods(final DataInputStream in) throws IOException { final int numMethods = in.readUnsignedShort(); methods = new Method[numMethods]; for (int i = 0; i < numMethods; i++) { methods[i] = new Method(in, this); } }
1
@Override public void actionPerformed(ActionEvent ae) { // EACH BUTTON STORES A COMMAND, WHICH REPRESENTS // WHICH BUTTON WAS CLICKED String command = ae.getActionCommand(); // WHICH BUTTON WAS CLICKED? switch (command) { // THE NEW BUTTON? ...
5
public int setPage(int page) { if (select == null) { return -1; } int nbpage = getPageCount(); if (nbpage > 0) { if (page > 0 && page < getPageCount()) { currentPage = page - 1; currentRows = getNbRow(); select.limit = currentRows; select.offset = currentPage * rowperpage; try { t...
9
public int[] StringToIntArray(String range) { List<Integer> lst = StringToList(range); int[] arr = new int[lst.size()]; for (int i=0; i< arr.length; i++) { arr[i] = lst.get(i); } return arr; }
1
private void ok_buttonActionPerformed(ActionEvent evt) {// GEN-FIRST:event_ok_buttonActionPerformed String first = first_name_field.getText(); String last = last_name_field.getText(); int id = Integer.parseInt(id_field.getText()); String username = username_field.getText(); String pass = password_field.getText(); ...
7
public byte getTypeId() { return (byte)typeId; }
0
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (flipHorizontally ? 1231 : 1237); result = prime * result + (flipVertically ? 1231 : 1237); result = prime * result + (objToBgPriority ? 1231 : 1237); result = prime * result + ((palette == null) ...
6
public GOEPanel() { m_Backup = copyObject(m_Object); m_ClassNameLabel = new JLabel("None"); m_ClassNameLabel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); m_ChildPropertySheet = new PropertySheetPanel(); m_ChildPropertySheet.addPropertyChangeListener (new PropertyChang...
9
public static void main(String[] args) { MatrixCornerProblem matrixCornerProblem = new MatrixCornerProblem(); System.out.println(" Matrix is ******************* "); matrixCornerProblem.display(); if (matrixCornerProblem.rows <= 0 || matrixCornerProblem.columns <= 0) { System...
2
@Override public void startCharacter(MOB mob, boolean isBorrowedClass, boolean verifyOnly) { if(!verifyOnly) { mob.setPractices(mob.getPractices()+getPracsFirstLevel()); mob.setTrains(mob.getTrains()+getTrainsFirstLevel()); grantAbilities(mob,isBorrowedClass); CMLib.achievements().grantAbilitiesAndExp...
7
public void write(String fileName) throws IOException { RandomAccessFile out = null; try { out = new RandomAccessFile(fileName, "rw"); out.setLength(0); FileChannel file = out.getChannel(); long offset = 0L; int headerSize = 4 * 3;...
7
public void acceptRequest(AsynchronousSocketChannel socket) { Worker worker = workers.poll(); if (worker == null) { requests.add(socket); } else { synchronized (worker) { worker.setSocket(socket); worker.notify(); } ...
1
private void bFs(Grafo g, int s){ ArrayList<Integer> cola= new ArrayList<Integer>(); marked[s]= true; cola.add(s); while(cola.size()!=0){ int saliente= cola.remove(0); for(int i : g.adj(saliente)){ if(!marked[i]){ edgeTo[i]=saliente; marked[i]=true; cola.add(i); } } } }
3
public void generationTrajetsMultiples(Information<Float> information){ float signauxRetarde[][] = new float[nbTrajetIndirect][]; float signalFinal[]; int decaTempoMax = 0; informationEmise = new Information<Float>(); // Recherche du plus grand decalage afin de determiner la taille du signal d'arrivé for(...
7
public ArrayList<String> getCourseNames() { ArrayList<String> courseNames = new ArrayList<String>(); for (String name : courses.keySet()) { courseNames.add(name); } return courseNames; }
1
private void closeSocket(){ if (socket != null) { try { socket.close(); } catch (IOException e1) { e1.printStackTrace(); } } }
2
@Override public void handleRequest(int request) { if (request == 2) { System.out.println("ConcreteHandlerB handleRequest " + request); } else if (mSuccessor != null) { mSuccessor.handleRequest(request); } }
2
public static void main(String[] args) { try { BaseL8Manager l8Manager = new BaseL8Manager(); L8 l8 = l8Manager.createEmulatedL8(); //L8 l8 = l8Manager.reconnectDevice("4c9b26176af0768e562837eeebdc227d"); l8.clearMatrix(); l8.setLED(0, 3, Color.CYAN); l8.readLED(0, 3); l...
9
private static boolean afterSpace(Node node) { Node prev; int c; if (node == null || node.tag == null || !((node.tag.model & Dict.CM_INLINE) != 0)) return true; prev = node.prev; if (prev != null) { if (prev.type == Node.TextNode && prev.end...
9
@Override protected boolean next() { switch(state()) { case size_ready: return size_ready (); case message_ready: return message_ready (); default: return false; } }
2
public static void main(String[] args) { LOG.info("Args: "); int i = 0; for (String arg : args) { LOG.info("{}:{}", i++, arg); } // create Options object Options options = new Options(); options.addOption("outdir", true, "the output dir"); opt...
3
public Dimension minimumLayoutSize(Container parent) { //System.err.println("minimumLayoutSize"); synchronized (parent.getTreeLock()) { Insets insets = parent.getInsets(); int ncomponents = parent.getComponentCount(); int nrows = getRows(); int ncols = getColumns(); if (nrows > 0) {...
6
private double getExchangeRateFromDB(Currency toCurrency, Currency fromCurrency, Connection connection, Date date) { try { String query = "select cambio from historico_cambios " + "where divisa_desde='" + fromCurrency.getCode() + "' and divisa_a='" + toCurrency.getCode() + "'"; ...
2
private void calculateResult() { int[] tmp = new int[options.length]; for (int i = 0; i < votes.length; i++) { if (votes[i].decision != -1) { tmp[votes[i].decision]++; } } int max = -1; boolean onlyMax = true; int maxID = 0; for (int i = 0; i < tmp.length; i++) { if (max == tmp[i]) { only...
6
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { int i = par1World.getBlockId(par2, par3 - 1, par4); if (i == blockID) { return true; } if (i != Block.grass.blockID && i != Block.dirt.blockID && i != Block.sand.blockID) { ...
7
public void welcome() { while (true) { Socket s = null; try { s = ss.accept(); System.out.println("Port:" + s.getPort()); System.out.println("Address:" + s.getInetAddress()); System.out.println("LocalPort:" + s.getLocalPort()); System.out.println("LocalAddress:" + s.getLocalAddress());...
4
public boolean isDone() { if(null == threadVar.get()) { return true; } return false; }
1
public static void saveCopy(MediaCopy mc){ try { if(conn == null || conn.isClosed()){ conn = DatabaseConnection.getConnection(); } } catch (SQLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try { conn.setAutoCommit(false); PreparedStat...
4
public boolean Equals(Vector2 v) { return (v.X == X && v.Y == Y); }
1
@Override public void keyReleased(KeyEvent e) { switch (e.getKeyCode()) { case KeyEvent.VK_1: handleResponse(1); break; case KeyEvent.VK_2: handleResponse(2); break; case K...
8
private void setActivePlayer(Player activePlayer) { if (activePlayer == null) throw new IllegalArgumentException("Player can't be null!"); this.activePlayer = activePlayer; }
1
@Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { MOB target=mob; if((auto)&&(givenTarget!=null)&&(givenTarget instanceof MOB)) target=(MOB)givenTarget; if(target.fetchEffect(ID())!=null) { mob.tell(target,null,null,L("<S-NAME> <S-IS-ARE> ...
8
@Override public void doUniformBlur() { if (imageManager.getBufferedImage() == null) return; WritableRaster raster = imageManager.getBufferedImage().getRaster(); double[][] newPixels = new double[raster.getWidth()][raster.getHeight()]; for (int x = 1; x < raster.getWidth() - 1; x++) { for (int y = 1; y < ra...
5
public void overwriteTRNS(byte r, byte g, byte b) { if(hasAlphaChannel()) { throw new UnsupportedOperationException("image has an alpha channel"); } byte[] pal = this.palette; if(pal == null) { transPixel = new byte[] { 0, r, 0, g, 0, b }; } else { ...
6
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; RemoteAddress other = (RemoteAddress) obj; if (address == null) { if (other.address != null) return false; } else if (!address.equals(ot...
7
public T run() { int currentIteration = 0; long waitTimeIfTimeout = 5; while (true) { Transaction txn = datastore.beginTransaction(); try { return txnBlock(txn); } catch (ConcurrentModificationException cme) { if (currentIterati...
7
@Override public boolean shadow_hit(Ray ray, FloatRef tmin) { if (bounds != null && !bounds.hit(ray)) return false; float tMin = Float.MAX_VALUE; boolean hit = false; for (GeometricObject obj : objects) { FloatRef fr = new FloatRef(); if (obj.sha...
6