text
stringlengths
14
410k
label
int32
0
9
@Override public void writeBytes(byte[] b, int offset, int len) throws IOException { long freeSpace = dir.maxSize - dir.sizeInBytes(); long realUsage = 0; // If MockRAMDir crashed since we were opened, then // don't write anything: if (dir.crashed) throw new IOException("MockRAMDirectory wa...
9
private void operation() throws SQLException { System.out .println("Please choose your operation:\n1 add a new URL" + "\t2 delete a URL\t3 display all\n4 update DB\t5 delete table\t6 Exit this application"); try { int input = sc.nextInt(); switch (input) { case 1: add(); break; case 2:...
7
public String arithmetic(String instruction) { String[] instArray = instruction.split(" "); Register dest = getRegister(1, instArray); Register source1 = getRegister(2, instArray); Register source2 = getRegister(3, instArray); switch (instArray[0]) { case "ADD": return add(dest, source1, source2); case...
5
public void bitSwap(double tempurature){ Chromasome child = new Chromasome(); int index = 0; while (index < child.chromasome.length) {//Copy the current chromasome to the child as a base, before we flip it child.chromasome[index] = currentChromasome.chromasome[index]; index++; } /*int toSwap = ran...
6
void brushDabsBenchmark(String[] args) { int iterations = args.length > 1 ? Integer.valueOf(args[1]) : 10000; int sizeMin = args.length > 2 ? Integer.valueOf(args[2]) : 1; int sizeMax = args.length > 3 ? Integer.valueOf(args[3]) : 200; System.out.println("Benchmarking brush dabs size " + sizeMin + "-" + sizeMa...
3
public double getX2Coordinate() { return x2Coordinate; }
0
@Override public void onEntityExplode(EntityExplodeEvent event) { List<Block> blockList = event.blockList(); for (Block block : blockList) { PlanArea area = BuildingPlanner.plugin.areaManager.getAffectedArea(block); if (area == null) { continue; } if (area.isCommitted()) { continue;...
4
public void updateLabels() { if (Game.getThis() == null) { return; } // Consecutive Matches Consecutive.setText( "<html><div style=\"color: blue; font-weight: bold;\">" + "Consecutive<br/>" + "Match Bonus: " +Game.getThis().ConsecutiveRun + "</div></html>" ); // Turns P1_Turns.setText("T...
2
public void clear() { verticesToPoints.clear(); verticesToNeighbors.clear(); }
0
private long getCPtrAddRefOfferDataNym(OfferDataNym element) { // Whenever adding a reference to the list, I remove it first (if already there.) // That way we never store more than one reference per actual contained object. // for(int intIndex = 0; intIndex < elementList.size(); intIndex++) { Object theObject =...
4
public Address getAddress(String description) { if (!localAddresses.isEmpty()) { Iterator<Address> addressIterator = localAddresses.iterator(); while (addressIterator.hasNext()) { AddressImpl address = (AddressImpl) addressIterator.next(); if (address.getDescription().equalsIgnoreCase(description)) { ...
4
public static boolean isCglibRenamedMethod(Method renamedMethod) { return CGLIB_RENAMED_METHOD_PATTERN.matcher(renamedMethod.getName()) .matches(); }
0
public static void startupLogicSystem() { synchronized (Stella.$BOOTSTRAP_LOCK$) { if (Stella.currentStartupTimePhaseP(0)) { if (!(Stella.systemStartedUpP("stella", "/STELLA"))) { StartupStellaSystem.startupStellaSystem(); } } if (Stella.currentStartupTimePhaseP(1)) { ...
9
public void temporizacion() { /* min (event_list()) */ if (event_list.getA() <= event_list.getL() && event_list.getA() <= event_list.getS() && event_list.getA() <= event_list.getR()){ clock = event_list.getA(); }else if (event_list.getL() <= ...
9
public void setjLabelMdp(JLabel jLabelMdp) { this.jLabelMdp = jLabelMdp; }
0
public void render(){ GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); switch (state) { case INTRO: Intro.render(); break; case OPTIONS: Options.render(); break; case MAINMENU: MAINMENU.render(); break; case MENU: Menu.render(); break; case GAME: if(world.isLo...
7
public static void main(String[] args){ Scanner in = new Scanner(System.in); int num = in.nextInt(); while(num-->0){ int n = in.nextInt(); int k = in.nextInt(); int d1 = in.nextInt(); int d2 = in.nextInt(); System.out.println(n%3==0 && d1+d2<(n/3) ? "yes" : "no"); } }
3
public static void main(String[] args) throws Exception { // this file is at // https://github.com/afodor/metagenomicsTools/blob/master/src/parsers/test/someFasta.txt File aFile = new File("C:\\Temp\\someFasta.txt"); List<FastaSequence> list = FastaSequence.readFastaFile(aFile); if( list.size() != 3)...
6
public void asleep(long milliseconds) { long next = System.currentTimeMillis() + milliseconds; while (System.currentTimeMillis() < next) { try { sleep(next - System.currentTimeMillis()); } catch (InterruptedException e) { e.printStackTrace(); } } }
2
private void btnFinalizarProdActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFinalizarProdActionPerformed if(JOptionPane.showConfirmDialog(rootPane, "Deseja Salvar?") == 0){ try { //Cliente cliente = new Cliente(); //Setando os dados e converte...
5
public List findBySex(Object sex) { return findByProperty(SEX, sex); }
0
public void testHugeFile() throws IOException { DenseRAMFile f = new DenseRAMFile(); // output part RAMOutputStream out = new RAMOutputStream(f); byte b1[] = new byte[RAMOutputStream.BUFFER_SIZE]; byte b2[] = new byte[RAMOutputStream.BUFFER_SIZE / 3]; for (int i = 0; i < b1.length; i++) { ...
7
public static Stella_Object accessGeneralizedSymbolSlotValue(GeneralizedSymbol self, Symbol slotname, Stella_Object value, boolean setvalueP) { if (slotname == Stella.SYM_STELLA_SYMBOL_NAME) { if (setvalueP) { self.symbolName = ((StringWrapper)(value)).wrapperValue; } else { value ...
6
@Override public void actionPerformed(ActionEvent e) { String tmp = ""; Object source = e.getSource(); if (source == btn) { tmp = recherche.getText(); System.out.println(tmp); } if (tmp.compareTo("") != 0) { if (tmp.compareTo("play pool")...
7
public int countLeftDiagonal(Example e, int currentToken, int numTokensCountingFor){ int height = e.getBoard().height; // 6 int width = e.getBoard().width; // 7 int countOfTokensEncounteredDiagonallyLeft = 0; // counter int countOfCurrentPlayersNInARow = 0; // bottom index is (5, 0) for (int i = height ...
7
public void getDatos(String campo, beansProducto producto){ String descripcion = null, parametro = null; switch(campo.trim()){ case "nombre": descripcion = "Nombre del producto "; parametro = producto.getNombre(); break; case "codigo": descripcion = "Codigo del producto "; p...
7
protected int readJSONArray(JSONArray jsonArray, int startIdx) { int cnt = this.tokens.size(); int i = startIdx; for (i = startIdx; i < cnt; i++) { Token t = this.tokens.get(i); //System.out.println("In sq open:" + t.getValue()); switch (t.getTokenType()) { case JSONParserConstants.CURLY_BRACKET_O...
8
public int getSample() { if (!enabled) return 0; // Decrement Counter counter -= psg_cycles; // Counter Expired if (counter < 0) { // Toggle Amplitude Flip Flop amplitude_flipflop = !amplitude_flipflop; // Reload counter ...
6
private void list(CommandSender sender, String[] args) { if (!sender.hasPermission("graveyard.command.list")) { noPermission(sender); return; } String world = null; if (args.length > 1) { world = args[1]; } commandLine(sender); ...
5
protected void installListeners() { super.installListeners(); if (AbstractLookAndFeel.getTheme().doShowFocusFrame()) { focusListener = new FocusListener() { public void focusGained(FocusEvent e) { if (getComponent() != null) { org...
6
@Override public void tableCheckAndCreate() throws SQLException { // http://stackoverflow.com/questions/2942788/check-if-table-exists Statement statement = con.createStatement(); DatabaseMetaData dbm = con.getMetaData(); // check if "employee" table is there ResultSet tables = dbm.getTables(null, null, TABLE...
1
public void setWorkPosition(String workPosition) { WorkPosition = workPosition; }
0
private void affichageErreursAnnonceur(List<Error> erreursAnnonceur) { for (Error e : erreursAnnonceur) { switch (e) { case raisonSocialeVide: this.labelErreurRaisonSocialeAnnonceur.setText("Veuillez saisir une raison sociale"); break; ...
9
public static void testValidity(Object o) throws JSONException { if (o != null) { if (o instanceof Double) { if (((Double) o).isInfinite() || ((Double) o).isNaN()) { throw new JSONException( "JSON does not allow non-finite numbers."); ...
7
public LoadGamesTable(final GameClient client, final ClientWindow window, final LoadGamesTableModel model) { super(null, model.getHeaders()); setModel(model); // Set the table styling setRowHeight(ROW_HEIGHT); // Create the button column new ButtonColumn(this, new AbstractAction() { @Override public...
9
@Override protected Order process(Order o) { // //TODO finalize multiple treatment for each OrderType Order response = null; if(o != null){ switch(o.getOrderType()) { case AUTH : EngineLog.SERVER.info( "Recived an Auth permission from "+ o.getParentOrder().getSocketAddress() + ...
7
protected DateTimeField getField(int index, Chronology chrono) { if (index == 0) { return ISOChronology.getInstanceUTC().minuteOfHour(); } if (index == 1) { return ISOChronology.getInstanceUTC().millisOfSecond(); } return null; ...
2
private void saleShowButtonActionPerformed() { if (dataForUpdate.getFromStation() == null || dataForUpdate.getFromStation().equals("")) { JOptionPane.showMessageDialog(null, "Некорректно введена станция отправления. Повторите ввод."); return; } else if (dataForUpdate.getToStation...
8
protected Behaviour nextResting() { Target restPoint = this.origin() ; final Nest nest = (Nest) this.mind.home() ; if (nest != null && nest.inWorld() && nest.structure.intact()) { restPoint = nest ; } final Action rest = new Action( this, restPoint, this, "actionRest", Action...
4
Command getCommand(String name) { if (StringUtils.isEmpty(name) || !hasCommands()) { return null; } return this.commands.get(name); }
2
public static void main(String s[] ) { boolean primes; k2 = new Scanner(System.in); System.out.println("enter the first number for range"); int num1=k2.nextInt(); System.out.println("enter the second number for range"); int num2=k2.nextInt(); int i=0; for( i=num1;i<=num2;i++) { primes=true; ...
4
private void skipToEnd() throws IOException { InputStream is = getInputStream(); if (is == null) return; if (chunkLength > 0) is.skip(chunkLength); for (int tag = is.read(); tag >= 0; tag = is.read()) { switch (tag) { case 'Y': server.freeReadLock(); ...
7
public boolean getPartitionValidity() { return partitionIsValid; }
0
int getHelpArgumentsLength(String longStart, String shortStart){ if (description == null){ return 0; } int length = 1; if (shortStart != null && shortNames.size()>0){ length += 1; length += shortStart.length(); length += 1; } ...
6
static private void sort(int check, int[] array){ if(index == 5){ index = 0; return; } int cache = averages[index]; int[] cacheArray = bests[index]; if(check > cache){ averages[index] = check; bests[index] = array; index ++; sort(cache, cacheArray); }else{ index ++; sort(check, ar...
2
public static String stringToMD5(String str) { StringBuffer buffer = new StringBuffer(); MessageDigest messagedigest = null; if (StringUtil.isNullOrEmpty(str)) return ""; try { messagedigest = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmEx...
3
private int DecDigit(int number, int pos) { int term = 1; int i; for (i = 0; i < pos; i++) term *= 10; return number - term; }
1
public Object getObjectShape(){ return objectShape; }
0
public String insertProfile(String inJson) { String retval = new String(); boolean retbool; int retcode; try { JSONObject inJo = new JSONObject(inJson); JSONObject inPr = inJo.getJSONObject("profiles"); JSONArray inConf = inJo.getJSONArray("configuration"); JSONArray inHost = inJo.getJSONArray(...
8
public static String v(int[][] m) { String ans = ""; if (s(m, -1, -1)) return "OK"; else { for (int i = 0; i < m.length; i++) for (int j = 0; j < m.length; j++) if (s(m, i, j)) return "Change bit (" + (i + 1) + "," + (j + 1) + ")"; } return "Corrupt"; }
4
private static List<Appointment> findWeeklyByDaySpan(long uid, long startDay, long endDay) throws SQLException { List<Appointment> aAppt = new ArrayList<Appointment>(); // select * from Appointment where frequency = $WEEKLY // and startTime <= $(endDay+DateUtil.DAY_LENGTH) // and lastDay >= $startDay Prepa...
1
public void act() { //If we're not allowed to move the card about, don't do anything if(!canDrag) return; MouseInfo mouse = Greenfoot.getMouseInfo(); if(! (mouse!=null && mouse.getActor()==this)) return; //If the mouse isn't used on this card, don't do anything ...
9
public static boolean nextNum(int a, int b) { return ((b == 3) && (a == 1 || a == 2)) || b == a+a; }
3
public AutoCompletion(final JComboBox comboBox) { this.comboBox = comboBox; model = comboBox.getModel(); comboBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (!selecting) highlightCompletedText(0); } });...
8
public String getCity() { return Address.getCity(); }
0
public void readExternal(ObjectInput paramObjectInput) throws IOException, ClassNotFoundException { this.world = ((World)paramObjectInput.readObject()); this.currentScene = this.world.getCurrentScene(); this.ProgramLibrary = ((OrderedTable)paramObjectInput.readObject()); this.ActiveRobots = ((Vect...
3
private Properties tooMuchProp(Positions posi, int maxNofForeigners) { Properties p = new Properties(); if (posi.age > 27) { p.bitSet.set(OLDS); } else { p.bitSet.set(YOUNGSTERS); } if (posi.goalies > 3) { p.bitSet.set(GOALIES); } if (posi.defenders > 8) { p.bitSet.set(DEFENDERS); } if (po...
8
public static <T, N extends ModifiableBinaryTreeNode<T, N>> N predecessor(N t) { if (t == null) { return null; } else if (t.getLeft() != null) { N p = t.getLeft(); while (p.getRight() != null) { p = p.getRight(); } return p; } else { N ...
5
@Override public void mousePressed(MouseEvent mouseEvent){ if(!controller.isPlaying()) return; //To change body of implemented methods use File | Settings | File Templates. int mX = mouseEvent.getX(); int mY = mouseEvent.getY(); int dX...
5
public void insertaAntesDeX(T dato, T x){ Nodo<T> nodoQ = this.inicio; Nodo<T> nodoT = null; boolean bandera = true; if(this.inicio == null){ this.inicio = new Nodo<>(dato); }else{ while(nodoQ.getInfo() != x && bandera){ if(nodoQ.getLiga() != null){ nodoT = nodoQ; nodoQ = nodoQ.getLiga(); ...
6
public void mainLoop(boolean[] deactivated, int[] ext_disc_reason, RDPAdapter adapter) throws IOException, RdesktopException, OrderException, CryptoException { int[] type = new int[1]; boolean disc = false; /* True when a disconnect PDU was received */ boolean cont = true; RdpPacket_Localised data = nul...
8
static boolean authenticate( String username , String hashString, PassthroughConnection ptc ) { for (int i = 0; i < 5; i++) { try { String encodedUsername = URLEncoder.encode(username, "UTF-8"); String encodedHashString = URLEncoder.encode(hashString, "UTF-8"); String authURLString = new String( "h...
9
public static double[] sqrtVector( double[] inVector ) { int m = inVector.length; double[] outVector = new double[m]; for ( int i = 0; i < m; ++i ) outVector[i] = Math.sqrt(inVector[i]); return(outVector); }
1
public EvaluationResult evaluate(EvaluationCtx context) { EvaluationResult result = null; // look in the right section for some attribute values switch(target) { case SUBJECT_TARGET: result = context.getSubjectAttribute(type, id, ...
8
@EventHandler(priority = EventPriority.MONITOR) public void onSignPlace(SignChangeEvent event) { String[] line = event.getLines(); if (line[0].equalsIgnoreCase("[Shop]")) { String newLine = line[0]; String owner = line[3]; String[] shops = Shops.getShopList(); String shop = null; for (String s : sho...
7
boolean isLegalBox (int row, int col, int num) { int x = (row / 3) * 3 ; int y = (col / 3) * 3 ; for( int r = 0; r < 3; r++ ) { for( int c = 0; c < 3; c++ ) { if(r != row && c != col) { if( boardArray[y+c][x+r] == num ) { return false; } } } } return true; }
5
public void log (int level, String category, String message, Throwable ex) { StringBuilder builder = new StringBuilder(256); long time = new Date().getTime() - firstLogTime; long minutes = time / (1000 * 60); long seconds = time / (1000) % 60; if (minutes <= 9) builder.append('0'); builder.append(min...
9
public void movePlayer(Point dir) { switch (state) { case IN_OVERWORLD: game.mapHandler.movePlayer(dir); game.player.moveWorld(dir); game.player.senses.move(dir); break; case IN_DUNGEON: game.dungeonHandler....
2
private static Type getBoxedType(final Type type) { switch (type.getSort()) { case Type.BYTE: return BYTE_TYPE; case Type.BOOLEAN: return BOOLEAN_TYPE; case Type.SHORT: return SHORT_TYPE; case Type.CHAR: return CHARACTER_TYPE; case Type.INT: return INTEGER_TYPE; case Type.FLOAT: return F...
8
public int getSelection() { if(selectionOvalY == 3) return 1; else if(selectionOvalY == 27) return 2; else if(selectionOvalY == 51) return 3; else if(selectionOvalY == 75) return 4; else if(selectionOvalY == 99) return 5; else if(selectionOvalY == 123) return 6; else if(se...
8
@Inject public MailChimpApi(final Gson gson, @Named("Authorized") final MailChimpConfig config) { this.gson = gson; this.apiKey = config.getApiKey(); this.mailchimpHost = "https://" + config.getSubdomain() + ".api.mailchimp.com/2.0"; this.connTimeout = config.getConnTimeout(); }
0
public static ArrayList<MstxHeadImage> getHeadImage(int tid) {// ArrayList<MstxHeadImage> result = new ArrayList<MstxHeadImage>(); Connection con = DBUtil.getConnection(); PreparedStatement pstmt = null; ResultSet rs = null; try { pstmt = con.prepareStatement("select * from mstx_head where tid=?"); pstm...
8
protected void setMessageProperties(Message message) throws JMSException { for (Entry<String, String> entry : properties.entrySet()) { message.setStringProperty(entry.getKey(), entry.getValue()); } message.setJMSMessageID(getId()); }
1
public void gravarDisciplinasEmArquivo(String nomeArquivo) throws IOException { BufferedWriter gravador = null; try { gravador = new BufferedWriter(new FileWriter(nomeArquivo)); for (Disciplina disciplina : this.disciplina) { gravador.write(disciplina.getNome() + "\n"); gravador.write(disciplina.ge...
2
public static void main(String[] args) throws InterruptedException { Thread t1 = new Thread(new Runnable() { public void run() { try { producer(); } catch (InterruptedException ignored) {} } }); Thread t2 = new Thread(...
2
public void actionPerformed(ActionEvent e) { if ("next".equals(e.getActionCommand())) { update(1); } if ("forward".equals(e.getActionCommand())) { Integer num = new Integer(forwardEpochs.getText()); update(num.intValue()); } if ("restart".equals(e.getActionCommand())) { scape.frame.dispose(); ...
4
public Object clone() { try { VerifyInfo result = (VerifyInfo) super.clone(); result.stack = (Type[]) stack.clone(); result.locals = (Type[]) locals.clone(); return result; } catch (CloneNotSupportedException ex) { throw new AssertError("Clone not supported?"); } }
1
public void getHint() { higherCards =0; lowerCards = 0; unusedCards = 0; int c; int a; List<Card> d = new ArrayList<Card>(); d = Deck.getD(); for (int i = 0; i < d.size(); i++) { c = d.get(i).getValue(); a = actualCard.getValue(); if(c > a){ higherCards++; } else if...
3
public Quaternion toQuaternion() { float trace = m[0][0] + m[1][1] + m[2][2]; float w = 1; float x = 0; float y = 0; float z = 0; if( trace > 0 ) {// I changed M_EPSILON to 0 float s = 0.5f / (float)Math.sqrt(trace+ 1.0f); w = 0.25f / s; ...
4
public void drawSide(Graphics g) { for (int i=0; i < edges.size(); i++) { edges.get(i).drawSide(g); } }
1
public void evaluateFailure() { boolean failFlag = false; this.brakeFailure = train.brakeFailure; this.engineFailure = train.engineFailure; this.signalPickupFailure = train.signalPickupFailure; if(train.brakeFailure) { this.brakeFailure =...
4
private ElemIdSimilarityPair[] getKwindow(HashMap<Integer, DataRow> train, DataRow query, SimilarityCalculator simCal, boolean considerTime, int columnId, long timeWindow) { ElemIdSimilarityPair[] kwindow; if (cache.containsKey(query.getId())) { kwindow = cache.get(query.getId()); } else { kwindow = n...
7
public static void main(String[] args) { boolean[] primesUnder1000 = primeBoolArray(1000); ArrayList<Integer> possibleB = new ArrayList<Integer>(); for (int i = 0; i < primesUnder1000.length; i++) if (primesUnder1000[i]) { possibleB.add(i); possibleB.add(-i); } int maxA = 0, maxB = 0, maxPrime = 0...
5
public String toString(){ if(NetworkID == 0){ String nullString = "0"; return nullString; } if(((children.get(0).getChildren()==null) ) ) { return Global.chars[NetworkID]; } else { String s1 = children.get(0).toString(); String s2 = children.get(...
2
private void iterativeParseElement (Element elem, HashMap<String, String> hmap) { String tagName = elem.getNodeName(); NodeList children = elem.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node node = children.item(i); short nodeType = node.getNodeTy...
3
public int GetCurrentPacketUsingTheBus(int busNumber) { return sequence[busNumber]; }
0
@Override public Object invoke( Object object, Method method, Object[] arguments ) throws Throwable { assert object.getClass() == interfaceClass; assert targetClients != null; final MethodMeta meta = remoteMethods.get( method ); if (meta != null) { final RemoteMethodCall call = new RemoteMethodCal...
4
public void setPlayer1Score(int score){ boolean test = false; if (test || m_test) { System.out.println("Drawing :: setPlayer1Score() BEGIN"); } m_player1Score.setText("" + score); if (test || m_test) System.out.println("Drawing:: setPlayer1Score() - END"); }
4
private void writeObject(ObjectOutputStream out) throws IOException { System.out.println("starting writing mask..."); PathIterator it=area.getPathIterator(null); double[] coords=new double[6]; while(!it.isDone()) { int type=it.currentSegment(coords); out.writeInt(type); if(type==PathIterator...
5
protected void populateMenu(String paramString) { try { Class localClass1 = Class.forName(paramString); Vector localVector = this.state.getRobotPartPatterns(); OrderedTable localOrderedTable = new OrderedTable(); for (int i = 0; i < localVector.size(); i++) { RobotPart ...
8
private void displayHealth(Unit unit) { maximumHealthLabel.setText(String.valueOf(unit.getMaximumHealth())); currentHealthLabel.setText(String.valueOf(unit.getCurrentHealth())); healthBar.setMaximum(unit.getMaximumHealth()); healthBar.setValue(unit.getCurrentHealth()); if (unit.getCurrentHealth() < Abili...
2
private String getValue(JTextArea textArea, JCheckBox checkBox, String value) { if (checkBox == null) { if ((textArea == null) || (textArea.getText().length() == 0)) { return ""; } } else if ((textArea == null) || ((textArea.getText().length() == 0 && !checkBox.isSelected()))) { return ""; } re...
6
public void visitAttribute(final Attribute attr) { buf.setLength(0); buf.append("// ATTRIBUTE ").append(attr.type).append('\n'); if (attr instanceof ASMifiable) { buf.append("{\n"); ((ASMifiable) attr).asmify(buf, "attr", labelNames); buf.append(name).append("...
1
void walk() { // try until you find an available move while (true) { float r = p5.random(1); if (r < 0.25f && !p5.visited[x-step][y]) { x -= step; break; } else if (r < 0.50f && !p5.visited[x+step][y]) { x += step; break; } else if (r < 0.75f && !p5.visited[x][y-step]) { ...
9
protected E handleParseException(ParseException ex, final boolean shouldReportFailure) { if (shouldReportFailure) { ex.printStackTrace(); } return null; }
1
public void guardarTransformador() { if (puntoLuz.getTransformador().getId() == null) { verificarSeleccionParametricasTransformador(); transformadorFacade.create(puntoLuz.getTransformador()); } else { if (puntoLuz.getTransformador().getTipoTransformador().getId() != n...
9
public boolean handleRecord(Core root, GedcomRecord record, GedcomReader reader) { String tag = record.getTag(); Person person = (Person)root; if (tag.equalsIgnoreCase("SEX")) { person.setMale(record.getContent().equalsIgnoreCase("M")); return true; } else if (tag.equalsIgnoreCase("FAMS")) { person....
3
@Override public double evaluate(AnnotationIndex<Annotation> scores) { Iterator<Annotation> scoreIterator = scores.iterator(); List<AnswerScore> ansScores = new ArrayList<AnswerScore>(); int numberCorrect = 0; while (scoreIterator.hasNext()) { AnswerScore ansScore = (AnswerScore) scoreIterat...
6
public void drawVisible(Graphics2D g,Punkt3D p) { Punkt2D prot = new Punkt2D((int)(p.getX()/kartskala),(int)(p.getY()/kartskala)); for(int i = (int)prot.getX()-visuellGrad+1;i <= (int)prot.getX()+visuellGrad-1;i++) { for(int j = (int)prot.getY()-visuellGrad+1;j <= (int)prot.getY(...
6
public void setRequiredSkillRatings(List<SkillRating> requiredSkillRatings) { this.requiredSkillRatings = requiredSkillRatings; }
0