text
stringlengths
14
410k
label
int32
0
9
@Override public boolean equals(Object o){ if(o == null){ return false; } else if (o.getClass() != this.getClass()){ return false; } else if(this.word.equals(((Node)o).getWord())){ return true; } return false; }
3
public boolean isIDexist(int id) { String select="select count(*)from citedlist where paperid="+id; int count=0; count=sqLconnection.Count(select); if(count!=0) return true; else return false; }
1
public static void main(String[] args) { final Preferences prefs = Preferences.userRoot().node(Prefs.class.getName()); try { prefs.clear(); } catch (Exception e) { } }
1
public void actionPerformed(ActionEvent ae) { if( ae.getSource() == this.searchQuery || ae.getSource() == this.search ) { //displays results matching the query typed into the search box ArrayList<Item> results = this.library.searchByTag( this.searchQuery.getText() ); this.currentListModel = new DefaultLi...
8
public ListNode deleteDuplicates(ListNode head) { if (head == null) return null; ListNode p = head; ListNode t = new ListNode(0); t.next = head; head = t; p = p.next; while (p != null) { if (t.next.val == p.val) { p = p.n...
6
static void setup_connection(FM_CH CH) { IntSubArray carrier = new IntSubArray(out_ch, CH.PAN); /* NONE,LEFT,RIGHT or CENTER */ switch (CH.ALGO) { case 0: /* PG---S1---S2---S3---S4---OUT */ CH.connect1 = new IntSubArray(pg_in2); CH.connect2 =...
8
public boolean isInside(int mx, int my) { return (mx > x && mx < x + width) && (my > y && my < y + height); }
3
public Installation[] selectByActivity ( int activityId ) { Connection con = null; PreparedStatement statement = null; ResultSet rs = null; List<Installation> installations = new ArrayList<Installation>(); try { con = ConnectionManager.getConnection(); String searchQuery = "SELECT * FROM i...
8
public void setAuthor(Author author) { this.author = author; }
0
private void isDogWithAllData(Dog dog) { boolean hasError = false; if(dog == null){ hasError = true; } if (dog.getName() == null || "".equals(dog.getName().trim())){ hasError = true; } if(dog.getWeight() <= 0){ hasError = true; } if (hasError){ throw new IllegalArgumentExc...
5
public static int hue(int color) { double red = (color & RED_MASK) >> 16; double green = (color & GREEN_MASK) >> 8; double blue = (color & BLUE_MASK); return (int)Math.atan2(Math.sqrt(3)*(green - blue), 2*red - green - blue); }
0
* @param y The y-coordinate. * @param column The column the coordinates are currently over. * @param row The row the coordinates are currently over. * @return <code>true</code> if the coordinates are over a disclosure triangle. */ public boolean overDisclosureControl(int x, int y, Column column, Row row) { i...
6
void updateInOut(FlowBlock successor, SuccessorInfo succInfo) { /* * First get the gen/kill sets of all jumps to successor and calculate * the intersection. */ SlotSet kills = succInfo.kill; VariableSet gens = succInfo.gen; /* * Merge the locals used in successing block with those written by this ...
3
private void scale(final float m, final float[] a, int offa) { final float norm = (float) (1.0 / m); int nthreads = ConcurrencyUtils.getNumberOfThreads(); if ((nthreads > 1) && (n >= ConcurrencyUtils.getThreadsBeginN_1D_FFT_2Threads())) { nthreads = 2; final int k = n / n...
7
public boolean equals(final Object value) { if (!(value instanceof SourceValue)) { return false; } SourceValue v = (SourceValue) value; return size == v.size && insns.equals(v.insns); }
2
public Integer getInhusa() { return inhusa; }
0
private void positionPlayerKickOff(int teamNumber) { switch (teamNumber) { case TEAM_1:{ Random generator = new Random(); int kickOffPlayerID = playmode.getTeams()[teamNumber].getUser()[generator.nextInt(playmode.getTeams()[teamNumber].getUser().length)].getID(); GameObject ball = gameObjects.get("BALL"); ...
8
private void validateContext() { readyForExchange_ = localRoutingTable_.getLocalhost() != null && remoteRoutingTable_ != null && remoteRoutingTable_.getLocalhost() != null; }
2
public Entry getEntry(int index) { for (int i = 0; i < entries.length; i++) { if (entries[i].index == index) { return entries[i]; } } return null; }
2
private void persist(PersistAction persistAction, String successMessage) { if (selected != null) { this.setEmbeddableKeys(); try { if (persistAction != PersistAction.DELETE) { this.ejbFacade.edit(selected); } else { ...
6
public void sentencesWithSameWords(String resultFilePath) throws IOException{ if(text == null) return; int maxNumberOfWords = 0; ArrayList<Sentence> result = new ArrayList<Sentence>(); for(int i = 0; i < text.numberOfParagraphs(); i++){ Paragraph currParagraph = t...
6
public String getAccessString() { StringBuffer sb = new StringBuffer(); if (AccessFlags.isPublic(this.accessFlags)) sb.append("public "); if (AccessFlags.isPrivate(this.accessFlags)) sb.append("private "); if (AccessFlags.isProtected(this.accessFlags)) ...
8
private void actualizarTabla(){ if (a.getSizeArray() < 15) { for (int i = 0; i < 15; i++) { if (i < a.getSizeArray()) tabla.setValueAt(a.getProc(i).getNombre(), i, 0); else tabla.setValueAt("", i, 0)...
7
public static void listProjectsEmployees(EntityManager entityManager) { TypedQuery<Project> query = entityManager.createQuery( "select distinct p from Project p join fetch p.employees", Project.class); List<Project> resultList = query.getResultList(); entityManager.close(); for (Project project : resu...
1
@Override public void draw(Graphics2D g) { if (dead) return; AffineTransform old = g.getTransform(); if (rotate) { AffineTransform at = g.getTransform(); at.rotate(angle, pos.x, pos.y); g.setTransform(at); } g.drawImage(image, (int) pos.x, (int) pos.y, Game.w); g.setTransform(old); i...
4
public boolean remove(Link<Integer> link) { Link<Integer> position = this.head; if (link == null || this.head == null) { return false; } if (link.equals(this.head)) { this.head = link.getNext(); if (this.head == null) { ...
7
public Metadonnee getMetadonnee() { return metadonnee; }
0
public boolean batchFinished() throws Exception { if (getInputFormat() == null) throw new IllegalStateException("No input instance format defined"); Instances toFilter = getInputFormat(); if (!isFirstBatchDone()) { // filter out attributes if necessary Instances toFilterIgnoringAttri...
8
private void assertExteriorRing() { if (coordinates.isEmpty()) { throw new RuntimeException("No exterior ring defined"); } }
1
public static ServiceConditionEnumeration fromString(String v) { if (v != null) { for (ServiceConditionEnumeration c : ServiceConditionEnumeration.values()) { if (v.equalsIgnoreCase(c.toString())) { return c; } } } throw new IllegalArgumentException(v); }
3
public JTextField getPassword(){ String pass=passT.getText(); String confirmedPass=confirmPassT.getText(); if(pass.equals(confirmedPass)){ return passT; }else return null; }
1
private void displayBoard(TicTacToeBoard state) { for (int row = 0; row < TicTacToeBoard.SIZE; row++) { for (int col = 0; col < TicTacToeBoard.SIZE; col++) { if (state.getState(row, col) == TicTacToeBoard.X) { cellLabel[row * TicTacToeBoard.SIZE + col].setText("X"); } else if (state.getState(row, col)...
4
public String[] someoneElse(boolean place) { try{ driver.get(baseUrl + "/content/lto/2013.html"); //global landing page driver.findElement(By.xpath("/html/body/div[2]/div/div/div/div/div/div/div[3]/ul/li/a")).click(); //Brunei landing page - Order Now button driver.findElement(By.xpath("/html...
8
public boolean fichierMove(File ancien_emplacement, File nouvelle_emplacement) { if (ancien_emplacement.renameTo(nouvelle_emplacement)) return true; else return false; }
1
public static boolean legalInput(int x1, int x2, int x3, int x4){ if ((x1 >= 0 && x1 <= 7) && (x2 >= 0 && x2 <= 7) && (x3 >= 0 && x3 <= 7) && (x4 >= 0 && x4 <= 7)){ return true; } return false; }
8
private void action(final String input) { System.out.println(MSG_INACTION+input); for (int i = 0;i<input.length();i++) { printADigit(input.substring(i,i+1)); } }
1
public RangeType(ReferenceType bottomType, ReferenceType topType) { super(TC_RANGE); if (bottomType == tNull) throw new jode.AssertError("bottom is NULL"); this.bottomType = bottomType; this.topType = topType; }
1
public EmprestimoComboBox pesquisarTodosCodigoCidadaoEstoque() { EmprestimoComboBox emprestimoComboBox = new EmprestimoComboBox(); Connection connection = conexao.getConnection(); try { String valorDoComandoUm = comandos.get("pesquisarTodosCodigoCidadaoEstoque"); Prepared...
6
private JSONWriter end(char mode, char c) throws JSONException { if (this.mode != mode) { throw new JSONException(mode == 'a' ? "Misplaced endArray." : "Misplaced endObject."); } this.pop(mode); try { this.writer.write(c); }...
3
@Override public Component getListCellRendererComponent(JList<? extends RiverComponent> list, RiverComponent value, int index, boolean isSelected, boolean cellHasFocus) { if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); ...
2
private void saveFile(HashSet<String> words, String name) { File file; FileWriter writer = null; file = new File(this.getDataFolder(), name); if(!file.exists()) { try { file.createNewFile(); } catch (IOException e) { logger.severe("[" + pdfdescription + "] Unable to create login config fi...
6
public static boolean verifyNewPatient(NewPatientPage newPatient){ Patient patient = new Patient(); if(InputChecker.name(newPatient.getfName().getText())){ patient.setFirstName(newPatient.getfName().getText()); if(InputChecker.name(newPatient.getfName().getText())){ patient.setLastName(newPatient.getlName...
7
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 fe...
6
protected synchronized void storeContent() throws IOException, MediaWiki.MediaWikiException { final Map<String, String> getParams = paramValuesToMap("action", "query", "format", "xml", "prop", "revisions", "rvprop", "content", "revids", Long.toString(revisionID)); final String url = createApiGetUrl(getParams); ...
5
private String scanDirectiveName () { int length = 0; char ch = peek(length); boolean zlen = true; while (ALPHA.indexOf(ch) != -1) { zlen = false; length++; ch = peek(length); } if (zlen) throw new TokenizerException("While scanning for a directive name, expected an alpha or numeric character bu...
3
public List getChangedComponents() { ArrayList components = YUIToolkit.getViewComponents(controller.getView()); Iterator it = components.iterator(); ArrayList result = new ArrayList(); while (it.hasNext()) { Object comp = it.next(); boolean changes = false; ...
6
public boolean hasChanged() { if ( parent != null && parent.hasChanged() ) return true; if ( !pos.equals( oldPos ) ) return true; if ( !rot.equals( oldRot ) ) return true; if ( !scale.equals( oldScale ) ) return true; return false; }
5
protected int advQuoted(String s, StringBuffer sb, int i) { int j; int len= s.length(); for (j=i; j<len; j++) { if (s.charAt(j) == '"' && j+1 < len) { if (s.charAt(j+1) == '"') { j++; // skip escape char } else if (s.charAt(j+1) == fieldSep) {...
7
public NewFactionEditor() { setTitle("New Faction"); setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); setBounds(100, 100, 300, 150); getContentPane().setLayout(new BorderLayout()); contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); getContentPane().add(contentPanel, BorderLayout.CENTER); contentPanel...
1
@Override public void keyReleased(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) actionPerformed(new ActionEvent(commandLineButton, 0, "")); if (e.getKeyCode() == KeyEvent.VK_UP && commandLineHistoryPointer > -1 && commandLineHistory.size() != 0) { commandLineField .setText(commandLineHistor...
9
private void calculate() { if(model == null) return; Double factor = jTextFieldFactor.getText().equals("") ? 0.0 : Double.parseDouble(jTextFieldFactor.getText()); Double fieldA = jTextFieldA.getText().equals("") ? 0.0 : Double.parseDouble(jTextFieldA.getText()); Double ...
9
public void init() { BmTestManager bmTestManager = BmTestManager.getInstance(); if (!JMeterUtils.getPropDefault(Constants.BLAZEMETER_TESTPANELGUI_INITIALIZED, false)) { JMeterUtils.setProperty(Constants.BLAZEMETER_TESTPANELGUI_INITIALIZED, "true"); final IRunModeChangedNotifica...
4
public void setIdCombinacion(int idCombinacion) { this.idCombinacion = idCombinacion; }
0
public TreeNode buildTree(int[] inorder, int[] postorder) { int length = inorder.length; if(length ==0) return null; int pos = indexOf(inorder,postorder[length-1]); TreeNode node = new TreeNode(postorder[length-1]); if(pos >0) node.left = buildTree(Arrays....
3
public java.security.cert.X509Certificate[] getAcceptedIssuers() { java.security.cert.X509Certificate[] chain = null; try { TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); KeyStore tks = KeyStore.getInstance("JKS"); tks.load(this.getClas...
1
public static void saveLogs() { if(logsBuffer.isEmpty()) return; try { PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(logFile, true))); String logStr = null; while((logStr = logsBuffer.poll()) != null) { pw.println(logStr); } pw.close(); } catch (FileNotFoundException e) { ...
4
public static int search_type_by_name(Type_table type_table, String name) { int num = type_table.type_name.size(); for (int i = 0; i < num; i++) { if (type_table.type_name.get(i).toString().equals(name)) { return i; } } return -1; }
2
public void keyPressed(KeyEvent e) { // react to pressing escape if(e.getKeyCode() == java.awt.event.KeyEvent.VK_ESCAPE) { if(nodeToDrag != null) { // stop dragging a node, and undo nodeToDrag.getPosition().assign(nodeToDragInitialPosition); nodeToDragDrawCoordCube = null; nodeToDrag = null; ...
4
protected void remove( TrieSequencer<S> sequencer ) { // Decrement size if this node had a value setValue( null ); int childCount = (children == null ? 0 : children.size()); // When there are no children, remove this node from it's parent. if (childCount == 0) { parent....
3
public GuiLobby(boolean Op) { host = Op; compList.add(0, Leave); if(host){ compList.add(1, Start); compList.add(2, Kick); Server.startServer(); } try { Rocket.getRocket().network.connect(); } catch (UnknownHostException e) { System.err.println("Couldn't find host"); } catch (IOException e) ...
3
public LinkDigest putFile(final InputStream rawBytes, final LinkDigest prevChainHead) throws IOException { if (mUpdates == null) { IOUtil.silentlyClose(rawBytes); throw new IllegalStateException("Not updating. Did you forget to call startUpdate?"); } if (rawBytes == null...
5
public List<UserMaster>resContactInfo(String twitterID){ query = em.createNamedQuery("UserMaster.findByTwitterID").setParameter("twitterID", twitterID);//UserMasterからUser情報をすべてとってくるクエリを飛ばしている if(!query.getResultList().isEmpty()){ um=(UserMaster)query.getSingleResult(); query = em...
4
@Override public void unsafe_set(int row, int col, double val) { if( row != 0 && col != 0 ) throw new IllegalArgumentException("Row or column must be zero since this is a vector"); int w = Math.max(row,col); if( w == 0 ) { a1 = val; } else if( w == 1 ) { ...
6
private Texture loadTexture(String key){ try { return TextureLoader.getTexture("PNG", new FileInputStream(new File("res/" + key + ".png"))); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return null; }
2
public ContentObject getObjectAt(int x, int y, ContentType type) { if (type instanceof RegionType) return getRegionAt(x, y); else if (type instanceof LowLevelTextType) { //Text lines, word, glyph for (ContentIterator it = this.iterator(RegionType.TextRegion); it.hasNext(); ) { Region reg = (Region)it.next...
5
public static void main(String[] args) { Random randomNumbers = new Random(); int frequency1 = 0; int frequency2 = 0; int frequency3 = 0; int frequency4 = 0; int frequency5 = 0; int frequency6 = 0; int face; for(int ...
7
public static void paintRedN8(Image image, int x, int y) { for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { paintRed(image, x + i, y + j); } } }
2
private boolean isAParameterRequest() throws IOException { try { String secondElement = requestArray[1]; String[] splitOnMark = secondElement.split("\\?"); String parameterString = splitOnMark[0]; return parameterString.equals("/parameters"); } catch (ArrayIndexOutOfBoundsException e) {...
1
public void calculatePosition() { double sigma1, tsig1, tu1, sa, ca, sa1, ca1, A, B, twosm; double cu1, su1, uu; double sigma; int nIters = 0, nMaxIters = 10; double c2sm, ssig, csig, dsig = 0.0, lastdsig; double lambda, C; double x, y; double a = ellipsoid.getSemiMajorAxis(); double f = ellipsoid.ge...
7
private void checkAssignedValue(Identifier id, AssignedValue val) throws SemanticsException { int val_size = val.oidValue.size(); /* Has the oid value hierarchy?? */ if (val_size < 2) { Message.error(id, "has no parent defined (need 2 oids at lea...
9
public void renderTile(int xp, int yp, Tile tile) { xp -= xOffset; yp -= yOffset; for (int y = 0; y < tile.getSpriteSize(); y++) { int ya = y + yp; for (int x = 0; x < tile.getSpriteSize(); x++) { int xa = x + xp; if (xa < -tile.getSpriteSize() || xa >= width || ya < 0 || ya >= height) break; if...
7
@SuppressWarnings("deprecation") @Override public boolean execute(AdrundaalGods plugin, CommandSender sender, String... args) { if(args.length < 1) return false; final Shrine s = AGManager.getShrineHandler().getShrine(args[0]); if(s == null) Messenger.sendMessage(sender, "Shrine not found"); ...
3
@Override public void run() { super.run(); primeStatusIdCache(); for ( ;; ) { try { procTweets( searchForTweets() ); sleep( 8000l ); // Wait 8 seconds } catch ( InterruptedException e ) { } } }
2
public static byte[] rByte(String packagestr){ byte[] tmp = new byte[packagestr.length()/2]; for (int i=0;i<packagestr.length()/2;i++){ tmp[i]=Byte.parseByte(packagestr.substring(i*2,i*2+2)); //int j = (String.valueOf(("0x"+packagestr.substring(i*2,i*2+2)).; } return tmp; ...
1
@Test public void test_maxGold(){ assertNotNull(board); assertEquals(board.maxGold(), 0); int maxGold = 3; Pawn pawn = mock(Pawn.class); when(pawn.getGold()).thenReturn(maxGold); board.addPawn(pawn); assertEquals(maxGold, board.maxGold()); }
0
public void update() { if (listAwardNames.getSelectedValue() == null) { return; } clearErrors(); if (txtAwardName.isMessageDefault() || txtAwardName.getText().isEmpty()) { Util.setError(lblNameError, "Award name cannot be left blank"); return; ...
9
private void dfs(Digraph<?> G, Object v) { this.marked.put(v, true); this.reachable.add(v); for (Object temp : G.getAdjacentVertices(v)) { if (!marked.get(temp)) { dfs(G, temp); } } }
3
@Test public void testIntWalkManager() throws IOException { int nvertices = 33333; IntWalkManager wmgr = new IntWalkManager(nvertices, 40000); int tot = 0; for(int j=877; j < 3898; j++) { wmgr.addWalkBatch(j, (j % 100) + 10); tot += (j % 100) + 10; } ...
9
public static List<Supplier> formatOutputs(JSONArray results) { final List<Supplier> ret = new ArrayList<Supplier>(); for (int i = 0; i < results.length(); i++) { JSONObject r = null; if (results.get(i) instanceof JSONObject) r = (JSONObject) results.get(i); if (r != null) { final Supplier c = new...
4
public static void main(String[] args) throws IOException { BufferedReader f = new BufferedReader(new FileReader("agrinet.in")); PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("agrinet.out"))); n = Integer.parseInt(f.readLine()); graph = new int[n][n]; for(int i=0; i<n; i++) { Strin...
8
public void execute() { int nThreads = Runtime.getRuntime().availableProcessors(); ArrayList<Thread> threads = new ArrayList<Thread>(); for(int i=0; i < nThreads; i++) { Thread t = new Thread(new RMATGenerator(numEdges / nThreads)); t.start(); threads.add(t);...
3
* @param getterName - Name of the getter method for the field name to sort by * @param order Whether to sort in asc or desc order */ public <T> void sort(ArrayList<Course> list, String getterName, final int order){//help order makes no sense. please document how it works. try { final Method getter=Course.clas...
9
public void move(int ax, int ay, int bx, int by) { char t = this.b[ax][ay].toString().charAt(1); boolean c = this.b[ax][ay].getColor(); this.b[ax][ay] = new Blank(true); switch (t) { case 'P': this.b[bx][by] = new Pawn(c); break; case 'R': this.b[bx][by] = new Rook(c); break; case 'N': ...
6
public static void caseG(){ //we have a double with the highest average //need to iterate through the list of students and find the one who has that average. boolean correct_input = false; while(!correct_input){ if(students_in_courses.size() == 0){ correct_input = true; JOptionPane.showMessageDi...
8
public void setFormattedLocation(String formattedLocation) { this.formattedLocation = formattedLocation; }
0
public void modificarOtro(int id, ArrayList datos) { // Cambiamos todos los datos, que se puedan cambiar, a minúsculas for(int i = 0 ; i < datos.size() ; i++) { try{datos.set(i, datos.get(i).toString().toLowerCase());} catch(Exception e){} } biblioteca...
2
public static void addClasspath(String component) { if ((component != null) && (component.length() > 0)) { try { File f = new File(component); if (f.exists()) { URL key = f.getCanonicalFile().toURL(); if (!classPath.contains(key...
5
public void setXAxisDeadZone(float zone) { setDeadZone(xaxis,zone); }
0
public static void main(String[] args) { Scanner in = new Scanner(System.in); boolean isRunning = true; int c = 0; while (c < 10 || c > 20) { System.out.print("Choose the size of your cave (10-20): "); while(!in.hasNextInt()) { System.out.print("...
7
private void LoadContent(int img) { try { if (img == 0) { URL trackImgUrl0 = this.getClass().getResource("/raceresources/resources/images/track0.png"); trackImg = ImageIO.read(trackImgUrl0); } else if (img == 1) { URL trackImgUrl1 = this.ge...
6
@Test public void canGetAllCategories() { CategoryDAO cd = new CategoryDAO(); List<CategoryModel> categories = null; try { categories = cd.getAllCategories(); } catch (WebshopAppException e) { e.printStackTrace(); fail("Exception"); } boolean findTestCategory = false; for (CategoryModel cat : c...
4
public ArrayList <Vehicle> DBvehicleRouter (Object sysObject, String action){ //local container ArrayList <Vehicle> temp; try{ if (sysObject instanceof String && "VIEWALL".equals(action) && "MANAGER".equals(sysObject)){ ...
8
public void enregistrerHouse(MemoryAction m ){ int drap=0; int j =0; while( j <20 && drap ==0 ) { if(houseList[j] == null) drap = j; else if(j == 19) drap =j; j++; } for( int g = drap; g>=0 ;g-- ){ if (g != 19) houseList[g+1] =houseList[g]; else houseList[19] = houseList[18]; } houseLis...
8
@Override public Object getValueAt(final int row, final int column) { if (column == 0) { return AvailableTextFiles.getInstance().getAvailableTextFiles().get(row).getName(); } else if (column == 1) { return AvailableTextFiles.getInstance().getAvailableTextFiles().get(row).getAbsolutePath(); } else if (c...
3
public void cancelMove() { if(canCancelMove()) willCancelMove = true; }
1
public Neuron getNeuron(Integer layer, Integer column) { if (layer < neurons.size()) { if (column < neurons.get(layer).size()) { return neurons.get(layer).get(column); } } throw new IllegalArgumentException( "Error: The given Range is not within the Borders of this Perceptron!"); }
2
public static void msg(Object desc) { JOptionPane.showMessageDialog(null, desc); }
0
public Map() throws JAXBException { JAXBContext context = JAXBContext.newInstance(Row.class); this.unmarshaller = context.createUnmarshaller(); }
0
public void addNotes(String text) { String eol = System.getProperty("line.seperator"); if(this.meetingNotes==null) { this.meetingNotes = text; }else{ this.meetingNotes = this.meetingNotes + eol + text; } }
1
public void initial() throws IOException { double[] positions = null; // initial pbest and particles for (int i = 0; i < swarm_size; i++) { positions = new double[dimension]; for (int j = 0; j < dimension; j++) { positions[j] = (Math.random() * (range_max - range_min) + range_min) * (Math.random(...
8