text
stringlengths
14
410k
label
int32
0
9
public void loadCharacters(Element docEle){ NodeList charactersList = docEle.getElementsByTagName("Characters"); Node charactersNode = charactersList.item(0); Element characterElement = (Element)charactersNode; String charactersPath = characterElement.getAttribute("FolderPath"); String characterPrefix = chara...
6
public void calcTangents() { for(int i = 0; i < indices.size(); i += 3) { int i0 = indices.get(i); int i1 = indices.get(i + 1); int i2 = indices.get(i + 2); Vector3f edge1 = positions.get(i1).sub(positions.get(i0)); Vector3f edge2 = positi...
3
public void battle(Team other) { for (int i = 0; i < Math.max(this.team.length, other.team.length); i++) { if (this.team[i] != null) { int j = (int)Math.round(((Math.random() + i - 1) * 3)); while(j < 0 || j > team.length - 1) { j = (int)Math.round(((Math.random() + i - 1) * 3)); } t...
4
public String showBorad() //trying to make it look decent { StringBuffer s = new StringBuffer(); int j = 0; // String white = "\u25CB", black = "\u25CF", empty = "\u2212"; String white = "W", black = "B", empty = "-"; s.append("\n"); s.append(" | | | | ...
6
private void updatePalettes() { if (paletteType == PPUConstants.IMAGE_PALETTE_TYPE) { for (int i = 0; i < backgroundPalette.length; i++) { backgroundPalette[i] = (byte) EnvironmentUtilities.getIntegerEnvSetting(IMAGE_HELPER_BG_PALETTE_INDEX + i, DEFAULT_IMAGE_HELPER_BG_PALETTE); } for (int i = 0; i < spr...
8
private void disassociateAC(ComponentEntry ac) { System.out.println("No KEEP_ALIVE received from "+ac.id+", assuming dead..."); this.accessControllers.remove(ac.id); AccessAssociation aa = findAssociation(ac.id); if (aa != null) { this.accessAssociations.remove(aa); if (!associateAccessPoint(aa.accessPoin...
3
public static final int task7(int nthPrime) { int prime = 2; int number = 3; while (prime < nthPrime) { number += 2; if (isPrime(number)) { prime++; } } return number; }
2
@Test public void PelaajanAlkusijaintiKunOnKerrottu() { ArrayList<String> rivit = new ArrayList(); rivit.add("P 20 20"); TasonLuonti tl = new TasonLuonti(rivit); Taso ta = tl.getTaso(); assertTrue("Pelaajan alkusijainti oli väärä" + ta.getPelaajanAlkusijainti(...
1
@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 Vendor)) { return false; } Vendor other = (Vendor) object; if ((this.vendorID == null && other.vendorID != null...
5
public void reorderList(ListNode head) { // deal with the trivial case when head is null if ( head == null || head.next == null ) { return; } // 1. find the first element that should moved forward ListNode p = findMover(head); Stack<ListNode> s = ...
4
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
public ConfigurationSerializable deserialize(Map<String, Object> args) { Preconditions.checkNotNull(args, "Args must not be null"); ConfigurationSerializable result = null; Method method = null; if (result == null) { method = getMethod("deserialize", true); if ...
7
private boolean cmdSet(CommandSender sender, String world, String[] data, int offset, boolean oneRadius) { int radiusX, radiusZ; double x, z; try { radiusX = Integer.parseInt(data[offset]); if (oneRadius) { radiusZ = radiusX; offset -= 1; } else radiusZ = Integer.parseInt(data[offset + 1])...
2
public static boolean validCod(String cod){ if(cod.length()<5 || cod.length()>20){ return false; }else{ return true; } }
2
public ArrayList<Node> calculatePath(Node p_Start, Node p_Goal) { ArrayList<Node> nodes = new ArrayList<>(); boolean done = false; Node temp = p_Goal; while(!done) { //always add the new node at the beginning of the list nodes.add(0,temp); ...
2
@Override public Matrix add(Matrix matrix) throws IllegalArgumentException { int rows = this.getRowsNumber(); int cols = this.getColumnsNumber(); if (matrix.getRowsNumber() != rows || matrix.getColumnsNumber() != cols) { throw new IllegalArgumentException("Macierze o różnych rozmiarach"); } try { for ...
5
public static void main(String[] args) throws Exception { DefaultOptionBuilder obuilder = new DefaultOptionBuilder(); ArgumentBuilder abuilder = new ArgumentBuilder(); GroupBuilder gbuilder = new GroupBuilder(); Option pathOpt = obuilder.withLongName("path").withRequired(true).withArgument( ...
9
public GrammarTable getTable() { return table; }
0
public void updateDecorRenderList(World world) { decorationsToRender.clear(); for(Decoration decoration : world.getDecorList()) { Vector2f c = decoration.getCoords(); if((c.x >= (cLoc.x - (cameraWidth / 2) - decoration.getBB().getWidth()) || c.x <= (cLoc.x + (cameraWidth / 2) + decoration.getBB().getWidth(...
5
private static <E> void merge(E[] a, int from, int mid, int to, Comparator<? super E> comp) { int n = to - from + 1; Object[] values = new Object[n]; int fromValue = from; int middleValue = mid + 1; int index = 0; while (fromValue <= mid && middleValue <= to) { if (co...
7
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((attributes == null) ? 0 : attributes.hashCode()); result = prime * result + (hasClosingTag ? 1231 : 1237); result = prime * result + (hasOpeningTag ? 1231 : 123...
8
@Override public void mouseClick(int X, int Y) { if(this.getMouseListener() != null) { this.getMouseListener().MouseClick(this); } }
1
private void deopPlayers() { User[] users = bot.getUsers(gameChan); for (User user : users) { String nick = user.getNick(); if (user.isOp() && players2.isPlaying(nick)) { bot.sendMessage("ChanServ", "deop " + gameChan + " " + nick); } } }
3
@Override public void applyRenewPolicy(LibraryModel model, List<LibraryView> views, List<Copy> toRenew, String borrowerID) { List<Copy> reservedCopies = new LinkedList<Copy>(); List<Copy> toRemove = new LinkedList<Copy>(); for (Copy copy : toRenew) { Item item = model.findItem(copy.getRelatedItemID()); ...
8
@Override public String getUserServicePrice(String seller, String serviceName) { String priceValue = "0"; Service service = new Service(); Call call; try { call = (Call)service.createCall(); Object[] inParams = new Object[]{seller, serviceName}; call.setTargetEndpointAddress(new URL(SERVICES_UR...
3
@SuppressWarnings("unchecked") public synchronized static <T> int indexOf(T array[], T search) { if (array == null || array.length == 0) { return -1; } if (search == null) { for (int i = 0; i < array.length; ++i) { if (array[i] == null) { return i; } } } else { for (int i = 0; i < arr...
8
private static void processFile(String filename, double dt) { try { System.err.println("Loading file " + filename + " ..."); JPLEphemeris ephemeris = new JPLEphemeris(filename); NeptuneBarycentricElements runner = new NeptuneBarycentricElements(ephemeris, dt); runner.run(); } catch (JPLEphemerisExceptio...
2
@Override public boolean importGroup27ReadingCO(JSONObject toImport, String device_serial, String product_id) throws Exception { String latitude = __jdbcProperties.getProperty("sql.latitude"); String longitude = __jdbcProperties.getProperty("sql.longitude"); String method = __jdbcProperties.getProperty("sql.meth...
9
public static void main(String[] args) { Enumeration<CommPortIdentifier> portList; CommPortIdentifier portId; String messageString = "Hello, world!\n"; SerialPort serialPort = null; OutputStream outputStream = null; portList = getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (Com...
7
private boolean validateCoordinate(int i){ if(i <= 0 || i> model.getField().size){ view.onError("Не верное значение, значение должно быть от 1 до " + model.getField().size + " попробуйте еще раз"); return false; } return true; }
2
@Override public void removeEdgesTo(N to) { if(containsNode(to)) { for(N node : nodes.keySet()) { List<Edge<N>> edgesFrom = edgesFrom(node); for(Edge<N> edge : edgesFrom) { if(edge.to.equals(to)) { nodes.get(node).remove(edge); } } } } }
4
@Test public void testTruncate() { String s = "My really long string that needs to be cut down to size."; Assert.assertEquals( "My really long string that needs to be cut down…", _helper.truncate(s, 50) ); }
0
@Override public void actionPerformed(ActionEvent e) { JButton augmenter = (JButton) e.getSource(); System.out.println("Augmenter vitesse"); new Thread(new Runnable() { public void run() { try { Main.service.augmenterVitesse(bus); } catch (IOException e) { e.printStackTrace(); } } }).start(); ...
1
@Override public void run() { Thread me = Thread.currentThread(); String item = (String) (cb.getSelectedItem()); int current_index = item2index(item); while (true) { item = (String) (cb.getItemAt(current_index)); cb.setSelectedIndex(current_index); ...
7
private void executeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_executeButtonActionPerformed String input = inputTextField.getText(); if (state == 0) { if (input.equals("open door")) { feedbackLabel.setText("You open the door."...
4
public void SmithWaterman() { int x,y; matrix[0][0]=0; //System.out.println(matrix.length + ":" + matrix[1].length); for(x=1;x<matrix[0].length;x++) { matrix[0][x]= Math.max(matrix[0][x-1] +effort[0], 0); } for(y=1;y<matrix.length;y++) { matrix[y][0]= Math.max(matrix[y-1][0] +effort[1], 0); }...
4
public String weekTo(String field) { String newField = " TO "; if(field.length() == 3) { if(field.equals("SUN") || field.equals("MON") || field.equals("TUE") || field.equals("WED") || field.equals("THU") || field.equals("FRI") ...
8
public static int menu () { Scanner kb = new Scanner(System.in); int cho = 0; do { System.out.println ("\n\n[*] Menu:\n"); System.out.println ("1) Conta esemplari totali"); System.out.println ("2) Calcola valore totale della raccolta"); System.out.println ("3) Cerca e visualizza i...
5
public JPanel addNumberButtons(JTextField DispField){ final JTextField Field = DispField; JPanel ButtonPanel = new JPanel(); ButtonPanel.setLayout(new GridLayout(4, 3)); ButtonPanel.setPreferredSize(new Dimension(500,320)); ButtonPanel.setMaximumSize(new Dimension(500,500)); JButton [] Num...
8
private int[] parseBookingID(String bookingID) { int[] idArray = null; try { // exit if bookingID is empty if (bookingID == null || bookingID.length() == 0) { return null; } int MAX_ATTR = 2; // 2 members: resID_reservationI...
5
public String nextToken() throws JSONException { char c; char q; StringBuffer sb = new StringBuffer(); do { c = next(); } while (Character.isWhitespace(c)); if (c == '"' || c == '\'') { q = c; for (;;) { c = next(); ...
9
protected AutomatonSimulator getSimulator(Automaton automaton) { return SimulatorFactory.getSimulator(automaton); }
0
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
public List<ServerFile> getServerFiles() { List<ServerFile> files = new ArrayList<>(); if(dontScan) { return files; } ServerFile sf; File[] dirfiles; getServer().log("Parsing " + getDirectory().getParent() + "/" + getDirectory().getName()); dirs: for (File directory : getFiles()) { if (!directory.is...
7
public Map<String, Mass> makeMassMap(){ Map<String, Mass> massMap = new HashMap<String, Mass>(); NodeList[] massArray = {movingMasses, fixedMasses}; for (NodeList massType: massArray){ for (int i = 0; i < massType.getLength(); i++) { Node node = massType.item(i); if (node.getNodeType() == Node.ELEME...
5
public Recipe getRecipeForPallet(Pallet pallet) { String sql = "Select quantity, rawMaterialName, recipeName "+ "from Ingredients "+ "where Ingredients.recipeName like ? "; PreparedStatement ps = null; try { ps = conn.prepareStatement(sql); ps.setString(1, pallet.recipeName); } catch (SQLExc...
6
public void update(long currentTime) { if (isFinished) { return; } progress = (double)(currentTime - iT)/period; if (progress >= 1) { if (loop) { start(currentTime); return; } progress = 1; isFini...
4
@Before public void setUp(){ for(int i = 0; i < 20; i++){ solutions.put(i,(double) i); } classUnderTest.setSolutionFitness(solutions); }
1
private void doSave() { fileDialog = new JFileChooser(currentDirectory); File selectedFile; //Initially selected file name in the dialog. if (editFile == null) selectedFile = new File("filename.txt"); else selectedFile = new File(editFile.getName()); fileDialog....
7
private void listenClient(String clientRequest) throws NullPointerException { String[] reqSplit = clientRequest.split("-"); if (reqSplit[0].equals("LOGOUT") && reqSplit.length == 2) { processor.getMessageQ().add(this, clientRequest); } else if (reqSplit[0].equals("LOGIN") && reqSplit...
6
Xpp3Dom getResults() { return getInTestLinkListener().getResults(); }
0
public RoleSchool removeRole(long id){ for(int i = 0; i < roles.size(); i++){ if(roles.get(i).getId() == id){ return roles.remove(i); } } return null; }
2
public String getMiasto() { return miasto; }
0
public static void call(final String mapping, final String data) throws Exception { // delimited by a comma // text qualified by double quotes // ignore first record OrderBy orderby = null; final Parser pzparser = DefaultParserFactory.getInstance().newDelimitedParser(new File(map...
7
public void endElement(String uri, String localName, String qName) throws SAXException { int tag = getTagIndex(qName); if (inOneBoxResult) { doOneBoxResult(tag); } else if (inOneBoxResponse) { doOneBoxResponse(tag); } else if (inResult) { doResult(tag)...
9
public static void main(String[] args) { // insert a bunch of strings String[] strings = { "it", "was", "the", "best", "of", "times", "it", "was", "the", "worst" }; IndexMaxPQ<String> pq = new IndexMaxPQ<String>(strings.length); for (int i = 0; i < strings.length; i++) { pq....
8
private int extractSlot(byte[] schedule, int slot) { // since 8 is divisible by bitsPerSlot, we know that // one slot will never span more than one byte. // relevant byte: byte b = schedule[(slot * bitsPerSlot) / 8]; int startBit = (slot * bitsPerSlot) % 8; b >>= startBit; b &= (1 << bitsPerSlot) - 1; ...
0
@Override public void keyTyped(KeyEvent e) { if(e.getKeyChar() == this.editor.getCommandChar()) { this.view.getCommand().setVisible(true); this.view.getCommand().setText(this.editor.getCommandChar()+""); this.view.getCommand().requestFocusInWindow(); } else switch (e.getKeyChar()) { case '\u0008': c...
4
private Raum[][] erzeugeRaumArray(List<Raum> raumListe, List<XmlRaum> raumPositionen) { Raum[][] result = new Raum[getMaximumX(raumListe) + 1][getMaximumY(raumListe) + 1]; for(Raum raum : raumListe) { for(XmlRaum xmlraum : raumPositionen) { if(xmlraum.getID() == raum.getId()) { result[raum....
3
void run() { if (fileToProcess != null) { File resultFile = new File(fileToProcess); if (!resultFile.exists() || resultFile.isDirectory()) { LOG.error("{} is not a good result file", fileToProcess); return; } try { ...
4
public InvertedFileIterator(int entryPar,String indexDirectory,int lexiconSizePar, InvertedFile invFile){ synchronized(this){ entry=entryPar; lexiconSize=lexiconSizePar; try{ File pl_f=new File(indexDirectory+"/invfile/pl_e"+entry+"_sorted.dat"); ...
6
protected synchronized void onResized(int columns, int rows) { TerminalSize newSize = new TerminalSize(columns, rows); if(lastKnownSize == null || !lastKnownSize.equals(newSize)) { lastKnownSize = newSize; for(ResizeListener resizeListener: resizeListeners) r...
3
@Override public void actionPerformed(ActionEvent e) { visibleScreen.getFrame().getContentPane().removeAll(); boolean playerHadABang = false; if (visibleScreen.getSetup().getRound().playerInTurnIsNextToReactToDuello()) { playerHadABang = visibleScreen.getSetup().getRound().ge...
5
public void ship(String dest) { Contents c = contents(); Destination d = to(dest); System.out.println(d.readLabel()); }
0
@Override public void processEntity(Entity entity) { Spatial spatial = entity.getComponent(Spatial.class); /** * If the previous spatial was null, this is the first time it's been * through this PreviousSpatialSystem. We therefore create its new * Spatial. We couldn't do this within the Spatial class bec...
2
@Test public void testTasks() { Task heute,invalid; try { //anpassen an aktuellen tag! heute=new Task(2012, 11, 16,"heute"); } catch (InvalidTaskException ex) { fail(ex.getMessage()); } invalid=null; try { invalid=...
6
public E succ(E e) { DoublyLinkedNode node = search(e); if (node != null) { if (node.getSucc() != null) { final E returnValue = (E) node.getSucc().getKey(); return returnValue; } } return null; }
2
public Class<?> getColumnClass(int columnIndex) { switch (columnIndex) { case COL_HASH: case COL_TITLE: case COL_LINK: case COL_SOURCE: return String.class; case COL_SEED: case COL_LEECH: return Integer.class; default: return String.class; ...
7
public static boolean isAvailable(int port){ if (port < 0) { return false; } ServerSocket ss = null; DatagramSocket ds = null; try { ss = new ServerSocket(port); ss.setReuseAddress(true); //ServerSocket类中,默认值为false,该方法必须在绑定端口前使用才有效 ds = new DatagramSocket(port); ss.setReuseAddress(true); ...
5
private boolean checkSetting() { if (DoArea.userNameField.getText().isEmpty()) return false; if (DoArea.passWordField.getText().isEmpty()) return false; if (DoArea.keyPathField.getText().isEmpty()) return false; if (DoArea.hostNameField.getText().isEmpty()) return false; if (DoArea.portNumberField...
6
@Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { if(!auto) return false; final Physical target=givenTarget; if(target==null) return false; if((target instanceof Item)&&(room==null)) return false; if(target.fetchEffect("Sinking")==nul...
8
boolean setLcLpPb(int lc, int lp, int pb) { if (lc > Base.kNumLitContextBitsMax || lp > 4 || pb > Base.kNumPosStatesBitsMax) { return false; } m_LiteralDecoder.create(lp, lc); int numPosStates = 1 << pb; m_LenDecoder.create(numPosStates); m_RepLenDecoder.creat...
3
private void integrityCheck() { PurchasableCircularList next = nextGroupElement; int stations = 0; int owned = 0; do { stations++; next = next.getNextGroupElement(); } while(!next.equals(this)); next = this; do { if(next.getOwner() != null && next.getOwner().equals(owner)) { owned++; } ...
7
@Override public boolean canImport(TransferSupport support) { return (support.getComponent() instanceof JList) && support.isDataFlavorSupported(RiverComponent.RIVER_COMPONENT_DATA_FLAVOR); }
1
public List<Position> getClosestCarsInt() { //Returns closest car to intersection on each road List<Position> closest = new ArrayList<Position>(); ListIterator<Road> roadItr = this.roads.listIterator(); Position carPos = null; // For if we continue cars moving while (roadItr.h...
8
@Override public void paint(Graphics2D g2d) { super.paint(g2d); if(municion <= MUNICION_PARA_RECARGAR) g2d.drawString("Reload! ("+movimientos.getRecargar().getNombreTecla()+")", x, y+6); if(salud<=5 && vidas>0) g2d.drawString("Reviviendo en "+salud, x, y-10); ...
3
public void deleteFile(String fileName){ // deletion flag boolean flag = true; // Create an instance of File representing the named file File file0 = new File(fileName); // Check that the file exists if(!file0.exists()){ System.err.println("Method deleteFil...
8
private void checkHit() { int mapPosX = Main.getMapPosX(); int mapPosY = Main.getMapPosY(); int epsilon = 100; // Epsilon fuer Radius um Schwerts LinkedList<Mob> Mobs = AssetCreator.getMobs(); for (int i = 0; i < Mobs.size(); i++) { Mob mob = Mobs.get(i); if(!mob.isHit() && (x+epsilon-mapPosX > mob.g...
7
public void destroy() { bgComboBox.destroy(); ActionListener[] al = okButton.getActionListeners(); if (al != null) { for (ActionListener i : al) okButton.removeActionListener(i); } al = cancelButton.getActionListeners(); if (al != null) { for (ActionListener i : al) cancelButton.removeAction...
7
private void initCamera() { Transform3D projectionMatrix = new Transform3D(); double nearClipping = 0.1; double farClipping = 5.0; double[] intrinsics = new double[9]; try { System.out.println(UbitrackFacade.DATAFLOW_PATH+File.separator +"CamCalib-3-3-Matrix" ); FileReader fro = new FileReader(System...
4
public void splitCodeAndComment(CodeMethod cm) { List<String> src = new LinkedList<String>(); List<String> comment = new LinkedList<String>(); boolean comment_mode = false; // multi-line comment mode String comment_mark = ""; StringBuilder sb = null; for (String sen : cm.body) { if (comment_mode) { i...
7
@Override public void caseAFormallist(AFormallist node) { inAFormallist(node); { List<PFormalrest> copy = new ArrayList<PFormalrest>(node.getFormalrest()); Collections.reverse(copy); for(PFormalrest e : copy) { e.apply(this); ...
3
private void initiateParsing() { // http://tutorials.jenkov.com/java-xml/sax.html SAXParserFactory factory = SAXParserFactory.newInstance(); File file = new File("assets/OSM_MapOfDenmark.osm"); try { InputStream openStreetMapData = new FileInputStream(file); SAXParser saxParser = factory.newSAXParser()...
2
private void initializeJob() { if (job == null) { job = new Job("3D Molecular Simulator #" + jobIndex++) { public void run() { while (true) { super.run(); while (!isStopped()) { modelTime += getTimeStep(); advance(indexOfStep++); execute(); } synchronized (thi...
8
public void makeBold() { if (this.isDisposed()) { return; } isBold = true; setFont(boldFont); }
1
private int getDepth() { Stack<TreeNode<E>> nodeStack = new Stack<TreeNode<E>>(); Stack<Integer> leftStack = new Stack<Integer>(); Stack<Integer> rightStack = new Stack<Integer>(); nodeStack.push(root); leftStack.push(-1); rightStack.push(-1); while (true) { TreeNode<E> t = nodeStack.peek(); int l...
8
private void receiveRegularMessage(Message m) { if(this.children.contains(m.broadcaster())) { if (this.parent == -1) { this.returnACK(m); } else { this.rebroadcast(m); } } else if (this.parent == m.broadcaster()) { ...
8
private boolean attemptWin(Command command){ if (!command.hasNthWord(2)) { System.out.println("Go where?"); } else if (command.getNthSegment(1).equalsIgnoreCase("Sunset")){ if(bag.contains("hull") && bag.contains("mast") && bag.contains("rudder") && bag.contains("helm")){ ...
6
public void testConstructor_RP_RI8() throws Throwable { DateTime dt = new DateTime(TEST_TIME_NOW); Period dur = new Period(0, 0, 0, 0, 0, 0, 0, -1); try { new Interval(dur, dt); fail(); } catch (IllegalArgumentException ex) {} }
1
public void setButtonRate(JButton button) { button.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { try { System.out.println("Rate Button for Media_Id: " + wbview.getSelectedId()); if (wbview.getSelectedRowCount() == 1) { wbview.invokeRateMediaDialog(wbvi...
3
public static Double complexSum ( Double value1, Double value2 ) { if ( ( value1 >= 0.0 && value2 >= 0.0 ) || ( value1 <= 0.0 && value2 <= 0.0 ) ) { return value1 + value2; } else if ( ( value1 >= 0.0 && value2 <= 0.0 ) || ( value1 <= 0.0 && value2 >= 0.0 ) ) { return value2 - va...
8
protected boolean checkCDATA(StringBuffer buf) throws IOException { char ch = this.readChar(); if (ch != '[') { this.unreadChar(ch); this.skipSpecialTag(0); return false; } else if (! this.checkLiteral("CDATA[")) { this.skipSpecialTag(1...
9
private void StakeholderListValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_StakeholderListValueChanged // TODO add your handling code here: Stakeholder tempSH = new Stakeholder(); String tempName = (String) StakeholderList.getSelectedValue(); for (int i = 0; i ...
7
public Tile(int x, int y, int t) { this.x = x; this.y = y; type = t; }
0
public void sendToNether(Player p){ if(p.hasPermission(DeityNether.OVERRIDE_PERMISSION)){ testAndPort(p, false); }else if(p.hasPermission(DeityNether.GENERAL_PERMISSION)){ if(p.getWorld() == DeityNether.server.getWorld(DeityNether.config.getNetherWorldName())){ p.sendMessage(DeityNether.lang.formatAlready...
5
protected String[] parseRow( ) throws SQLException { String[] newRow = new String[ COLUMN_NAMES.length ]; String headerLine = readNextLine(); if ( headerLine == null ) { return null; } if ( !isRecordHeader( headerLine ) ) { throw new SQLException( "Bad...
7
public void setAuthor(String author) { this.author = author; }
0
protected static boolean isDayLightSavings(double latitude, double longitude, int date, int dstFlag) { boolean DSTBoolean = false; //user says no if(dstFlag == 1) { DSTBoolean = false; } //user says yes else if (dstFlag == 2) { DSTBoolean = true; } //user does not know else { try { //chec...
5
private String checkDetailsNode(Element element, int nodeCount, String xmlTag){ if(nodeCount == 0){ //This value is returned when detail tag is not present return ""; } String genre = ""; NodeList detailsNode = element.getElementsByTagName("detail"); for(int i = 0; i < detailsNode.getLength(); i++){ ...
4
public boolean getBoolean(String key) throws JSONException { Object object = this.get(key); if (object.equals(Boolean.FALSE) || (object instanceof String && ((String)object).equalsIgnoreCase("false"))) { return false; } else if (object.equals(Boolean.T...
6