text
stringlengths
14
410k
label
int32
0
9
public void addFirst(E element) { LinkedElement<E> elem = new LinkedElement<E>(element); elem.setPrev(null); elem.setNext(first); if (total == 0) { last = elem; } if (total > 0) { first.setPrev(elem); } first = elem; total++; // System.out.println(elem.toInfoString()); // System.out.println(...
2
private static List<Point[]> translateAlphaToPoints(boolean[][] imageInformation, int width, int height) { int[][] label = new int[width][height]; Map<Integer, Integer> mergeLabels = new HashMap<Integer, Integer>(); List<List<Point>> unstructuredPolygonPointList = new ArrayList<List<Point>>(); unstructuredPo...
8
private void jButton27ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton27ActionPerformed // Create Order and refresh order and market list String serverID = "ALL"; String nymID = "ALL"; try { if (serverMap != null && serverMap.size() > 0 && jComboBox5...
8
public void setCountry(String country) { Address.setCountry(country); }
0
@Override public void update(Observable obs, Object arg) { if (!game.isInterrupted()) { Display.getDefault().syncExec(new Runnable() { public void run() { if (!shell.isDisposed()) { updateView(); ...
2
@Override public void run() { if (input_stream == null) return; int count; try { if (buffer == null) buffer = new byte[BuildConfig.BUFFER_SIZE]; // if (stream_processor != null) // stream_processor.reset(); while ((count = input_stream.read(buffer)) != -1) { if (stream_processor != null) ...
7
public void run() { for (Sensor sensor : this.sensors) { sensor.start(); } for (Sensor sensor : this.sensors) { System.out.print(sensor.report()); } for (Sensor sensor : this.sensors) { sensor.stop(); } }
3
public void parseXmlFile(String file){ //get the factory DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); try { //Using factory get an instance of document builder dbf.setValidating(true); dbf.setIgnoringElementContentWhitespace(true); dbf.setCoalescing(true); DocumentBuilder d...
9
public void update(Game game) { lastMovementType = Types.MOVEMENT.MOVE; //Get the input from the player. requestPlayerInput(game); //Map from the action mask to a Vector2D action. Direction action2D = Utils.processMovementActionKeys(getKeyHandler().getMask(), getPlayerID())...
3
public HugeArrayList<T> create() { normaliseArgs(); try { if (arrayListClass == null) arrayListClass = classLoader().loadClass(typeModel.type().getName() + "ArrayList"); } catch (ClassNotFoundException e) { acquireImplClass(); defineClass(GenerateHugeArrays.dumpElement(typeModel)...
6
@Test public void testReserve() throws Exception{ ThreadDriver thread = new ThreadDriver(); thread.start(); SpotStub stub = new SpotStub("312",3738); String ans = ""; int x = 0; while(x != -1 && x < 100){ //if no response is received in 10 seconds, test is deemed failed. x++; ...
3
public static void sendMessageToPlayer( String player, String message ) { if ( player.equals( "CONSOLE" ) ) { ProxyServer.getInstance().getConsole().sendMessage( message ); } else { for ( String line : message.split( "\n" ) ) { getPlayer( player ).sendMessage( lin...
2
public static int getStringWidthWithFont(Font font, String value) { if (font == null || value == null) { return 0; } FontMetrics fm = getFontMetrics(font); return fm.stringWidth(value); }
2
public int insert(Funcionario f) { Connection conn = null; PreparedStatement pstm = null; int retorno = -1; try { conn = ConnectionFactory.getConnection(); pstm = conn.prepareStatement(INSERT, Statement.RETURN_GENERATED_KEYS); pstm.setString(1, f.get...
3
public static void saveTransactions(SWDataClass swDataClass) { FileOutputStream saveFile; ObjectOutputStream save; try { // Open a file to write to saveFile = new FileOutputStream(SAVE_FILE_DIRECTORY + "\\" + SAVE_FILE_NAME); save = new ObjectOutputStream(saveFile); // Save the whole class save....
2
private static int partition(Comparable[] a, int lo, int hi) { int i = lo; int j = hi + 1; while (true) { while (less(a[++i], a[lo])) if (i == hi) break; while (less(a[lo], a[--j])) if (j == lo) break...
6
public void setEntityList(List<ValidableEntity> entityList) { this.entityList = entityList; }
0
public LRParseTable getParseTable() { return table; }
0
static public void adjustBeginLineColumn(int newLine, int newCol) { int start = tokenBegin; int len; if (bufpos >= tokenBegin) { len = bufpos - tokenBegin + inBuf + 1; } else { len = bufsize - tokenBegin + bufpos + 1 + inBuf; } int i = 0, j = 0, k = 0; ...
6
public char getNextChar() { thisChar = ++position < json.length() ? json.charAt(position) : 0; return thisChar; }
1
private String updateAccountBalance(String residentId, double amount, Session session, boolean isCredit) { Double cashBackPercentage = Double.parseDouble(env.getProperty("cashback_percentage")); Transaction tx = session.getTransaction(); String hql = HibernateQueries.getAccountsQueryBasedonResid...
9
public void createFromXML(NodeList shop) { Node n = shop.item(0); while(n != null) { if(n.getNodeType() == Node.ELEMENT_NODE) { if(n.getNodeName().equalsIgnoreCase("ShopItem")) { createShopItem(n); } else if(n.getNodeName()....
5
public static boolean isApplicable(Object object) { return object instanceof Serializable; }
0
public Stats() throws FileNotFoundException { String slvl = new String(); String sName = new String(); Scanner sin = new Scanner(System.in); int atk = 1; int lvl = 0; int hp = 0; int currXp = 0; int Xpgoal = 0; try { File level = new F...
9
public Toolbar(CConn cc_) { super(); cc = cc_; BufferedImage bi = new BufferedImage(176, 16, BufferedImage.TYPE_INT_ARGB); Graphics2D g = bi.createGraphics(); g.drawImage(toolbarImage, 0, 0, 176, 16, null); setAlignmentX(java.awt.Component.LEFT_ALIGNMENT); setAlignmentY(java.awt.Compon...
6
@Override public final boolean onCommand(final CommandSender sender, final Command cmd, final String label, final String[] args) { try { commands.execute(cmd.getName(), args, sender, sender); } catch (CommandPermissionsException e) { sender.sendMessage(ChatColor.RED + message...
6
public void propertyChange(PropertyChangeEvent e) { boolean update = false; String prop = e.getPropertyName(); //If the directory changed, don't show an image. if (JFileChooser.DIRECTORY_CHANGED_PROPERTY.equals(prop)) { file = null; update = true; //If...
4
public static User getUserByUserID(int userID) { try { String statement = new String("SELECT * FROM " + DBTable + " WHERE userid = ?"); PreparedStatement stmt = DBConnection.con.prepareStatement(statement); stmt.setInt(1, userID); ResultSet rs = stmt.executeQuery(); rs.next(); User user = new User(r...
1
public void carregarTurmasDeDisciplinasEmArquivo(String nomeArquivo) throws IOException, DisciplinaInexistenteException, TurmaJaExisteException { BufferedReader leitor = null; try { leitor = new BufferedReader(new FileReader(nomeArquivo)); String CodDis = leitor.readLine(); do { if (CodDis != ...
4
private final void buildNotifications() { // any function that calls this should be wrapped in synchronized(notifications) to make sure that it doesn't change before that function finishes with the updated notifications if (!bDirty) { return; } final Set<Integer> chs = WorldRegistryImpl.getInstance().getChanne...
7
public boolean matches(Inventory inv) { for (int i = 0; i <= 3 - recipeWidth; i++) { for (int j = 0; j <= 3 - recipeHeight; j++) { if (checkMatch(inv, i, j, true)) { return true; } if (checkM...
4
@Override public int hashCode() { int result = firstName != null ? firstName.hashCode() : 0; result = 31 * result + (secondName != null ? secondName.hashCode() : 0); result = 31 * result + (email != null ? email.hashCode() : 0); result = 31 * result + (phone != null ? phone.hashCode(...
4
boolean obviousBlockExists() { // проверка на то что доска имеет участок который никогда не будет заполнен изза // количества квадратов в нем blockCheckCt++; int forcedEmptyCt = 0; for (int r = 0; r < rows; r++) for (int c = 0; c < cols; c++) { int blockSi...
4
public Updater(Plugin plugin, int id, File file, UpdateType type, boolean announce) { this.plugin = plugin; this.type = type; this.announce = announce; this.file = file; this.id = id; this.updateFolder = plugin.getServer().getUpdateFolder(); final File pluginFile...
9
public void setQuickLaunchFile(File f, int index){ if(index < 0 || index >= QUICK_SLOTS) return; quick_launch_files[index] = f; //sendQuickLaunchFiles(); sendQuickLaunchFile(index); changedQLFiles(); }
2
protected void setPrecio(double precio)throws Exception { if(precio<1){ throw new Exception("El precio tiene que ser superior a 0."); }else{ this.precio = precio; } }
1
public static void copyEdge(XSSFWorkbook wb, XSSFSheet sheet, int size) throws IOException { FileInputStream fis = null; try { fis = new FileInputStream(new File("data/excel/template.xlsx")); XSSFWorkbook template = new XSSFWorkbook(fis); XSSFSheet tempSheet = template.getSheet(Integer.toString(size)); ...
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 Fornecedor)) { return false; } Fornecedor other = (Fornecedor) object; if ((this.cpf == null && other.cpf != nu...
5
public TabStripperFileContentsHandler(int numOfTabs, String lineEnding) { super(lineEnding, false); setNumOfTabs(numOfTabs); }
0
public void visit_pop2(final Instruction inst) { stackHeight -= 2; if (stackHeight < minStackHeight) { minStackHeight = stackHeight; } }
1
public boolean isInsideRectangle( int x, int y, int width, int height ) { boolean upper_left_corner = ( ( x < this.x && this.x < x + width ) && ( y < this.y && this.y < y + height ) ); boolean lower_right_corner = ( ( x < this.x + this.width && this.x + this.width < x + width ...
7
@EventHandler public void movedOreGin(InventoryClickEvent event) { ItemStack cursorItem = event.getCursor(); ItemStack slotItem = event.getCurrentItem(); if (cursorItem.getType() == Material.DISPENSER) { if (slotItem.getType() == Material.DISPENSER) { if (oreGinMan.isOreGin(cursorItem) || oreGin...
6
public String getCurrentPuzzle() { String currentPuzzle = ""; int i = 0, j = 0; for(i = 0; i < 9; i++) { for(j = 0; j < 9; j++) { if(entries[i][j].isEditable()) { currentPuzzle = currentPuzzle +"E "; } else { currentPuzzle = currentPuzzle +"N "; } if(entries[i][j].ge...
4
public static void openURL(final String url) { try { //attempt to use Desktop library from JDK 1.6+ Class<?> d = Class.forName("java.awt.Desktop"); d.getDeclaredMethod("browse", new Class[]{java.net.URI.class}).invoke( d.getDeclaredMethod("getDesktop").invoke(null), ...
9
Matrix QRsolve(Matrix B, Matrix X, Transpose trans) { int nrhs = B.numColumns(); // Allocate temporary solution matrix DenseMatrix Xtmp = new DenseMatrix(Math.max(numRows, numColumns), nrhs); int M = trans == Transpose.NoTranspose ? numRows : numColumns; for (int j = 0; j < nrhs...
8
private void swim(int i) { int t = pq[i]; // Save for later restoring while (i > 1 && greater(items[pq[i / 2]], items[t])) { pq[i] = pq[i / 2]; // half exchanges qp[pq[i / 2]] = i; // reverse index i /= 2; } pq[i] = t; // restore in the correct position qp[t] = i; // reverse index }
2
@Override public int hashCode() { int result = name.hashCode(); result = 31 * result + (elements != null ? elements.hashCode() : 0); return result; }
1
final int[][] method3047(int i, int i_2_) { if (i_2_ != -1564599039) method3150(true); anInt9468++; int[][] is = ((Class348_Sub40) this).aClass322_7033.method2557(-117, i); if (((Class322) ((Class348_Sub40) this).aClass322_7033).aBoolean4035) { int[][] is_3_ = this.method3039((byte) -88, i, 0); ...
9
private void downloadAttachmentButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_downloadAttachmentButtonActionPerformed if (attachmentsComboBox.getSelectedItem() != null){ JFileChooser filechooser = new JFileChooser(); filechooser.setFileSelectionMode(JFileCho...
4
private void UpdateUI() { double monthlyCost = 0.00; double planCost = 0.00; double phoneCost = 0.00; double addOnCost = 0.00; double taxes = 0.00; double phoneCostFinal = 0.00; /* * look to see which radio buttons in each group are selected, then * check to see which/if any add-ons selected */ ...
8
public String getFood(){ return food; }
0
protected Node<T> getReplacementNode(Node<T> nodeToRemoved) { Node<T> replacement = null; if (nodeToRemoved.lesser != null && nodeToRemoved.greater == null) { // Using the less subtree replacement = nodeToRemoved.lesser; } else if (nodeToRemoved.greater != null && nodeToRemoved.lesser == null) { ...
9
public static void main(String[] args) { /* * input parameters: * 1.) algorithm type: which implementation * 2.) inputFile number * 3.) boundary: boundary for the generation (optional) * 4.) show result (optional) */ if (args.length < 1) { System.err.println("Missing Argument(s)! [algorithm-...
9
public static Cons javaTranslateMethodCall(Cons tree) { { Symbol methodname = ((Symbol)(tree.rest.rest.value)); Surrogate classtype = ((Surrogate)(tree.rest.value)); Cons allargs = tree.rest.rest.rest; Stella_Object renamed_Object = tree.fourth(); if (methodname == Stella.SYM_STELLA_DEFINED...
8
public static byte stringToByte(String str){ byte b = 0; if(str!=null){ try{ b = Byte.parseByte(str); }catch(Exception e){ } } return b; }
2
public static String createStateNameFromStatesList(List<String> states){ if(states.isEmpty()) return ""; String result = states.get(0); if(states.size() >= 2){ for(int i=1; i< states.size(); i++){ result += "|" + states.get(i); } } ...
3
@Override public MapConnector<String, Double> putAll(Map<? extends String, ? extends Double> map) throws Exception { String stm; try (Connection con = getConnectorInfo().getConnection()) { stm = getCreateTableTmp(getConnectorInfo().getTableName()); try (PreparedStatement prep...
7
public c.ty.Type refine(TypeDef typeCtx, MethodDef methodCtx) { if (genericArgs.length == 0) { if (methodCtx != null) { int index = methodCtx.genericParamIndex(rawType); if (index != -1) return new c.ty.MethodGenericType(index); } ...
7
protected SecretKey engineGenerateSecret(KeySpec spec) throws InvalidKeySpecException { if (!(spec instanceof PBEKeySpec)) { throw new InvalidKeySpecException("not a PBEKeySpec"); } IRandom kdf = PRNGFactory.getInstance("PBKDF2-"+macName); HashMap attr = new HashMap(); at...
5
private void init(){ m_cross = new ImageIcon(getClass().getResource( "Cross.png")); m_nought = new ImageIcon(getClass().getResource( "Nought.png")); m_crossWin = new ImageIcon(getClass().getResource( "CrossWin.png")); m_noughtWin = new ImageIcon(getClass().getResource( "NoughtWin.png")); m_bg...
3
public void create(TObject TObject) { if (TObject.getObjectFieldsList() == null) { TObject.setObjectFieldsList(new ArrayList<ObjectFields>()); } EntityManager em = null; try { em = getEntityManager(); em.getTransaction().begin(); List<Objec...
5
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Delta other = (Delta) obj; if (original == null) { if (other.original != ...
9
public String MenMan (){ if(elementos[0]<elementos[1]&&elementos[1]<elementos[2]&& elementos[2]<elementos[3]&&elementos[3]<elementos[4]&& elementos[4]<elementos[5]&&elementos[5]<elementos[6]&& elementos[6]<elementos[7]&&elementos[7]<elementos[8]&& elementos[8]<elem...
9
private void writeValue(Object value) throws JSONException { if (value instanceof Number) { String string = JSONObject.numberToString((Number) value); int integer = this.values.find(string); if (integer != none) { write(2, 2); writeAndTick(inte...
9
public static DataSectionable constructDataSectionableForNonListObject(Class dataSectionableClass, Object object) { if (null == dataSectionableClass) throw new RuntimeException("dataSectionableClass is null."); if (object instanceof List) throw new RuntimeException("object is List."); ...
7
public static void main(String[] args) throws IOException { if (args.length > 3) { System.err.println(USAGE_MESSAGE); System.exit(1); } FileInputStream in = new FileInputStream(args[1]); Test.copyStream(new ArithCodeInputStream(args.length < 2 ? System.in : new java.io.FileInputStream(args[1]), new...
4
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String accessToken = (String) request.getSession().getAttribute( ACCESS_TOKEN); if (accessToken == null) { String instanceUrl = null; if (request.getRequestURI().endsWith("oauth")) { ...
3
public void layPath(Node[][] map, int pathWidth) { Point pointer = new Point(start); int wanderCounter=20; while (pointer.x != end.x || pointer.y != end.y) { for (int px=0; px<pathWidth; px++) { for (int py=0; py<pathWidth; py++) { // if (!map[pointer.x+px][pointer.y+py].isRoom()) map[pointer.x+p...
8
public void run() { try { InputStream in = s.getInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String line; while ((line = reader.readLine()) != null) { // at this point send out to all clients messages.add(line); // all threads use same List of messages }...
2
public String[] getKtivMale() { String[] arr = this.ktivMale.split(" או |,"); for (int i = 0; i < arr.length; i++) { arr[i] = arr[i].trim(); } return arr; }
1
public void setName(String name) { Connection conn = null; PreparedStatement ps = null; try { conn = iConomy.getiCoDatabase().getConnection(); ps = conn.prepareStatement("UPDATE " + Constants.SQLTable + "_Banks SET name = ? WHERE id = ?"); ps.setString(1, name); ps.setInt(2, thi...
5
private final void step6() { j = k; if (b[k] == 'e') { int a = m(); if (a > 1 || a == 1 && !cvc(k-1)) k--; } if (b[k] == 'l' && doublec(k) && m() > 1) k--; }
7
public void act() { ArrayList<Actor> neighbors = new ArrayList<Actor>(getGrid().getNeighbors(getLocation())); for(Actor neighbor : neighbors) { if(neighbor instanceof Apple) { new ApplePie().putSelfInGrid(getGrid(), neighbor.getLocation()); } } move(); }
2
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(false); List<ReservatieMandjeItem> gelukteReservaties = new ArrayList<>(); List<ReservatieMandjeItem> mislukteReservaties = new ArrayList<>(); if (sessio...
5
@Override protected Class<? extends Attribute>[] computeValue(Class<?> clazz) { final Set<Class<? extends Attribute>> intfSet = new LinkedHashSet<>(); // find all interfaces that this attribute instance implements // and that extend the Attribute interface do { for (Class<?> curInter...
9
public PluginDescriptionFile getPluginDescription(File file) throws InvalidDescriptionException { Validate.notNull(file, "File cannot be null"); JarFile jar = null; InputStream stream = null; try { jar = new JarFile(file); JarEntry entry = jar.getJarEntry(...
7
public static int ntz3(long x) { // another implementation taken from Hackers Delight, extended to 64 bits // and converted to Java. // Many 32 bit ntz algorithms are at http://www.hackersdelight.org/HDcode/ntz.cc int n = 1; // do the first step as a long, all others as ints. int y = (int) x; if( y == 0 ...
5
public void stop() { clip.stop(); }
0
public static <E extends Comparable<E>> int positionOfRotated(E[] array, E element) { if (array == null) return -1; int leftIndex = 0; int rightIndex = array.length - 1; int pivot; while (leftIndex <= rightIndex) { pivot = (rightIndex + leftIndex) / 2; if (element.compareTo(array[pivot]) ==...
8
public void start() throws InterruptedException { Grid clone = initialGrid.clone(); clone.setOriginal(); stack.add(clone); for (int i = 0; i < threadsCount; i++) { threads[i] = new GridWorker(this, i); threadStates[i] = false; threads[i].start(); } while (!stopCalled) { boolean waiting = true;...
5
protected double[] svmlightToArray(String row) throws Exception { double[] result; StringTokenizer tok; int index; int max; String col; double value; // actual data try { // determine max index max = 0; tok = new StringTokenizer(row, " \t"); tok.nextToken(...
8
private Object newBuffer(Object template) { if(template instanceof Object[]) return new Object [((Object[]) template).length] ; if(template instanceof byte[]) return new byte [((byte[]) template).length] ; if(template instanceof char[]) return new char [((char[]) template).length] ; ...
9
public static HandRank omaha(Cards hand, Cards board) { // In Omaha we must use 2 cards from our hand HandRank best = null; List<Cards> boardSubsets = choose3(board); List<Cards> handSubsets = choose2(hand); for (Cards boardCards : boardSubsets) { for (Cards handCards...
4
public void setEncoding(String value) { this.encoding = value; }
0
@Override public void updateLong() { super.updateLong(); if(generationTimerEnd == 0) { resetGenerationTimer(); } if(generationTimerEnd <= System.currentTimeMillis() && this.isActivated()) { placeableManager.playerAddItem("Silver", 1); ...
3
public double strategySpeed(double time) { double speed = 0.0; switch(carStatus){ case ACCELERATE: speed = tempSpeed + (acceleration*time); break; case DECELERATE: speed = tempSpeed - (acceleration*time); break; case STOP: speed = 0.0; break; case CONSTANT: speed = tempSpeed; break; ...
4
@Override public final boolean setDebug(boolean d) { return (debug = d); }
0
public void goToFrame(int frameNum) { if (frameNum < 0 || frameNum >= frames.size()) { throw new IndexOutOfBoundsException(); } this.frameNum = frameNum; }
2
public void addRow(List<Double> row) { if (row.size() != getNumCols()) { throw new MLException(String.format( "Cannot add a row with mismatching number of columns to matrix. Expected: %d, Got: %d", getNumCols(), row.size())); } for (Double valu...
3
private static void addMod(ClassLoader var0, String var1) { try { String var2 = var1.split("\\.")[0]; if (var2.contains("$")) { return; } if (props.containsKey(var2) && (props.getProperty(var2).equalsIgnoreCase("no") || pr...
8
@Override public void startSetup(Attributes atts) { super.startSetup(atts); addActionListener(this); }
0
public static String getColorDescription(int type) { String desc = ""; switch (type) { case HONG_TAO: desc = "r"; break; case FANG_PIAN: desc = "r"; break; case MEI_HUA: desc = "b"; break; case HEI_TAO: desc = "b"; break; } return desc; }
4
public String read(String chunk_uuid) { Socket client = null; try { client = new Socket(InetAddress.getLocalHost(), port);// 򱾻port˿ڷͻ }catch (IOException e) { // TODO Auto-generated catch block return "-1"; } ObjectOutputStream out = null; try {out = new ObjectOutputStream(client.getOutputStream(...
5
@Override public void run () { try { while (true) { String s = In.readLine(); if (s == null || s.equals("@@@@end")) throw new IOException(); Dump.println("From Partner: " + s); if (s.startsWith("@@busy")) { T.append(Global.resourceString("____Server_is_busy____")); return; ...
6
public MapEditor() { }
0
public void getBipartiteGraph(mxAnalysisGraph aGraph, int numVerticesGroup1, int numVerticesGroup2) { if (numVerticesGroup1 < 0 || numVerticesGroup2 < 0) { throw new IllegalArgumentException(); } int numVertices = numVerticesGroup1 + numVerticesGroup2; mxGraph graph = aGraph.getGraph(); Object parent =...
6
public Production[] getNewProductions(String variable, Production[] oldProductions) { ArrayList list = new ArrayList(); for (int k = 0; k < oldProductions.length; k++) { list.add(new Production(variable, oldProductions[k].getRHS())); } return (Production[]) list.toArray(new Production[0]); }
1
@Override public boolean isMine(String command) { Iterable<String> ans = Splitter.on(' ').omitEmptyStrings().split(command); arguments.clear(); CollectionUtils.addAll(arguments, ans.iterator()); if (arguments.get(0).equals(commandName)) { if (argumentNumber != 0 && argume...
3
public static void pointsSpent(String prestige, int ap){ pointsSpent += ap; //update the trees points spent for(ClassTree ct : takenPrestigeTrees){ if(ct.getPrestige().equalsIgnoreCase(prestige)) ct.spendAp(ap); } if(prestige.equalsIgnoreCase(characterRace)) racialTree.spendAp(ap); }
3
private double rowAdd(Double[][] mat, int rowTo, int rowFrom, double scaleFactor) { List<Future> futures = new ArrayList<Future>(col); if (rowTo == rowFrom) return rowScale(mat[rowTo], scaleFactor + 1) + 0.0; for (int i = 0; i < mat[0].length; i++) { // mat[rowTo][i] = mat[rowTo][i] + mat[rowFrom][i] *...
5