text
stringlengths
14
410k
label
int32
0
9
public static void main(String[] args) { try { // Print out 10 hashes for(int i = 0; i < 10; i++) System.out.println(PasswordHash.createHash("p\r\nassw0Rd!")); // Test password validation boolean failure = false; System.out...
7
private boolean submitScore(boolean next){ //submit_score1 = new String[score.length]; //System.out.println("Submitscore"+db.current_score.getScores().toString()); HashMap<String, Float> submit_score = new HashMap<>(); for (int i = 0; i < score.length; i++) { for (int j = 0; j < score[i].length; j++) { i...
9
private String getVersionHistoryHtml(URL templateUrl, int sinceVersion) throws IOException { // Buffer for presentation-ready html. StringBuilder historyBuf = new StringBuilder(); URL url = null; BufferedReader in = null; String line = null; try { // Fetch the template. StringBuilder templateBuf = n...
9
private String getBaudotChar() { int a=0; if (inChar[5]==true) a=16; if (inChar[4]==true) a=a+8; if (inChar[3]==true) a=a+4; if (inChar[2]==true) a=a+2; if (inChar[1]==true) a++; // Look out for figures or letters shift characters if (a==0) { return ""; } else if (a==27) { lettersMode=false; ...
8
@Override public void fromMessage(Message message) throws JMSException { try { inputStream = ((BlobMessage) message).getInputStream(); } catch (IOException e) { logger.error("Can't get input stream.", e); } }
1
public static void main(String[] args) { List<Integer> ints = new ArrayList<Integer>(); List<Double> doubles = new ArrayList<Double>(); doubles.add(3.05);doubles.add(6.9);doubles.add(8.9); ints.add(3); ints.add(5); ints.add(10); double sum = sum(ints); double doubles1 = ...
2
public static boolean isOrthonormal(double[][] qt, boolean insufficientRank, double epsilon) { int n = qt.length; int rank = 0; for (int i = 0; i < n; i++) { Vector ei = new DenseVector(qt[i], true); double norm = ei.norm(2); if (Math.abs(1.0 - norm) < epsilon) { rank++; } ...
8
public static void afficherAide(){ if (p.getEchiquier().getTableau()[p.getCaseCliquee().getI()][p.getCaseCliquee().getJ()] != null){ Vector<Position> dest = p.getEchiquier().destinationPossible(p.getEchiquier().getTableau()[p.getCaseCliquee().getI()][p.getCaseCliquee().getJ()]); for (Position pos : dest){ ...
2
void drawCard(Graphics g, Card card, int x, int y) { if (card == null) { // Draw a face-down card g.setColor(Color.blue); g.fillRect(x+10, y + 10,65,90); g.setColor(Color.white); g.drawRect(x+10, y + 10, 65,90); } else { // image generation ...
1
public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String line = ""; StringBuilder out = new StringBuilder(); ArrayList<Integer> primes = primeNumbers(1000001); while ((line = in.readLine()) != null && line.length() != 0) { ...
7
public int getPlayerNumber(Player p) { if (p == null) throw new IllegalArgumentException("Player can't be null!"); return players.indexOf(p); }
1
public synchronized void put(T msg) { Link<T> next = new Link<T>(msg); if (first == null) { first = next; } else { last.next = next; last = next; } this.notify(); }
1
protected Map<String, Graph> loadGraphsAndPatterns(String filename, String fileDir, Level readLevel) throws IOException { String file = ((fileDir != null) ? fileDir : defaultFileDir) + filename + defaultFileExt; BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(new File(file))...
6
public SPIGroup getGroup (int gid) throws SPIException, XmlRpcException { try { Object[] result; result = (Object[])this.execute(GETGROUP, addHeader(new Object[] { gid })); return new SPIGroup(gid, (String)result[0], getIntegerList((Object[])result[1])); } catch (XmlRpcException e) { switch (e.c...
8
public List<File> buildFont( String internalName, FileGarbage garbage ) throws IOException { File tempDir = File.createTempFile( "fonts", ".tmp" ); tempDir.delete(); tempDir.mkdirs(); garbage.addFile( tempDir, true ); File binDir = new File( "bin" ); File encFile = ...
8
public double getDouble(String key) throws JSONException { Object object = this.get(key); try { return object instanceof Number ? ((Number)object).doubleValue() : Double.parseDouble((String)object); } catch (Exception e) { throw new JSONExc...
2
private final void createSampleArrayCollection() { try { this.audioInputStream.mark(Integer.MAX_VALUE); this.audioInputStream.reset(); int bufferSize = ( (int) this.getNumberOfFrames() ) * this.getFrameSize(); byte[] bytes = new byte[bufferSize]; try { this.audioInputStream.read(bytes);...
5
public void startElement( String uri, String localName, String qName, Attributes attrs ) throws SAXException { if (qName.equals("name") || qName.equals("info")) { buf = new StringBuffer(50); return; } if (qName.equals("hash")) { if (file != null) { HCHash hash = new HCHash( attrs.getValue("l...
9
public static void executeKey(KEY_COMMAND k) { if (game.paused) { if (k == KEY_COMMAND.PAUSE) { game.resume(); } return; } switch (k) { case LEFT: game.gameBlock.shiftLeft(); break; case RIGHT: game.gameBlock.shiftRight(); break; case ROTATE: game.gameBlock.rotate...
9
private void processSite(final AbstractJobSite site) { try { Document doc = getDocument(site.getUrlWithQuery()); Element elem = site.getElementForNextPage(doc); boolean morePagesToTraverse = site.morePagesToTraverse(elem); //Only a single page listing. Can happen, based on the search terms. ...
6
public void generate() { ArrayList<Integer> minePositions = new ArrayList<Integer>(); ArrayList<Integer> r = new ArrayList<Integer>(); for (int i = 0; i < (rows * columns); i++) { r.add(i); } Collections.shuffle(r); minePositions.addAll(r.subList(0, mines)...
4
public PlayerPanel(Player p) { super(); player = p; playerPnlHash.put(player, this); setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent event) { hiliteTerritories(map.getTerritories(player)); } public void mous...
4
public boolean destruccion(){ marcarBloques(); int i,j,bloquesNuevos,k,r,q; boolean retorno=false; Random generador=new Random(); for(i=0;i<15;i++){ bloquesNuevos=0; for(j=0;j<15;j++){ if(buttonMatrix[i][j].destruir){ retorno=true; for(k=j;k>bloquesNuevos;k--){ buttonMatrix[i][k-1].b...
7
@Override public Method parseMethod() throws IOException { Method m = new Method(); m.setReturnType(parseType()); if (curToken.type == Lexer.Type.NAME) { m.setName(curToken.c); curToken = lexer.getToken(); } else { throw new IOException("missing m...
5
@SuppressWarnings("nls") @Override public String toString() { StringBuilder buffer = new StringBuilder(); buffer.append(mHorizontal ? "Horizontal" : "Vertical"); buffer.append(" Dock Layout [id:"); buffer.append(Integer.toHexString(hashCode())); if (mDividerPosition != -1) { buffer.append(" d:"); buff...
3
public void collsionDetect(Particle p){ if(p.loc.x > width || p.loc.x < 0) { p.dir.x = -p.dir.x; } if(p.loc.y > height || p.loc.y < 0){ p.dir.y = -p.dir.y; } }
4
public void skillBuy(int item) { int nn = get99Count(); if (nn > 1) nn = 1; else nn = 0; for (int j = 0; j < skillCapes.length; j++) { if (skillCapes[j] == item || skillCapes[j]+1 == item) { if (c.getItems().freeSlots() > 1) { if (c.getItems().playerHasItem(995,99000)) { if ...
7
ConnectionHandler(SharedTorrent torrent, byte[] id, InetAddress address, boolean force) throws IOException { this.torrent = torrent; this.id = id; this.forceObfuscation = force; this.socket = new ServerSocket(); // Bind to the first available port in the range // [PORT_RANGE_START; PORT_RANGE_END]. fo...
3
public TuringConvertController(ConvertPane pane, SelectionDrawer drawer, TuringMachine automaton) { super(pane, drawer, automaton); myTuringMachine=automaton; converter = new TuringToGrammarConverter(); // converter.initializeConverter(); pane.getTable().getColumnModel().getColumn(0).setMinWidth(150); p...
0
public static void main (String[] argv) { int i; EntradaMat[] loleido; if (argv.length != 1) { System.err.println("Uso: java ManejadorMatrizXML <archivo>"); System.exit(1); } ManejadorMatrizXML handler = new ManejadorMatrizXML(); SAXParserFactory facto...
8
public static void setCursor(String tex, Vector2 hotspot) { CursorLoader.tex = ResourceLoader.getTexture(tex); CursorLoader.hotspot = hotspot; if(tex != null) { Cursor emptyCursor; try { emptyCursor = new Cursor(1, 1, 0, 0, 1, BufferUtils.createIntBuffer(1), null); Mouse.setNativeCursor(emptyC...
3
private void checkAdjacentNodesStart(Node origin) { Node n = null; for (int i = origin.x-1; i <= origin.x+1; i++) { for (int j = origin.y-1; j <= origin.y+1; j++) { if (!(i == origin.x && j == origin.y)) { n = new Node(i, j); int dirr = directionFromAdjacentNode(origin, n); if (dirr == 1) { ...
6
public EntityStatsEditor(String savedStats) { setResizable(false); setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); setTitle("Stat Editor"); setBounds(100, 100, 450, 300); getContentPane().setLayout(null); JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP); tabbedPane.setBounds(0, 0, 434, 237...
2
public static boolean isAntiarithmetic() { BitSet bs = new BitSet(a.length + 1); for (int i = 0; i < a.length; i++) { bs.clear(); for (int j = i + 1; j < a.length; j++) { bs.set(a[j], true); if ((a[j] + a[i]) % 2 == 0 && bs.get((a[j] + a[i]) / 2)) return false; } } return true; }
4
public RandomListNode copyRandomList(RandomListNode head) { if (head == null) return null; RandomListNode newHead = new RandomListNode(head.label); Map<RandomListNode, RandomListNode> nodeMap = new HashMap<RandomListNode, RandomListNode>(); nodeMap.put(head, newHead); RandomListNode next = he...
5
@RequestMapping(value="/{tripID}/editTravelTrip", method=RequestMethod.POST) public String ediTravelTrip(@PathVariable("tripID") String tripID, @Valid @ModelAttribute("editTravelTrip") TravelTrip editTravelTrip, BindingResult result, Model model){ if (!result.hasErrors()) {...
1
public synchronized EquationBTreeNode getChild2() {return child2;}
0
private Object[] readArray() throws EncodingException, NotImplementedException { int handle = readInt(); boolean inline = ((handle & 1) != 0); handle = handle >> 1; if (inline) { String key = readString(); if (key != null && !key.equals("")) throw new NotImplementedException("Associative arrays ar...
4
public static Integer getIntegerValue(String key){ return Integer.valueOf(getStringValue(key)); }
0
@Override public boolean loadAllInstruments(Soundbank soundbank) { boolean success = true; for (Synthesizer s : theSynths) if (!s.loadAllInstruments(soundbank)) success = false; return success; }
2
public void reselect() { if (lastClassName != null) { TreePath lastPath = (hierarchyTree ? hierModel .getPath(lastClassName) : packModel.getPath(lastClassName)); if (lastPath != null) { classTree.setSelectionPath(lastPath); classTree.scrollPathToVisible(lastPath); } } }
3
public static List<Appointment> findByWeek(long uid, long week) throws SQLException { List<Appointment> aAppt = new ArrayList<Appointment>(); long endOfWeek = week + 6 * DateUtil.DAY_LENGTH; // once aAppt.addAll(Appointment.findOnceByDaySpan(uid, week, endOfWeek)); // daily aAppt.addAll(Appointment.fin...
0
public SplashScreen(Forme forme){ this.forme=forme; this.setSize(400,387); this.setCursor(new Cursor(Cursor.WAIT_CURSOR)); panel=new JPanel(new BorderLayout()); label=new JLabel(new ImageIcon("Ressources/Images/jeux_taquin.png")); label.setVerticalAlignment(JLabel.CENTER); label.setHorizontalAlignment(JLa...
2
private boolean camposCompletos (){ if((!field_fec_alta.getText().equals(""))&& (!field_limite_cred.getText().equals(""))&& (!field_dni.getText().equals(""))&& (!field_nombre.getText().equals(""))&& (!field_apellido.getText().equals(""))&& (!field_telefono....
9
public static void main(String[] args) { final Logger logger = Logger.getLogger(Money.class.toString()); logger.info("Starting"); Money thisObj = null; try { } catch (Exception e) { logger.log(Level.SEVERE, e.getMessage(), e); } finally { if (thisObj != null) { // Clean up re...
2
@Override public FiveCardOmahaWorker build() { if (super.getRounds() <= 0) { throw new IllegalStateException("The number of rounds must be a strictly positive number"); } else if (super.getProfiles() == null || super.getProfiles().size() < 2) { thr...
8
public void redirectError(Writer w) { if (w == null) { throw new NullPointerException("w"); } stderr = w; }
1
public BlockDistillery(State state) { super(Material.iron); setBlockTextureName("snow"); setCreativeTab(GraphiteMod.tabGraphite); setHardness(2.0f); setResistance(5.0f); setStepSound(Block.soundTypeMetal); this.state = state; switch(state) { ...
3
private void setUp(){ fieldDecode = new JTextField(25); fieldEncode = new JTextField(25); int newHeight = fieldDecode.getPreferredSize().height + 5; int newWidth = fieldDecode.getPreferredSize().height; fieldDecode.setPreferredSize(new Dimension(newWidth, newHeight)); fieldEncode.setPreferredSize(new ...
0
protected void paintComponent(Graphics g) { if (isOpaque()) { Dimension size = getSize(); g.setColor(getBackground()); g.fillRect(0, 0, size.width, size.height); } int stepSize = 0; int cDist = 0; int rDist = 0; for (int vectorIndex =...
9
public void setImage(String image) { if (image.indexOf('\\') == -1) { this.image = image; return; } int size = image.length(); StringBuffer buf = new StringBuffer(size); for (int i = 0; i < size; i++) { char c = image.charAt(i); if ...
9
public int getPages(int intRegsPerPag, ArrayList<FilterBean> alFilter, HashMap<String, String> hmOrder) throws Exception { int pages; try { oMysql.conexion(enumTipoConexion); pages = oMysql.getPages("usuario", intRegsPerPag, alFilter, hmOrder); oMysql.desconexion(); ...
1
private void doDecode() { File file = null; showMessage("uncompressing"); try { int retval = ourChooser.showOpenDialog(null); if (retval != JFileChooser.APPROVE_OPTION) { return; } file = ourChooser.getSelectedFile(); St...
8
public Problem validate(final Object instance, final IPAddress annotation, final Object target, final CharSequence address) { if (address == null || address.length() < 1) { if (annotation.required()) { return new Problem(instance, annotation, target, address); } return null; } ...
6
@Override public String getCoordenadas() throws RemoteException { String coordenadas = ""; while (coordenadas.length() != 2) { coordenadas = JOptionPane.showInputDialog(frame, "Digite as coordenadas juntas (ex. XY), " + System.getProperty("line.separator") + "jogadas informadas anteriormente " + Sys...
9
@Override public void mouseExited(MouseEvent e) { setBorderPainted(false); }
0
public int distanceBetweenRank(Field otherField) { return otherField.rank - this.rank; }
0
private String GenerateOptions(int ir) { String r = new String(); boolean addHit = false; for ( int i = 0; i < hand.size(); i++) { if (this.hand.get(i).isHandPlayable()) { addHit = true; break; } } if ( addHit ) { r += "Hit - 1\n"; iOptions.add(1); } r += "Stand - 2...
8
@Override public void setArrestingOfficer(Area legalArea, MOB mob) { if ((arrestingOfficer != null) && (arrestingOfficer.getStartRoom() != null) && (arrestingOfficer.location() != null) && (legalArea != null) && (arrestingOfficer.getStartRoom().getArea() != arrestingOfficer.location().getArea()) && (!...
8
public static ArrayList<DVD> readTextDatabase(File file) { //------------------------------------- ArrayList<DVD> d = new ArrayList<>(); FileReader fr; BufferedReader br; String line; DVD newDVD; System.out.println("File name and path: " + file.getName() + " " + ...
6
@Override public void onParticipantJoined(IParticipant p) { if (isMyself(p.getUserId())) { if (recvAudio || sendAudio) { connectVoice(); } if (videoFilename != null && videoFilename.length() > 0 && sendVideo) { sendVideo(); } if (recvDeskshare) { connectDeskshare(); } } else { if (...
9
public int MoveInstanceToBestCluster(Instance inst) { clusters.get(m_clusterAssignments.get(m_processed_InstanceID)).DeleteInstance(inst); m_clusterAssignments.set(m_processed_InstanceID, -1); double delta; double deltamax; int clustermax = -1; int tempS = 0; int tempW = 0; if (inst in...
7
public void setImageIndent (int indent) { checkWidget(); if (indent < 0) return; if (imageIndent == indent) return; imageIndent = indent; if ((parent.getStyle () & SWT.VIRTUAL) != 0) cached = true; }
3
void generateEdges() { // Generate all vertical edges in the maze int index = 0; while (index < this.cells.size() - this.size) { edges.add(new Edge(this.cells.get(index), this.cells.get(index + this.size))); index = index + 1; } // Gene...
3
public SimpleStringProperty localNumberProperty() { return localNumber; }
0
public HashMap cashOutput(int amount) throws Exception { char[] params = Convert.toCharArray(amount); ArrayList<Integer> answer = this.device.send(0x51, 5, params); if (answer.size() == 0) throw new Exception("Пустой ответ"); HashMap<String, Integer> result = new HashMa...
3
private ArrayList<Product> queryForProducts(String sql) { ArrayList<Product> products = new ArrayList<>(); Connection con = null; try { con = getConnection(); PreparedStatement statement = con.prepareStatement(sql); ResultSet resultSet = statement.executeQuery(); while(resultSet.next()) { products...
3
@Override public void addUser(User user) { PreparedStatement pStmt = null; try { pStmt = conn.prepareStatement("INSERT INTO USER (login, password, name, surname) VALUES (?, ?, ?, ?);"); pStmt.setString(1, user.getLogin()); pStmt.setString(2, getMD5Hash(user.getPassword())); pStmt.setString(3,...
1
public String read(String transaction, String resource, boolean isReadOnly) { if (isReadOnly) { if (!snapshot.containsKey(transaction)) { throw new IllegalArgumentException( "A read transaction which has no snapshot"); } if (!snapshot.g...
8
public String parseLine(String line){ Pattern p=Pattern.compile(":\\w*!\\w*@\\w*.* PRIVMSG #\\w* :"); Matcher m=p.matcher(line); if(m.find()) return line.substring(m.end()); return line; }
1
void createExampleWidgets () { /* Compute the widget style */ int style = getDefaultStyle(); if (dateButton.getSelection ()) style |= SWT.DATE; if (timeButton.getSelection ()) style |= SWT.TIME; if (calendarButton.getSelection ()) style |= SWT.CALENDAR; if (shortButton.getSelection ()) style |= SWT.SHORT...
7
private double findSplitNominalNumeric(int index) throws Exception { double bestVal = Double.MAX_VALUE, currVal; double[] sumsSquaresPerValue = new double[m_Instances.attribute(index).numValues()], sumsPerValue = new double[m_Instances.attribute(index).numValues()], weightsPerValue = new d...
8
public void mousemove(Coord c) { if (dm) { this.c = this.c.add(c.add(doff.inv())); } else { super.mousemove(c); } }
1
private void processMulti(MulticastMessage multiMsg) { String destGroup = multiMsg.getSrcGroup(); ArrayList<String> memberList = groupList.get(destGroup).getMemberList(); MessageKey curKey = new MessageKey(); // If we receive a real multicast message if(!multiMsg.getKind().equal...
8
private void calculateManhattan() { grid.calculateManhattan(speed); }
0
public double standardError_of_ComplexImaginaryParts() { boolean hold = Stat.nFactorOptionS; if (nFactorReset) { if (nFactorOptionI) { Stat.nFactorOptionS = true; } else { Stat.nFactorOptionS = false; } } double[] re = this.array_as_imaginary_part_of_Complex(); double standardError = Stat.sta...
2
@Override public void keyReleased(KeyEvent e) { switch (e.getKeyCode()) { case KeyEvent.VK_UP: Game.VK_UP = false; break; case KeyEvent.VK_DOWN: Game.VK_DOWN = false; break; case KeyEvent.VK_LEFT: Game.VK_LEFT = false; break; case KeyEvent.VK_RIGHT: Game.VK_RIGHT = false; } }
4
public void update(double time){ for(Particle p:particles) p.tick(time); for(Particle p:bgParticles) p.tick(time); for(Explosion e:explosions) e.tick(time); for(Projectile p:projectiles) p.tick(time); for(Mob m:mobs) m.tick(time); deleteMarkedEntities(); for(Tower t:towers) t.tick(time); double exp = Ma...
8
public void run() { byte[] ack_buffer = new byte[ACK_SIZE]; do { try { ack_buffer = new byte[ACK_SIZE]; DatagramPacket receivePacket = new DatagramPacket( ack_buffer, ack_buffer.length); clientSocket.receive(receivePacket); } catch (Exception e) { } if (Utilities.getPacketNu...
4
public void update(Node lastPlayed){ Resolution.addFact(lastPlayed); int playedNodesIndex = 0; playedNodes = new Node[48]; for(int i = 0; i < allnodes.length; i++){ if(!(allnodes[i].getChar() == 'n')){ playedNodes[playedNodesI...
9
public void setCombatModifiers(int typeID) { switch (typeID) { case 0: weakAgainst = 1; strongAgainst = 3; break; case 1: weakAgainst = 2; strongAgainst = 0; break; case 2: weakAgainst = 3; strongAgainst = 1; break; case 3: weakAgainst = 0; strongAgainst = 2; break...
6
public Move(Board board, Position start, int horizontal , int vertical ){ field = board; this.start=start; this.horizontal=horizontal; this.vertical=vertical; }
0
public static void sendResponse(String output, Long id, Long prdetailsId) { try { post = new HttpPost(prop.getString("PostQuery").trim() + id); post.setHeader("Authorization", "Basic " + new String(encoded)); post.setHeader("Content-Type", "application/json"); post.addHeader("X-Mifos-Platform-TenantId"...
6
public void stopListen(){ run = false; try { socketListen.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
1
private void proveQuery(String content) { try { Evaluator evaluator = new Evaluator(new RobinsonUnificationStrategy(), knowledgeBase); boolean result = evaluator.prove( new ConsoleEvaluationHandler(System.out, console), parser.parsePredicates(content)); if...
4
public static void createIcons(EngineConfiguration config){ EngineConfiguration engine = config; String icon16 = engine.DISPLAY_ICON_16; String icon32 = engine.DISPLAY_ICON_32; if(!FileUtility.doesFileExist(icon16) || !FileUtility.doesFileExist(icon32)){ return; } ...
2
public static void main(String[] args) { // insert a bunch of strings String[] strings = { "it", "was", "the", "best", "of", "times", "it", "was", "the", "worst" }; IndexMinPQ<String> pq = new IndexMinPQ<String>(strings.length); for (int i = 0; i < strings.length; i++) { pq....
5
public int getStatus() { return Status; }
0
public float get_halffloat(int offset) { int signbit; int mantissa; int exp; float result; if(offset >= 0) if (pb[5] < (offset + 2)) { val = -1; // insufficient payload length return 0; } result = ((p...
4
public static String unescape(String string) { int length = string.length(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < length; ++i) { char c = string.charAt(i); if (c == '+') { c = ' '; } else if (c == '%' && i + 2 < length) { ...
6
public static void drawFullCircle(Graphics g, int x, int y){ //TODO: for (int i = 0; i <= 20; i++){ g.setColor(new Color(Math.abs(i * (127 / 20)) + 127,255,0)); //System.out.println(Math.abs(i * (127 / 20))); // g.fillOval((x + EMPTY_CIRCLE) / 2 + (EMPTY_CIRCLE / 2) - EMPTY_CIRCLE_THK / 2 + i * EMPTY_CIRCLE...
1
/* */ public RIFCSElement getClassObject() /* */ throws RIFCSException /* */ { /* 360 */ NodeList nl = super.getElements(this.objectClass); /* */ /* 362 */ if (nl.getLength() != 1) /* */ { /* 364 */ return null; /* */ } /* */ /* 367 */ if (this.objectClass...
5
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("action"); //由context parameter取得JDBC需要的資訊 ServletContext sc = this.getServletConfig().getServletContext();...
4
public MainFrame(MainController controller) { super("Chatus"); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { int confirm = JOptionPane.showOptionDialog(null, "Are You Sure to Close this Applic...
5
private void constructionGrille () { // creation du JPanel qui contient la grille conteneurGrille = new JPanel(); conteneurGrille.setPreferredSize(new Dimension(420,420)); conteneurGrille.setLayout(new GridBagLayout()); //l'outil pour positionner GridBagConstraints gbc = new GridBagConstraints(); gbc.fi...
6
public void setWait(){ myKeeper.setWait(); }
0
public World() { }
0
public static void applyFX( DeviceType type, Mobile uses, Target applied, boolean hits ) { final World world = uses.world() ; if (type == null || type.hasProperty(MELEE)) { // // Put in a little 'splash' FX, in the direction of the arc. final float r = uses.radius() ; final S...
4
public Ast.AstVector parse_PredicateList(SpecObject specObject, String property) { int at = m_current; if (!ok()) { return null; } Ast.AstVector node = m_ast.new AstVector(); Ast.AstPredicate pnode = parse_Predicate(specObject, property); ...
9
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ImovelDoCorretorId other = (ImovelDoCorretorId) obj; if (corretor == null) { if (other.corretor != null) return false; } else if (!corre...
9