text
stringlengths
14
410k
label
int32
0
9
static public Menu getInstance() { if (m_instance == null) { m_instance = new Menu(); } return m_instance; }
1
public void play(String soundName) { Sound sound = sounds.get(soundName); if (sound != null) { sound.play(); } }
1
public void enemyAttacks() { // will choose a random square to attack in UserPanel if (canAttack) { enemyTarget = rand.nextInt(25); // get a target while (!battleSquare[enemyTarget].isEnabled()) { // check to see if the JButton is enabled ...
4
public T execute() throws SQLException { Connection conn = null; SQLException toThrow = null; T back = null; try { conn = factory.getConnection(); conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE); conn.setAutoCommit(false); back = Transaction.this.run(); conn.commi...
6
public Case(int x, int y) { Coordinates coord = new Coordinates(x, y); state = false; for (int a = 0; a < walls.length; a++) { walls[a] = true; } }
1
private SoundManager() { try { startClip = initSound("/sounds/start.wav"); warnClip = initSound("/sounds/warn.wav"); overClip = initSound("/sounds/over.wav"); } catch (UnsupportedAudioFileException e) { handleError("Wrong audio ...
3
@Override public Object execute(HttpServletRequest request, HttpServletResponse response) throws Exception { Contexto oContexto = (Contexto) request.getAttribute("contexto"); oContexto.setVista("jsp/backlog/list.jsp"); try { BacklogDao oBacklogDAO = new BacklogDao(oContexto.getEn...
3
public void onGrowth(Tile t) { if (! structure.intact()) return ; // // Here, we average fertility over the plantation as a whole- // TODO: Possibly combine with irrigation effects from water supply or // life support? float avgMoisture = 0, count = 0 ; for (Plantation p : strip) { ...
8
public void setCipherValue(byte[] value) { this.cipherValue = value; }
0
public List<Integer> getIntegerList(String path) { List<?> list = getList(path); if (list == null) { return new ArrayList<Integer>(0); } List<Integer> result = new ArrayList<Integer>(); for (Object object : list) { if (object instanceof Integer) { ...
8
public void getInput() { String command; Scanner inFile = new Scanner(System.in); do { this.display(); // display the menu // get commaned entered command = inFile.nextLine(); command = comma...
7
public void addUniform(String uniform) { int uniformLocation = glGetUniformLocation(program, uniform); if(uniformLocation == 0xFFFFFFFF) { System.err.println("Error: Could not find uniform: " + uniform); new Exception().printStackTrace(); System.exit(1); } uniforms.put(uniform, uniformLocation...
1
private int[] getCheckedCrossP(float[] crosspoint, int[] originalpoint) { //Funktion prueft, ob der Endpunkt einer Linie nicht besser auf einer Anderen anstatt in der Luft liegen sollte //Richtungsvektor konstruieren int[] rp = new int[2]; float[] dv = new float[2]; dv[0] = originalpoint[0] - crosspoint[0]...
3
public static CoreType parseCoreType(String type) { if (type.equals(CLIENTE.toString())) return CLIENTE; else if (type.equals(HUB.toString())) return HUB; else if (type.equals(BASESTATION.toString())) return BASESTATION; else return null; ...
3
public static void eatFlowerIfCollided(OneFlower o) { if (o.x == o.fx && o.y == o.fy) { o.score++; if (o.score == 75) { try { FileOutputStream out = new FileOutputStream(new File(System.getenv("APPDATA") + "\\OneFlower\\HardModeLock.data")); out.write(getSignedBytes((byte)0)); out.c...
4
static public Vector3f findSimplex(List<Vector3f> simplex){ switch(simplex.size()){ case 2: return findLineSimplex(simplex); case 3: return findTriangleSimplex(simplex); default: return findTetrahedronSimplex(simplex); }...
2
public static VehicleModesOfTransportEnumeration fromString(String v) { if (v != null) { for (VehicleModesOfTransportEnumeration c : VehicleModesOfTransportEnumeration.values()) { if (v.equalsIgnoreCase(c.toString())) { return c; } } } throw new IllegalArgumentException(v); }
3
@Override public void run() { while (true) { try { Socket clientSocket = mServerSocket.accept(); Messenger messenger = new Messenger(clientSocket, mNotifyDisconnection); messenger.start(); mConnectedClients.add(messenger); if (mListener != null) mListener.onClientConnected(messen...
3
public int readByte() throws IOException { if(bNextByteIs255) return (byte)255; bNextByteIs255 = false; if(fakeInput!=null) throw new java.io.InterruptedIOException("."); if((rawin!=null) && (rawin.available()>0)) { final int read = rawin.read(); if(read==-1) throw new java.io.InterruptedIOEx...
7
public static String hashMapToString(Map<?, ?> dataUploadStatusMap, String seperator) { List<Entry<?, ?>> list = new ArrayList<Entry<?, ?>>(dataUploadStatusMap.entrySet()); return buildString('{', displayArray(list.toArray(), seperator), '}'); }
6
@Override public void executeMsg(Environmental oking, CMMsg msg) { super.executeMsg(oking,msg); if(affected instanceof MOB) { final MOB mob=(MOB)affected; if((msg.source()==mob) &&(msg.target()==mob.location()) &&(msg.targetMinor()==CMMsg.TYP_LEAVE)) unInvoke(); else if((CMLib.flags().isSt...
8
private void modify() { delete(); modifiedObjectLoc = selectedObject.getLocationCopy(); switch (selectedObject.getObjectType()) { case DEFAULT: break; case SHAPE: new ShapeMaker((MainFrame) frame, selectedObject); break; case RECTANGLE: new RectangleMaker((MainFrame) frame, selectedObject); b...
7
public long add(long millis, long value) { int year = get(millis); int newYear = year + FieldUtils.safeToInt(value); if (year < 0) { if (newYear >= 0) { newYear++; } } else { if (newYear <= 0) { newYear--; } ...
3
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed if(!cdb.getText().isEmpty()){ Buscar bs = new Buscar(); bs.setVisible(true); } else{ if(!idb.getText().isEmpty()){ Buscar bs = new Buscar(); ...
2
private void move() { switch (dir) { case 0: if (x > player.getX()) { left(); } if (x < player.getX()-20) { right(); } break; case 2: if (x > player.getX()) { left(); } if (x < player.getX()) { right(); } break; default: break; } }
6
public static void textPack(byte packedData[], String text) { if (text.length() > 80) { text = text.substring(0, 80); } text = text.toLowerCase(); int carryOverNibble = -1; int ofs = 0; for (int idx = 0; idx < text.length(); idx++) { char c = text.charAt(idx); int tableIdx = 0; for (int i = 0; i...
9
@Override public List<User> findUserByEventId(int eventId) { List<User> list = new ArrayList<User>(); Connection cn = null; PreparedStatement ps = null; ResultSet rs = null; try { cn = ConnectionHelper.getConnection(); ps = cn.prepareStatement(QTPL_S...
5
public void dragDropEnd(DragSourceDropEvent dsde) { Canvas canvas = (Canvas) dsde.getDragSourceContext().getComponent(); CanvasModel canvasModel = canvas.getCanvasModel(); Rectangle bounds = null; try { bounds = (Rectangle) dsde.getDragSourceContext().getTransferable().getTransferData(widgetFlavor);...
7
public void run() { while (ok != -1) { try { runs = true; lm.waitForEvent(); if (conn.isClosed()) { ok = -1; } } catch (InterruptedException e) { interrupt(); ok = -1; } try { if (ok != -1) { readAndPrintMsg(); getAndPrintConnected(); ok = writeGameName(); ...
6
public String find(Statement stmt, String comboBox, String textField) { DefaultTableModel model = (DefaultTableModel) table.getModel(); model.setRowCount(0); if (stmt != null) { try { if (comboBox.equals("Αριθμό Διαβατηρίου")) { rs = stmt.execute...
9
public void test_DateTime_new_Turk() { try { new DateTime(2007, 4, 1, 0, 0, 0, 0, MOCK_TURK); fail(); } catch (IllegalInstantException ex) { assertEquals(true, ex.getMessage().indexOf("Illegal instant due to time zone offset transition") >= 0); } }
1
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://down...
4
private void siftUp(int pos) { if (pos == 0) return; if (heap.get(pos).compareTo(heap.get(pos / 2)) > 0){ swap(pos, pos / 2); siftUp(pos / 2); } }
2
public static List<String> command(String command) { boolean err = false; List<String> list = new LinkedList<String>(); try { Process process = new ProcessBuilder(command.split(" ")).start(); BufferedReader results = new BufferedReader(new InputStreamReader( ...
5
public static byte[] getMacAddress() { if(cachedMacAddress != null && cachedMacAddress.length >= 10) { return cachedMacAddress; } try { Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces(); while(networkInterfaces.hasMoreElements()) { NetworkInterface network = ne...
7
private void kingRightPossibleMove(Piece piece, Position position) { int x1 = position.getPositionX(); int y1 = position.getPositionY(); if((x1 >= 0 && y1 >= 0) && (x1 <= 6 && y1 < maxHeight)) { if(board.getChessBoardSquare(x1+1, y1).getPiece().getPieceType() != board.getBlankPiece().getPieceType()) {...
6
public void sendDeleteUser() throws IOException{ String str = new String("deleteuser"+ "," + oldUsernameFld.getText()); System.out.println(str); InetAddress serverAddr= null; try { serverAddr= InetAddress.getByName(GlobalV.serverIP); } catch (UnknownHostException e1) { e1.printStackTrace(); ...
4
protected void handleMouseMoved(MouseEvent event) { synchronized (simulator) { if (simulator.isRunning()) { return; } if (inspector == null) { inspector = new CreatureInspector(); } Point2D point; try { point = getTransform().inverseTransform(event.getPoint(), null); } catch (Noninv...
5
@Override public long getIdleTimeout() { return idleTimeout; }
0
private void finishText() { if (currentText != null) { String strValue = currentText.toString(); if (currentTextObject != null) { if (DefaultXmlNames.ELEMENT_Unicode.equals(insideElement)) { currentTextObject.setText(strValue); } else if (DefaultXmlNames.ELEMENT_PlainText.equals(insideElem...
9
private void parseFile(PDFPassword password) throws IOException { // start at the begining of the file fileBuf.rewind(); String versionLine = readLine(fileBuf); if (versionLine.startsWith(VERSION_COMMENT)) { processVersion(versionLine.substring(VERSION_COMMENT.length())); ...
6
public Boolean getDataTable(JTable table) { int y = 0; for (int i = 0; i < table.getRowCount(); i++) { System.out.println(table.getValueAt(i, 2)); lista.add(new ConstansToken(table.getValueAt(i, 0).toString(), i, table.getValueAt(i, 1).toString(), (Boolean) table.getValueAt(i, 2)...
1
public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { TokenStream input = (TokenStream)_input; int _s = s; switch ( s ) { case 0 : int LA28_49 = input.LA(1); ...
8
private void resultComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resultComboBoxActionPerformed // TODO add your handling code here: Sorter sort = new Sorter(DATA_POINTS); String optionChosen = sortComboBox.getSelectedItem().toString(); int mode = resultComb...
6
protected String getPresentationName() { if (countDifferences(oldValue, newValue) == 1) { for (Features feature : Features.values()) { if (feature.isChosen(oldValue) != feature.isChosen(newValue)) { if (feature.isChosen(newValue)) { return ...
4
public void clean() { ArrayList<String> Temp = new ArrayList<String>(); for (int i = 0; i < lines.size(); i++) { String line = lines.get(i); if (!Temp.contains(line)) { Temp.add(line); } } writeArrayList(Temp); }
2
public BigAirplaneImage(String imageURL, int color) { super(imageURL); this.color=color; frameNumber=0; // initial frameNumber is 0 totalFrame=3; delayCounter=0; if(color==1) { this.setImage(frameNumber*65+frameNumber+5, yLocationSpriteSheet, width,height ,newWidth, newHeight); } else { thi...
1
public void mousePressed(MouseEvent paramMouseEvent) { Point localPoint1 = ClickDelegator.this.CurrentRenderer.getOffset(); Point localPoint2 = new Point(paramMouseEvent.getX() / 50 + localPoint1.x, paramMouseEvent.getY() / 50 + localPoint1.y); if (ClickDelegator.this.CurrentScene.getShroud().isVisib...
3
void nextCharNoPrint() throws Exception { if ((line == null) || (++linePos >= line.length())) { line = reader.readLine(); if (line != null) { while (line.length() > 0 && line.charAt(0) == ';') { line = reader.readLine(); } ...
7
public static void rmDupChar(BufferedInputStream in) { if(in.markSupported()){ in.mark(256); try { count = in.read(b); String str = new String(b, 0, count); c = str.toCharArray(); } catch (IOException e) { e.printStackTrace(); } } a.add(c[0]); for(i = 1; i < count; i++){ te...
6
public void actionPerformed(ActionEvent e) { if(e.getActionCommand().compareTo("Copiar")==0) { if(this.getSelectedText()!=null) this.copy(); } else if(e.getActionCommand().compareTo("Cortar")==0) { if(this.getSelectedText()!=null) ...
6
public void moveVertex(Object vertex, Point2D point) { addVertex(vertex, point); }
0
@SuppressWarnings("unchecked") @Override public boolean equals(Object obj) { if (obj instanceof Tuple<?,?>) { if(x.equals(((Tuple<X,Y>)obj).x) && y.equals(((Tuple<X,Y>)obj).y)) { return true; } } return false; }
5
public static double Testing() { try { BufferedWriter out = new BufferedWriter(new FileWriter("WrongTestingFaces.txt")); int correctTests = 0; for(Face f: testingFaces) { if(TestingSingleFaceCorrect(f)) { correctTests++; }else { String faceStr = f.Print();//printing wrong fa...
3
public OrderResponse orderWithoutPayment(OrderRequest request) throws GongmingConnectionException, GongmingApplicationException { URL path = _getPath(ORDER_WITHOUT_PAYMENT); OrderResponse response = _POST(path, request, OrderResponse.class); if (response.code != GMResponseCode.COMMON_SUCCESS) { ...
1
public boolean isValid(String s) { if (s == null || s.isEmpty()) { return false; } Map<String, String> bracketsMap = new HashMap<String, String>(); bracketsMap.put("(", ")"); bracketsMap.put("{", "}"); bracketsMap.put("[", "]"); Stack<String> allBrackets = new Stack<String>(); String curBracket = nul...
7
private void logHistory(){ //Get the log file File log = new File(System.getProperty("user.home")+"/.history/log.txt"); File folder=new File(System.getProperty("user.home")+"/.history"); String next=System.getProperty("line.separator"); //If the show button been pressed try { //If the log file not e...
6
public IIbasics(int previousSession) { this.previousSession = previousSession;// always set at the start // set the title if (previousSession == 0) { setTitle("New Project"); } else { setTitle("Project"); } // set up the layout manager JPanel infoPanel = new JPanel(new GridBagLayout()); // give it...
7
public PageUnpinnedException(Exception e, String name){ super(e, name); }
0
@Override public final void addPart(final String string) { // parse of "instrument ..." final String[] s = string.split(" "); final MidiInstrument m = MidiInstrument.valueOf(s[0]); if (m == null) { setError(); return; } this.activeInstrument = m.createNewTarget(); targetList.add...
3
public static void banIP( String bannedBy, String player, String reason ) throws SQLException { if ( reason.equals( "" ) ) { reason = Messages.DEFAULT_BAN_REASON; } ArrayList<String> accounts = null; if ( Utilities.isIPAddress( player ) ) { accounts = PlayerManage...
6
private Color mandlebrotColor(int x, int y) { final double cA = left + x * horizontalIncrement; //real component of c final double cB = top + y * verticalIncrement; //imaginary component of c double zA = cA; //real component of z double zB = cB; //imaginary co...
2
public static ABObject GetRoof (HashMap<ABObject, List<ABObject>> leftSupportee, HashMap<ABObject, List<ABObject>> rightSupportee) { List<ABObject> sameList = new ArrayList<ABObject>(); for (ABObject ab: leftSupportee.keySet()) { List<ABObject> leftList = leftSupportee.get(ab); for (ABObject ab1 : right...
8
public void showMiniMap(boolean s) { if (miniMapHUD != null) { miniMapHUD.shouldRender = s; } }
1
public int sendIP(String username){ try { String host = "localhost"; socket = new Socket(host, 2001); in = new BufferedReader(new InputStreamReader(socket.getInputStream())); out = new PrintWriter(socket.getOutputStream(), true); } catch (IOEx...
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 feel. * For details see http://down...
6
public void emite(InstruccionesPila operador, ArrayList<String> atributos) throws Exception { String inst; // codigo con dos parametros if (operador.equals(InstruccionesPila.apila) || operador.equals(InstruccionesPila.desapila_dir)) { inst = operador.toString()+"("+atributos.get(0)+","+atributos.get(1)+")"; ...
8
public MultiInputOptionPane(Handler handler) { JTextField option = new JTextField(3); option.addAncestorListener(new RequestFocusListener()); JPanel panel = new JPanel(); panel.add(new JLabel("Maximum number:")); panel.add(option); int result = JOptionPane.showConfirmDial...
8
public String getHost() { return host; }
0
private boolean evaluateRestrainClause(String str) { double x = parseMathExpression(str); if (Double.isNaN(x)) return false; if (x < 0) { out(ScriptEvent.FAILED, "Restraint cannot be negative: " + str); return false; } int nop = model.getNumberOfParticles(); if (nop <= 0) return true; float c ...
7
public void startBenchmark(){ System.out.println("Starting TarsosLSH benchmark with " + dataset.size() + " random vectors"); System.out.println(" Four close neighbours have been added to 100 vectors (100+4x100=500)."); System.out.println(" The results of LSH are compared with a linear search."); System.out....
4
@Override public Class<?> getColumnClass(int columnIndex) { switch (columnIndex) { case 0: return String.class; case 1: return String.class; case 2: return String.class; case 3: return String.cla...
5
@Override public void run() { long ctsReceivedTime = 0; while (running) { try { // check if sending is okay: last seen CTS not meant for this // sender is > ctsDelayTime ago // Don't be greedy: even if maca is disabled, respect CTS for // other sender! if ((lastCTSSeen + ctsDelayTime) <= Sys...
9
private Nodo sentencia() { Nodo tem = null; if (aux.getToken().equals("if")) { aux=(Tokens2)tok.next(); tem = this.seleccion(); } else if (aux.getToken().equals("while")) { aux=(Tokens2)tok.next(); tem = this.iteracion(); } else if (aux.get...
6
public static void main(String[] args) { for(int i = 0; i < 100; i++) { if(i == 74) break; // Out of for loop if(i % 9 != 0) continue; // Next iteration System.out.print(i + " "); } System.out.println(); for(int i = 0; i < 100; i++) { if(i == 74) break; // Out of for loop if(i % 9 != 0) contin...
9
public MyVector getPosition(int color) { MyVector initposition = null; int baulklinex = (int)(-boardwidth/2.0+0.2*boardwidth); switch (color) { case 0: initposition = new MyVector(baulklinex-10,-boardheight/12,0); break; case 1: initposition = new MyVector(baulklinex,-boardheight/6,0); br...
7
public String name() { Constant c = (Constant) constants.get(thisClass); Assert.isNotNull(c, "Null constant for class name"); if (c.tag() == Constant.CLASS) { final Integer nameIndex = (Integer) c.value(); if (nameIndex != null) { c = (Constant) constants.get(nameIndex.intValue()); if (c.tag() == Co...
3
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof TournamentType)) return false; TournamentType other = (TournamentType) obj; if (idTournamentType != other.idTournamentType) return false; if (...
7
public String toString() { //simple version: //return _heap.toString(); //prettier version: String lvlOrdTrav = "heap size " + _heap.size() + "\n"; if ( _heap.size() == 0 ) return lvlOrdTrav; int h = 1; //init height to 1 for( int i = 0; i < _heap.size(); i++ ) { lvlOrdTrav += i + ":" + _heap.get(...
3
public static ArrayList<Pushbullet> getDevices(String api_key) { ArrayList<Pushbullet> devices = new ArrayList<Pushbullet>(); try { int i = 0; final SSLSocketFactory sslSocketFactory = (SSLSocketFactory) SSLSocketFactory .getDefault(); final URL url = new URL("https://api.pushbullet.com/api/device...
5
@Override public boolean publish(Client client, PubMessage message) throws Exception { String payload = new String(message.getPayload(), Charset.forName("UTF-8")); if (payload.indexOf("Country Music") > -1) { // We don't do that stuff here! Return true to suppress processing of the message return true; ...
1
public void setTwoDarray(double[][] aarray){ if(this.numberOfRows != aarray.length)throw new IllegalArgumentException("row length of this Matrix differs from that of the 2D array argument"); if(this.numberOfColumns != aarray[0].length)throw new IllegalArgumentException("column length of this Matrix differs ...
5
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; WildcardQuery other = (WildcardQuery) obj; if (term == null) { if (other.term != null) return false; ...
6
public int cdlSeperatingLinesLookback( ) { return ((( ((( (this.candleSettings[CandleSettingType.ShadowVeryShort.ordinal()].avgPeriod) ) > ( (this.candleSettings[CandleSettingType.BodyLong.ordinal()].avgPeriod) )) ? ( (this.candleSettings[CandleSettingType.ShadowVeryShort.ordinal()].avgPeriod) ) : ( (this.cand...
3
public String getFiledName() { return filedName; }
0
private void renderElement(XmlElement element) { if (element instanceof XmlTextElement) { for (String text : element.getText().split(" ")) { elements.add(new TextInsert(text, formatStack)); } } else if (element instanceof XmlTagElement) { XmlTagElement tag = (XmlTagElement)element; switch(tag.getLab...
9
public ArrayList<Double> solveSystem() { Collections.fill(x, 0.0); int k = 0; int size = x.size(); double delta = 0.0; ArrayList<ArrayList<Integer>> rows = matrixA.getRowIndexes(); do { double t1 = 0.0; double t2 = 0.0; delta = 0.0; for (int i = 0; i < size; i++) { t1 = b.get(i); t2 = 0.0;...
6
public boolean testPositionBateau(int longueur, int sens, int x, int y) { int pos = 0; for(int i=0;i<longueur;i++) { switch(sens) { case 1: // Horizontale pos = x+i+y*this._partie.getParametre().getNbCaseX(); ...
6
@EventHandler public void onFurnaceBurn(FurnaceBurnEvent event) { plugin.cancelEvent(event); plugin.debugMessage(event); plugin.godMode(event); if (event.getFuel().getType().equals(Material.WEB)) { event.setBurnTime(100); } else if (event.getFuel().getType().equa...
4
private boolean findMatch(String searchString, TableItem item, int column, boolean matchWord, boolean matchCase) { String tableText = matchCase ? item.getText(column) : item.getText(column).toLowerCase(); if (matchWord) { if (tableText != null && tableText.equals(searchString)) { return true; } } else { ...
6
public void mousePressed(MouseEvent me){ if(SwingUtilities.isRightMouseButton(me)){ if (table.columnAtPoint(me.getPoint()) == 0){ int index=table.getSelectedRow(); popAlternative.show(me.getComponent(), me.getX()+5, me.getY()+5); if(index==-1){...
8
public static void main(String[] args) { System.out.print("Enter the number of students: "); Scanner scanner = new Scanner(System.in); int numberOfStudents = scanner.nextInt(); System.out.print("Enter " + numberOfStudents + " scores: "); double[] scores = new double [numberOfStudents]; double bestS...
7
public boolean addComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { if (this.averageGroundLevel < 0) { this.averageGroundLevel = this.getAverageGroundLevel(par1World, par3StructureBoundingBox); if (this.averageGroundLevel < 0...
7
public boolean onLteamsCommand(CommandSender sender, Command cmd, String label, String[] args){ //First, are there any sessions or teams? if (sessions.size() == 0) { sender.sendMessage("There are currently no sessions."); return true; } //list the teams available to join. If they don't specify a sessio...
9
public Boek() { }
0
public void execute(Object parent) { mxGraphHierarchyModel model = layout.getModel(); final Set<mxGraphHierarchyNode> seenNodes = new HashSet<mxGraphHierarchyNode>(); final Set<mxGraphHierarchyNode> unseenNodes = new HashSet<mxGraphHierarchyNode>( model.getVertexMapper().values()); // Perform a dfs throug...
9
@Override public int getOperandCode() { switch (this.register) { case A: return 0x08; case B: return 0x09; case C: return 0x0A; case X: return 0x0B; case Y: return 0x0C...
9
private boolean containsFilter(String[] searchFilterNames) { Vector filterNames = getFilterNames(); if (filterNames == null) return false; for (int i = 0; i < filterNames.size(); i++) { String filterName = filterNames.elementAt(i).toString(); for (String searc...
4
private void locator(EnvParams ep){ try{ BasicTextEncryptor textEncryptor = new BasicTextEncryptor(); //textEncryptor.setPassword(System.getenv("_WLS_PASS_KEY")); textEncryptor.setPassword("password"); String pass=textEncryptor.decrypt(ep.pass); props=...
2
public static void main(String[] args) { Scanner sc = new Scanner(System.in); String input = sc.next(); if(input.length() == 1) { System.out.println(input + input + input); } if(input.length() == 2) { for (int i = 0; i < input.length(); i++) { char firstChar = String.valueOf(input).charAt(i); ...
9